[Subversion] / Trellis / README.txt |
No default branch
Bookmark a link to HEAD:
(view)
(download)
Fixes for various complex scenarios, such as: * False-positive detection of circularity in some cases where retried rules are related, but not actually circular. * Lazily-created components in uninitialized rules called from @compute or @perform rules could trigger read-only violation errors. * If a "future" value was accessed from both rule and non-rule code in the same transaction, it could trigger a silent, partial rollback of the non-rule code, leading to inexplicable result. Also, as a side effect of these changes, CircularityError instances now includes a path indicating at least one possible cycle in the given routes, and "futures" must now be copyable objects. Many thanks go to Sergey Schetinin, who not only reported these issues, but also diagnosed them and provided both test cases and suggestions for fixes. Thank you, Sergey!
Update docs for release
Add the Pipe data type.
Doc overhaul, and rename ObserverCell->Performer
Add porting guide, and tests/changes to match it.
Implement make(), make=, and rename variable->attribute. Disallow self-access in lazy (compute) rules.
First cut of the new API, and basic "lazy cell" support.
Experimental support for connecting to non-Trellis data sources w/automatic subscribe/unsubscribe, and safe writebacks. No docs yet, minimal tests.
API cleanups, doc enhancements, and release prep
Major doc update. Rename lambdas in rules to match cell names. Prevent replacing constant cells. Rename dirty() to mark_dirty() to prevent confusion with the dirty() method.
Correct some of the more egregious documentation errors and terminology. Tests now pass under Python 2.4 as well as 2.5 (2.3 is still broken). Begin the split of the activity/eventlooop/task docs to a separate file. Remove some done items from the TODO section.
The new algorithm lands - version bump to 0.6a1dev. Too many changes to list!
Split advanced collection types into peak.events.collections. Add new "SubSet" type.
Add SortedSet type, fix a bug where Set.added could include a redundant item.
Doc fix
Doc fix
Event loops for tests, wx, and twisted. No docs, and only minimal testing so far, but much hacking was done to get these to work more-or-less correctly. wx needs some mocking, and it turns out that the Time service really needs to make next_event_time() dirty when new events are added, even if self._tick doesn't change. That'll have to be fixed later, though (as with the wx mocks issue).
First draft of Time service, with docs
Doc fixes and tweaks suggested by Jeffrey Harris @ OSAF.
Finish docs. Clean up ActionCell and TaskCell constructors. Renamed ``Value`` to ``Return``.
Added doc section on "Creating Your Own Data Structures"
Allow cell repr()'s to be out-of-date, thereby preventing side-effects and dependencies as a result of viewing cell objects. This makes debugging easier, since you can now always print a cell without fear of skipping a recalc you intended to step through!
Require all changes to occur either outside of rules, or in @action rules -- which can't be read from any rule, thus making them always calculate roughly "last". Dropped ``without_observer()``, in favor of an alternative strategy for initializing component cells.
Improved "discrete rule" section, with better example. Flesh out roadmap, GC, links, and formatting.
Add lots more doc... that exposed a problem with the core algorithm in cases where objects have custom comparison functions and use cell attributes in the calculation. Also, found and fixed problems with dirtiness detection in mutables like Dict and Set, and added a new API call, dirty(), to fix it. Still a bunch more doc to go, but it's getting to be downright informative already.
Lots of new documentation on trellis basics.
Begin documentation/test refactoring; new intro, updated TODO.
Fix a lurking problem with dependencies: circular dependencies couldn't be reliably observed by rules that weren't part of the circle! Strangely, last year's version of the trellis code had a fix for this, using doubly- indirected links, but there were no tests that covered the behavior, so I didn't keep it in the rewrite. But now, there's a test that covers it. The issue is that only the cell that depends on a cell, should ever remove itself as a listener from the target, because only the depender knows when it's finished depending on something! (i.e., when it recalculates itself, or becomes a Constant)
Get rid of the vestigial runloop, and make pulse objects include their own run queue. This trims down the code size and number of calls, while reducing the number of concepts one has to keep track of to understand the whole thing.
Simplified repeat() operation, fold recalculation into check_dirty(), and simplified definition of the "always recalc" state of _depends (a false value in the sequence now means a rule is definitely dirty).
Ensure scheduled future events occur in datapulse order. Allow rules to repeat themselves by calling repeat().
Ensure that reads outside of propagation block until propagation is over. Drop EventLoop service; it was overkill for what's actually needed. I'm keeping the dependency on Contextual since Time, IO, and Signals will all be context.Service classes later. But the core doesn't need this service, and this way it'll be easier to write a C version later, if needed. There may still need to be a way to replace the runner to serve in other event loop systems, but for now I'm treating it as a YAGNI.
Implement a test for the infamous "pentagram of death" -- which we pass with flying colors!
Tests for new features including event-ness, rule-changing, mutual recursion/dependency, and constant-ification. Now we need some torture tests, and a verifiable GC strategy for methods used as rules, but the basic algorithm seems to be working quite well so far.
Rip out the old Trellis implementation and replace with a shiny new algorithm. This is nowhere near adequately tested, and Constant conversion doesn't work. The doctests are in horrible shape and don't describe the current algorithm at all. The fancy API described in my mailing list posts is nowhere to be found, and none of the new functionality is tested in the slightest. Experiment at your own risk; this is just a placeholder/proof-of-concept test to see if the new algorithm at least passes the old tests (except for Constant conversion.) And it does. :) So, everything from here on out should effectively be either documentation, tests, syntax sugar, or convenience/reference implementations of higher-level features.
Refactor to use a Cells-like forward/backward propagation system. Separated thread-specific "current observer" state from trellis state. Tests still pass, but are far from sufficient and the docs are crap; you're better off not reading them yet. Effectively this is just a checkpoint to have a jumping-off point for more extensive changes, like making values know what trellis they belong to, and redoing the docs/tests to maximize both line and scenario coverages.
Trellis: a new paradigm for event-driven programming, based on ideas from Gelernter's "Trellis" system, and Tilton's "Cells" for Lisp. Eventually, this will grow up to do the rest of the things that peak.events does now, only with deterministic updates and no need for explicit dependency management.
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |