[Subversion] / Trellis / test_trellis.py  

Log of /Trellis/test_trellis.py

Parent Directory

No default branch
Bookmark a link to HEAD: (view) (download) (as text)


Revision 2599 - (view) (download) (as text) - [select for diffs]
Modified Sun Feb 22 04:20:24 2009 UTC (15 years, 2 months ago) by pje
File length: 47268 byte(s)
Diff to previous 2598
Implement Grant's suggested sorting fixes

Revision 2598 - (view) (download) (as text) - [select for diffs]
Modified Sun Feb 22 03:51:22 2009 UTC (15 years, 2 months ago) by pje
File length: 46239 byte(s)
Diff to previous 2595
Fix the "sensor undo" and "set before recalc" bugs; add some disabled 
tests for circularity-detection edge cases.  (Making them pass will
require a re-think of how cycle detection works, as this is turning
out to be a "solve the halting problem" kind of problem!)

Revision 2595 - (view) (download) (as text) - [select for diffs]
Modified Mon Nov 3 23:22:37 2008 UTC (15 years, 5 months ago) by pje
File length: 43781 byte(s)
Diff to previous 2580
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!

Revision 2580 - (view) (download) (as text) - [select for diffs]
Modified Mon Oct 6 15:21:51 2008 UTC (15 years, 6 months ago) by pje
File length: 43177 byte(s)
Diff to previous 2559
Fix an intermittent issue with the wx event loop test, where
it would lock up if the sub-millisecond event needed to be
scheduled.  Apparently, once a wx app's MainLoop() has exited,
timed callbacks no longer work.  So, to fix the test, a dummy
Frame is created, so the MainLoop() won't exit until the test
is finished.  Also, ensure that if the MainLoop *does* exit,
Time.tick() still gets called until the EventLoop is stopped.

Revision 2559 - (view) (download) (as text) - [select for diffs]
Modified Thu Jun 26 01:52:03 2008 UTC (15 years, 10 months ago) by pje
File length: 43157 byte(s)
Diff to previous 2554
Ensure that any wx-supplied delay is at least 1ms long.

Revision 2554 - (view) (download) (as text) - [select for diffs]
Modified Wed Jun 18 03:25:46 2008 UTC (15 years, 10 months ago) by pje
File length: 42854 byte(s)
Diff to previous 2543
Fix Time.next_event_time() being able to return the time of an event
that's already passed in the current recalc (because it didn't depend
on the rule that removes passed events from the schedule).

Revision 2543 - (view) (download) (as text) - [select for diffs]
Modified Thu May 15 23:01:17 2008 UTC (15 years, 11 months ago) by pje
File length: 42364 byte(s)
Diff to previous 2542
Added "pub/sub hub" to collections module, and updated Time service to
use the same underlying "cellcache" mechanism.  The cellcache mechanism 
itself is not yet a public API, however, due to minimal test coverage 
and some open questions regarding what cases it should support.  It does 
quite well for the things it's currently being used for, but don't 
depend on its API being stable just yet.

Revision 2542 - (view) (download) (as text) - [select for diffs]
Modified Thu May 15 16:06:30 2008 UTC (15 years, 11 months ago) by pje
File length: 42269 byte(s)
Diff to previous 2540
Fix a problem with cross-recalc undo underflowing the "on commit" log

Revision 2540 - (view) (download) (as text) - [select for diffs]
Modified Wed May 14 17:01:43 2008 UTC (15 years, 11 months ago) by pje
File length: 41787 byte(s)
Diff to previous 2539
Prevent double-resuming of tasks when more than one dependency changes
between flushes of the event loop.

Revision 2539 - (view) (download) (as text) - [select for diffs]
Modified Tue May 13 17:00:27 2008 UTC (15 years, 11 months ago) by pje
File length: 41186 byte(s)
Diff to previous 2538
Make undo log span recalculations, so that any actions that
triggered a chained recalculation will also be undone (at the
possible cost of losing external sync).

Revision 2538 - (view) (download) (as text) - [select for diffs]
Modified Fri May 9 18:01:22 2008 UTC (15 years, 11 months ago) by pje
File length: 40592 byte(s)
Diff to previous 2528
Prevent time-based rules from being able to create spurious
circular dependencies.

Revision 2528 - (view) (download) (as text) - [select for diffs]
Modified Fri Apr 25 22:07:07 2008 UTC (16 years ago) by pje
File length: 40584 byte(s)
Diff to previous 2525
Doc overhaul, and rename ObserverCell->Performer

Revision 2525 - (view) (download) (as text) - [select for diffs]
Modified Mon Apr 21 17:42:53 2008 UTC (16 years ago) by pje
File length: 40593 byte(s)
Diff to previous 2524
Implement make(), make=, and rename variable->attribute.
Disallow self-access in lazy (compute) rules.

Revision 2524 - (view) (download) (as text) - [select for diffs]
Modified Fri Apr 11 22:39:28 2008 UTC (16 years ago) by pje
File length: 40620 byte(s)
Diff to previous 2516
First cut of the new API, and basic "lazy cell" support.

Revision 2516 - (view) (download) (as text) - [select for diffs]
Modified Thu Mar 27 18:53:47 2008 UTC (16 years, 1 month ago) by pje
File length: 40272 byte(s)
Diff to previous 2477
Highly-experimental SQLAlchemy integration proof-of-concept.  You must
have the 'user_defined_state' branch of SQLAlchemy, and it is only proven
to work with *exactly* revision 4361.  Revisions before or after are
anyone's guess.

Revision 2477 - (view) (download) (as text) - [select for diffs]
Modified Mon Jan 7 22:40:07 2008 UTC (16 years, 3 months ago) by pje
File length: 40121 byte(s)
Diff to previous 2470
API cleanups, doc enhancements, and release prep

Revision 2470 - (view) (download) (as text) - [select for diffs]
Modified Sat Jan 5 02:13:58 2008 UTC (16 years, 3 months ago) by pje
File length: 40105 byte(s)
Diff to previous 2469
Get rid of the now-ancient Specification.txt and move its
demos to Internals.txt

Revision 2469 - (view) (download) (as text) - [select for diffs]
Modified Sat Jan 5 01:58:23 2008 UTC (16 years, 3 months ago) by pje
File length: 40120 byte(s)
Diff to previous 2449
Move task-related stuff to activity module.  Fleshed out docs
for activity module.  Tested undo support for Time service.

Revision 2449 - (view) (download) (as text) - [select for diffs]
Modified Fri Dec 28 19:26:41 2007 UTC (16 years, 3 months ago) by pje
File length: 38837 byte(s)
Diff to previous 2447
Simplified rollback support for collections.  Only changes
done to non-"future" cells need to be undo-logged, and the
entire structure will be rolled back to the first point of
change when *any* change to the structure is rolled back.

Revision 2447 - (view) (download) (as text) - [select for diffs]
Modified Fri Dec 28 16:20:47 2007 UTC (16 years, 3 months ago) by pje
File length: 35257 byte(s)
Diff to previous 2441
Refactor retry, cycle detection, and rollback to allow reentrant
rollback, so we'll be able to have "todo" cells do complete data
structure rollbacks.  As a nice side-effect, this refactoring
speeds up rule processing by making fewer attribute changes and
recording fewer undo actions.  The tests for Python 2.3 run about
33% faster than they did before, although they're still 7 times
slower than the Python 2.5 tests.  (The speedup for 2.3 is
disproportionate because the cost of getting or setting controller
attributes is much higher, due to threading.local being in Python
instead of C.)

Revision 2441 - (view) (download) (as text) - [select for diffs]
Modified Fri Dec 21 17:20:30 2007 UTC (16 years, 4 months ago) by pje
File length: 35150 byte(s)
Diff to previous 2440
Restore Python 2.3 compatibility.  This is of somewhat limited
benefit, since the tests run (literally) 10 times slower than
Python 2.4, due to the incredible slowness of the Python (i.e.
non-C) version of threading.local.

Revision 2440 - (view) (download) (as text) - [select for diffs]
Modified Fri Dec 21 16:11:16 2007 UTC (16 years, 4 months ago) by pje
File length: 35091 byte(s)
Diff to previous 2436
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.

Revision 2436 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 30 22:46:43 2007 UTC (16 years, 4 months ago) by pje
File length: 35035 byte(s)
Diff to previous 2435
The new algorithm lands - version bump to 0.6a1dev.
Too many changes to list!

Revision 2435 - (view) (download) (as text) - [select for diffs]
Modified Mon Nov 26 19:18:45 2007 UTC (16 years, 5 months ago) by pje
File length: 26183 byte(s)
Diff to previous 2433
Simplify undo by not logging undo's while undoing.  This makes
it possible to write code that doesn't care if it's a "do" or
"undo", which should make data structures similar.  i.e., the
reverse of an 'add' can then be a 'remove' and vice versa,
without needing to have separate 'undo_add' and 'undo_remove'
operations that don't log undo information.

Revision 2433 - (view) (download) (as text) - [select for diffs]
Modified Sun Nov 25 19:43:05 2007 UTC (16 years, 5 months ago) by pje
File length: 26193 byte(s)
Diff to previous 2432
Improved retry algorithm to handle multiple simultaneous
rollbacks, and to do them between rules.  Add Observer and
Cell implementations+tests.

Revision 2432 - (view) (download) (as text) - [select for diffs]
Modified Sat Nov 24 01:49:46 2007 UTC (16 years, 5 months ago) by pje
File length: 25729 byte(s)
Diff to previous 2431
First cut of basic Cell types based on the new algorithm.  For
now, they live in a different module, since they aren't fully
featured yet.  They do, however, perform many of the cell
basics, including ReadOnlyCell->Constant, basic recalculation,
etc.  But read/write cell initialization is untested, observers
don't exist yet, and neither do task cells.  A suitable
replacement for the 'future/todo' mechanism is also needed
before the process of replacing the existing cell types and
data structures can begin.  But this is a pretty good start.

Revision 2431 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 23 17:55:55 2007 UTC (16 years, 5 months ago) by pje
File length: 20376 byte(s)
Diff to previous 2430
Improved commit/abort/undo logic, add dirty() method to allow
listeners to skip being scheduled.  (Also, schedule listeners
immediately when changed() is called outside of run().)

Revision 2430 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 23 02:03:26 2007 UTC (16 years, 5 months ago) by pje
File length: 19989 byte(s)
Diff to previous 2429
Rule handling, with retry and cycle detection.  This basically
completes the core implementation of the new algorithm, on top
of which Cells and other data structures and decorators can
then be built.

Revision 2429 - (view) (download) (as text) - [select for diffs]
Modified Thu Nov 22 23:54:54 2007 UTC (16 years, 5 months ago) by pje
File length: 12236 byte(s)
Diff to previous 2423
Begin laying the foundation for the new algorithm's controller.

Revision 2423 - (view) (download) (as text) - [select for diffs]
Modified Wed Nov 21 00:22:49 2007 UTC (16 years, 5 months ago) by pje
File length: 5771 byte(s)
Diff to previous 2422
New algorithm: subjects, listeners, and links.

Revision 2422 - (view) (download) (as text) - [select for diffs]
Modified Tue Nov 20 20:57:45 2007 UTC (16 years, 5 months ago) by pje
File length: 3223 byte(s)
Diff to previous 2419
Begin work on new algorithm: STM history class.
(Python 2.4 currently required)

Revision 2419 - (view) (download) (as text) - [select for diffs]
Modified Wed Nov 14 01:25:59 2007 UTC (16 years, 5 months ago) by pje
File length: 3264 byte(s)
Diff to previous 2413
Split advanced collection types into peak.events.collections.
Add new "SubSet" type.

Revision 2413 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 2 23:37:58 2007 UTC (16 years, 5 months ago) by pje
File length: 3245 byte(s)
Diff to previous 2375
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).

Revision 2375 - (view) (download) (as text) - [select for diffs]
Modified Sun Jul 29 19:52:37 2007 UTC (16 years, 8 months ago) by pje
File length: 335 byte(s)
Diff to previous 2358
Added List, Dict, and Set types with change events.
We are now feature-complete for 0.5b1 (minus docs), weighing
in at a modest 1066 lines of code.  Woohoo!

Revision 2358 - (view) (download) (as text) - [select for diffs]
Modified Tue Jul 17 02:23:42 2007 UTC (16 years, 9 months ago) by pje
File length: 210 byte(s)
Diff to previous 2351
Begin documentation/test refactoring; new intro, updated TODO.

Revision 2351 - (view) (download) (as text) - [select for diffs]
Modified Fri Jul 13 21:38:42 2007 UTC (16 years, 9 months ago) by pje
File length: 189 byte(s)
Diff to previous 2338
High level API: Component class, decorators, properties.  The tests are
disorganized and the docs are non-existent, but it works, by golly.
Docs and test re-orgs will begin next week.

Revision 2338 - (view) (download) (as text) - [select for diffs]
Modified Mon Jul 9 04:17:33 2007 UTC (16 years, 9 months ago) by pje
File length: 172 byte(s)
Diff to previous 2335
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.

Revision 2335 - (view) (download) (as text) - [select for diffs]
Modified Sun Jul 8 05:42:14 2007 UTC (16 years, 9 months ago) by pje
File length: 185 byte(s)
Diff to previous 2199
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.

Revision 2199 - (view) (download) (as text) - [select for diffs]
Added Wed Jun 21 05:36:46 2006 UTC (17 years, 10 months ago) by pje
File length: 172 byte(s)
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.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

  Diffs between and
  Type of Diff should be a

Sort log by:

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help