aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-04-14 02:59:14 +0000
committerdos-reis <gdr@axiomatics.org>2011-04-14 02:59:14 +0000
commit4f34df6d33057c38bb67497101db917f06d00391 (patch)
treef6eccde5d671cac0ed7d3d978a16f4902853d6cf /src/interp
parent0e38e0fddb31adfa138e782accc1eadb83139dd8 (diff)
downloadopen-axiom-4f34df6d33057c38bb67497101db917f06d00391.tar.gz
cleanup
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/category.boot15
-rw-r--r--src/interp/sys-utility.boot4
2 files changed, 9 insertions, 10 deletions
diff --git a/src/interp/category.boot b/src/interp/category.boot
index a63a4824..26a55326 100644
--- a/src/interp/category.boot
+++ b/src/interp/category.boot
@@ -163,10 +163,10 @@ SigListUnion(extra,original) ==
-- the extra list would like to add ** with PositiveIntegers.
-- The PI map is therefore gives an implementation of "Subsumed"
for x in SigListOpSubsume(o,extra) repeat
- [[xfn,xsig,:.],xpred,:.]:=x
- xfn=ofn and xsig=osig =>
+ [[xfn,xsig,:.],xpred,:.] := x
+ symbolEqual?(xfn,ofn) and xsig = osig =>
--checking name and signature, but not a 'constant' marker
- xpred=opred => extra:= delete(x,extra)
+ xpred = opred => extra:= delete(x,extra)
--same signature and same predicate
opred = true => extra:= delete(x,extra)
-- PRETTYPRINT ("we ought to subsume",x,o)
@@ -297,17 +297,16 @@ SigListOpSubsume([[name1,sig1,:.],:.],list) ==
--see "operator subsumption" in SYSTEM SCRIPT
--if it does, returns the subsumed member
lsig1 := #sig1
- ans:=[]
- for (n:=[[name2,sig2,:.],:.]) in list repeat
- name1=name2 and lsig1 = #sig2 and sig1 = sig2 =>
- ans:=[n,:ans]
+ ans := []
+ for (n:=[[name2,sig2,:.],:.]) in list | symbolEqual?(name1,name2) repeat
+ lsig1 = #sig2 and sig1 = sig2 => ans := [n,:ans]
return ans
MachineLevelSubsume([name1,[out1,:in1],:flag1],[name2,[out2,:in2],:flag2]) ==
-- Checks for machine-level subsumption in the sense of SYSTEM SCRIPT
-- true if the first signature subsumes the second
-- flag1 = flag2 and: this really should be checked, but
- name1=name2 and MachineLevelSubset(out1,out2) and
+ symbolEqual?(name1,name2) and MachineLevelSubset(out1,out2) and
(and/[MachineLevelSubset(inarg2,inarg1) for inarg1 in in1 for inarg2 in in2]
)
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index ec35299a..db742d49 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -132,8 +132,8 @@ CONTAINED(x,y) == main where
symbol? x => eq(x,y)
equal(x,y)
eq(x,y) ==
- atom y => EQ(x,y)
- eq(x, first y) or eq(x, rest y)
+ cons? y => eq(x, first y) or eq(x, rest y)
+ symbolEqual?(x,y)
equal(x,y) ==
atom y => x = y
equal(x, first y) or equal(x, rest y)