From 91e98f5f1cf726fc190f62db409ebeeadedbcd7b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 1 May 2010 02:07:52 +0000 Subject: * interp/c-util.boot (getSuccessEnvironment): Move to here from compiler.boot. (getInverseEnvironment): Likewise. * interp/wi2.boot (getSuccessEnvironment): Remove. (getInverseEnvironment): Likewise. (corrupted?): Likewise. (unLet): Likewise. --- src/interp/compiler.boot | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'src/interp/compiler.boot') 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) -- cgit v1.2.3