[Subversion] / PEAK-Rules / Criteria.txt |
No default branch
Bookmark a link to HEAD:
(view)
(download)
Whack a bunch of spurious doctest failures on different platforms/python versions
Refactor condition negation by adding negate() GF, dropping truth mode from builders, and adding an OrElse sequential-or operator. This also changed how Truth tests are coded, to use Value(True, T/F) objects in place of bools (to get rid of the ambiguity that previously existed). Value(x, False) objects no longer have disjuncts, since that was another ambiguity. These ambiguities meant that you couldn't cleanly take the disjuncts() of a Test(), which meant you also couldn't negate a test safely. We also no longer force Signature() objects to expand Test disjunctions, as this isn't necessary for DNF handling. (Because we're going to grab the disjuncts() at rule-add time anyway -- eager expansion was an unnecessary holdover from the way RuleDispatch did things.) See also: http://www.eby-sarna.com/pipermail/peak/2008-July/003000.html for more background on the reasoning behind these changes.
Tweak a couple of tests for better compatibility across multiple Python versions (2.3 and 2.4 sometimes print things in a different order than 2.5 does).
Implement remaining intersection rules for istype()+classes
Preliminary istype() support for predicate dispatch. This is just the necessary compiler support for translating expressions of the form ``type(x) is y`` and ``x in istype(y)``, some support for istype() implication/intersection with Class criteria, and a bit of cleanup/refactoring of the indexing code. NOT supported: mixing istype() and Classes... or actually indexing istype() criteria. The entire BitmapIndex system is going to have to be refactored in order to fully fix this. :( On the bright side, that will let me clean up a bunch of other index-related cruft, too.
Fix a problem with implication between conjunctions (such as Signature objects). This fixes the AmbiguousMethods problem reported on the PEAK list by Scott Graham.
Fix an ambiguity in intersection rules for conjunctions and disjunctions, and a problem comparing IsObject pointers and non-integers. Add an 'engine' argument to tests_for, so that predicate engines will be able to turn type tuples into signatures using their argument info.
Add shortcut for creating inequalities (Range or Value)
Doc cleanups.
PEAK-Rules is now as "smart" as RuleDispatch, in that it now "knows" as much as RuleDispatch does about logical conditions regarding Python objects, and how to index them efficiently. The machinery is also better documented (and probably better tested) than the equivalent bits of RuleDispatch. Alas, this does not mean that you can actually use Python expressions for generic function criteria yet, as the actual tree builder/interpreter hasn't been written. So we can evaluate and index expressions, but not build them from an AST or build/run a dispatch tree from the indexes. Still, it's getting *really* close now!
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |