aboutsummaryrefslogtreecommitdiff
path: root/src/interp/compiler.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r--src/interp/compiler.boot34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 74847aaa..2e0beda4 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1258,40 +1258,6 @@ compPredicate(p,E) ==
[p',m,E] := comp(p,$Boolean,E) or return nil
[p',m,getSuccessEnvironment(p,E),getInverseEnvironment(p,E)]
-getSuccessEnvironment(a,e) ==
- a is ["is",id,m] =>
- IDENTP id and isDomainForm(m,$EmptyEnvironment) =>
- e:=put(id,"specialCase",m,e)
- currentProplist:= getProplist(id,e)
- [.,.,e] := T := comp(m,$EmptyMode,e) or return nil -- duplicates compIs
- newProplist:= consProplistOf(id,currentProplist,"value",[m,:rest removeEnv T])
- addBinding(id,newProplist,e)
- e
- a is ["case",x,m] and IDENTP x =>
- put(x,"condition",[a,:get(x,"condition",e)],e)
- a is ["and",:args] =>
- for form in args repeat
- e := getSuccessEnvironment(form,e)
- e
- a is ["not",a'] => getInverseEnvironment(a',e)
- e
-
-getInverseEnvironment(a,e) ==
- a is ["case",x,m] and IDENTP x =>
- --the next two lines are necessary to get 3-branched Unions to work
- -- old-style unions, that is
- (get(x,"condition",e) is [["OR",:oldpred]]) and member(a,oldpred) =>
- put(x,"condition",LIST MKPF(delete(a,oldpred),"OR"),e)
- getUnionMode(x,e) is ["Union",:l] =>
- l':= delete(m,l)
- for u in l' repeat
- if u is ['_:,=m,:.] then l':= delete(u,l')
- newpred:= MKPF([["case",x,m'] for m' in l'],"OR")
- put(x,"condition",[newpred,:get(x,"condition",e)],e)
- e
- a is ["not",a'] => getSuccessEnvironment(a',e)
- e
-
getUnionMode(x,e) ==
m:=
atom x => getmode(x,e)