aboutsummaryrefslogtreecommitdiff
path: root/src/interp/category.boot.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-10-28 10:43:54 +0000
committerdos-reis <gdr@axiomatics.org>2007-10-28 10:43:54 +0000
commit7b0b25d63ed483cc9ccd9525b5904feda65dc807 (patch)
treefd2d98a0ead1cd14865a6e065bcefb93775de970 /src/interp/category.boot.pamphlet
parent471d0186fa938e05f69b26dd209544de721de94d (diff)
downloadopen-axiom-7b0b25d63ed483cc9ccd9525b5904feda65dc807.tar.gz
* Makefile.pamphlet (category.$(FASLEXT)): New rule.
(<<category.clisp>>): Remove. * category.boot.pamphlet: Push into package "BOOT". Replace ASSOC with assoc throughout. (mkCategory): Fix syntax. * i-coerce.boot.pamphlet (stripUnionTags): Move to g-util.boot. (isTaggeUnion): Likewise. (getUnionOrRecordTags): Likewise. * i-util.boot.pamphlet (wrap): Move to i-object.boot. (isWrapped): Likewise. (unwrap): Likewise. (wrapped2Quote): Likewise. (quote2Wrapped): Likewise. (removeQuote): Likewise. (TruthP): Move to g-util.boot.
Diffstat (limited to 'src/interp/category.boot.pamphlet')
-rw-r--r--src/interp/category.boot.pamphlet49
1 files changed, 26 insertions, 23 deletions
diff --git a/src/interp/category.boot.pamphlet b/src/interp/category.boot.pamphlet
index 0dfa2b45..5da2cc25 100644
--- a/src/interp/category.boot.pamphlet
+++ b/src/interp/category.boot.pamphlet
@@ -32,21 +32,21 @@ mkCategory(domainOrPackage,sigList,attList,domList,PrincipalAncestor) ==
else s for s in sigList]
NewLocals:= nil
for s in sigList repeat
- ((NewLocals:= union(NewLocals,Prepare CADAR s)) where
- Prepare u == "union"/[Prepare2 v for v in u]) where
- Prepare2 v ==
- v is "$" => nil
- STRINGP v => nil
- atom v => [v]
- MEMQ(first v,$PrimitiveDomainNames) => nil
- --This variable is set in INIT LISP
- --It is a list of all the domains that we need not cache
- v is ["Union",:w] =>
- "union"/[Prepare2 x for x in stripUnionTags w]
- v is ["Mapping",:w] => "union"/[Prepare2 x for x in w]
- v is ["List",w] => Prepare2 w
- v is ["Record",.,:w] => "union"/[Prepare2 CADDR x for x in w]
- [v]
+ NewLocals:= union(NewLocals,Prepare CADAR s) where
+ Prepare u == "union"/[Prepare2 v for v in u]
+ Prepare2 v ==
+ v is "$" => nil
+ STRINGP v => nil
+ atom v => [v]
+ MEMQ(first v,$PrimitiveDomainNames) => nil
+ --This variable is set in INIT LISP
+ --It is a list of all the domains that we need not cache
+ v is ["Union",:w] =>
+ "union"/[Prepare2 x for x in stripUnionTags w]
+ v is ["Mapping",:w] => "union"/[Prepare2 x for x in w]
+ v is ["List",w] => Prepare2 w
+ v is ["Record",.,:w] => "union"/[Prepare2 CADDR x for x in w]
+ [v]
OldLocals:= nil
if PrincipalAncestor then for u in (OldLocals:= CADDR PrincipalAncestor.4)
repeat NewLocals:= delete(first u,NewLocals)
@@ -163,6 +163,9 @@ copy.
@
<<*>>=
<<license>>
+
+import '"g-util"
+)package "BOOT"
-- Functions for building categories
@@ -225,7 +228,7 @@ SigListUnion(extra,original) ==
not MachineLevelSubsume(QCAR e,QCAR x) =>
--systemError '"Source level subsumption not implemented"
original:= [e,:original]
- return() -- this exits from the innermost for loop
+ return nil -- this exits from the innermost for loop
original:= delete(x,original)
[xsig,xpred,:ximplem]:= x
-- if xsig ^= esig then -- not quite strong enough
@@ -359,8 +362,8 @@ SourceLevelSubset(a,b) ==
$noSubsumption=true => false
b is ["Union",:blist] and member(a,blist) => true
BOUNDP '$noSubsets and $noSubsets => false
- atom b and ASSOC(a,GETL(b,"Subsets")) => true
- a is [a1] and b is [b1] and ASSOC(a1,GETL(b1,"Subsets")) => true
+ atom b and assoc(a,GETL(b,"Subsets")) => true
+ a is [a1] and b is [b1] and assoc(a1,GETL(b1,"Subsets")) => true
nil
MachineLevelSubsume([name1,[out1,:in1],:flag1],[name2,[out2,:in2],:flag2]) ==
@@ -377,8 +380,8 @@ MachineLevelSubset(a,b) ==
b is ["Union",:blist] and member(a,blist) and
(and/[STRINGP x for x in blist | x^=a]) => true
--all other branches must be distinct objects
- atom b and ASSOC(a,GETL(b,"Subsets")) => true
- a is [a1] and b is [b1] and ASSOC(a1,GETL(b1,"Subsets")) => true
+ atom b and assoc(a,GETL(b,"Subsets")) => true
+ a is [a1] and b is [b1] and assoc(a1,GETL(b1,"Subsets")) => true
--we assume all subsets are true at the machine level
nil
@@ -444,7 +447,7 @@ DescendantP(a,b) ==
a is ["SIGNATURE",:.] => nil
a:= CatEval a
b is ["ATTRIBUTE",b'] =>
- (l:=ASSOC(b',a.2)) => TruthP CADR l
+ (l:=assoc(b',a.2)) => TruthP CADR l
member(b,first a.4) => true
AncestorP(b,[first u for u in CADR a.4]) => true
nil
@@ -501,7 +504,7 @@ JoinInner(l,$e) ==
bname:= b.(0)
CondAncestorP(bname,FundamentalAncestors,condition) => nil
(f:=AncestorP(bname,[first u for u in FundamentalAncestors])) =>
- [.,.,index]:=ASSOC(f,FundamentalAncestors)
+ [.,.,index]:=assoc(f,FundamentalAncestors)
FundamentalAncestors:=[[bname,condition,index],:FundamentalAncestors]
PrinAncb:= first (CatEval bname).(4)
--Principal Ancestors of b
@@ -577,7 +580,7 @@ JoinInner(l,$e) ==
for b in CondList repeat
newpred:= first rest b
for u in (first b).2 repeat
- v:= ASSOC(first u,attl)
+ v:= assoc(first u,attl)
null v =>
attl:=
CADR u=true => [[first u,newpred],:attl]