E&S CVS Commit: PEAK-Rules - Refactor condition negation by adding negate() GF, dropping

pje at eby-sarna.com pje at eby-sarna.com
Tue Jul 15 12:49:04 EDT 2008


Author: pje
Date: Tue Jul 15 12:49:02 2008
New Revision: 2566

URL: http://svn.eby-sarna.com?rev=2566&view=rev
Log:
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.

Modified:
    PEAK-Rules/Criteria.txt
    PEAK-Rules/Indexing.txt
    PEAK-Rules/Predicates.txt
    PEAK-Rules/peak/rules/core.py
    PEAK-Rules/peak/rules/criteria.py
    PEAK-Rules/peak/rules/indexing.py
    PEAK-Rules/peak/rules/predicates.py
    PEAK-Rules/test_rules.py




More information about the source-changes mailing list