diff options
author | dos-reis <gdr@axiomatics.org> | 2011-02-26 01:37:33 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-02-26 01:37:33 +0000 |
commit | 19879cbdaa8f64442135f29896e02725e435483a (patch) | |
tree | 7975830b65cc22ec5f11d00ce3c3e50a4f0db35c /src | |
parent | b0074cf7a64b5a4070b649924285084e4980f147 (diff) | |
download | open-axiom-19879cbdaa8f64442135f29896e02725e435483a.tar.gz |
* interp/g-opt.boot (optNot): Push %not inside conditionals.
(optCond): Remove ineffectual transformation.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0178b6d9..18878936 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-02-25 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (optNot): Push %not inside conditionals. + (optCond): Remove ineffectual transformation. + +2011-02-25 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/parse.boot (parseLessEqual): Remove. 2011-02-25 Gabriel Dos Reis <gdr@cs.tamu.edu> diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index c12e6689..b119ce5f 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -308,14 +308,11 @@ optCond (x is ['%when,:l]) == l is [[p1,['%when,[p2,c2]]]] => optCond ['%when,[['%and,p1,p2],c2]] l is [[p1,:c1],[p2,:c2],[p3,:c3]] and p3 = '%otherwise => EqualBarGensym(c1,c3) => - optCond ['%when,[['%or,p1,['%not,p2]],:c1],['%otherwise,:c2]] + optCond ['%when,[['%or,p1,optNot ['%not,p2]],:c1],['%otherwise,:c2]] EqualBarGensym(c1,c2) => optCond ['%when,[['%or,p1,p2],:c1],['%otherwise,:c3]] x for y in tails l repeat - c := first y - if c is [['%not,['%not,p]],:.] then - c.first := p while y is [[a1,c1],[a2,c2],:y'] and EqualBarGensym(c1,c2) repeat a := ['%or,a1,a2] first(y).first := a @@ -692,6 +689,8 @@ optNot(x is ['%not,a]) == a = '%true => '%false a = '%false => '%true a is ['%not,b] => b + a is ['%when,:.] => + optCond [a.op, :[[p,optNot ['%not,c]] for [p,c] in a.args]] x optAnd(x is ['%and,a,b]) == |