diff options
author | dos-reis <gdr@axiomatics.org> | 2008-05-09 14:50:06 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-05-09 14:50:06 +0000 |
commit | 2e3759ab9fa0e0962408ddf39f88f892f0fed1de (patch) | |
tree | 40ac6bb417681037e89b15c9797c41539342ccb6 /src/interp | |
parent | 9a48778ee366536ba772e3c23b1e95ef63af6c5a (diff) | |
download | open-axiom-2e3759ab9fa0e0962408ddf39f88f892f0fed1de.tar.gz |
* interp/c-util.boot: Remove Old Boot semantics.
* interp/database.boot: Likewise.
* interp/format.boot: Likewise.
* interp/g-timer.boot: Likewise.
* interp/i-analy.boot: Likewise.
* interp/i-coerce.boot: Likewise.
* interp/i-coerfn.boot: Likewise.
* interp/i-eval.boot: Likewise.
* interp/i-intern.boot: Likewise.
* interp/i-output.boot: Likewise.
* interp/i-resolv.boot: Likewise.
* interp/i-spec1.boot: Likewise.
* interp/i-syscmd.boot: Likewise.
* interp/msgdb.boot: Likewise.
* interp/newfort.boot: Likewise.
* boot/includer.boot (diagnosticLocation): New.
* boot/ast.boot (bfReName): Use it.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/Makefile.in | 38 | ||||
-rw-r--r-- | src/interp/Makefile.pamphlet | 38 | ||||
-rw-r--r-- | src/interp/c-util.boot | 2 | ||||
-rw-r--r-- | src/interp/database.boot | 2 | ||||
-rw-r--r-- | src/interp/format.boot | 20 | ||||
-rw-r--r-- | src/interp/g-timer.boot | 10 | ||||
-rw-r--r-- | src/interp/i-analy.boot | 4 | ||||
-rw-r--r-- | src/interp/i-coerce.boot | 14 | ||||
-rw-r--r-- | src/interp/i-coerfn.boot | 10 | ||||
-rw-r--r-- | src/interp/i-eval.boot | 2 | ||||
-rw-r--r-- | src/interp/i-intern.boot | 2 | ||||
-rw-r--r-- | src/interp/i-output.boot | 8 | ||||
-rw-r--r-- | src/interp/i-resolv.boot | 6 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 16 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 2 | ||||
-rw-r--r-- | src/interp/msgdb.boot | 62 | ||||
-rw-r--r-- | src/interp/newfort.boot | 2 |
17 files changed, 119 insertions, 119 deletions
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index 5b4c985d..fa1cd3e5 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -273,7 +273,7 @@ alql.$(FASLEXT): alql.boot br-search.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< br-search.$(FASLEXT): br-search.boot bc-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< br-saturn.$(FASLEXT): br-saturn.boot bc-util.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -346,43 +346,43 @@ int-top.$(FASLEXT): int-top.boot incl.$(FASLEXT) i-toplev.$(FASLEXT) \ $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-toplev.$(FASLEXT): i-toplev.boot i-analy.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-syscmd.$(FASLEXT): i-syscmd.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-output.$(FASLEXT): i-output.boot sys-macros.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-spec2.$(FASLEXT): i-spec2.boot i-spec1.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-spec1.$(FASLEXT): i-spec1.boot i-analy.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-funsel.$(FASLEXT): i-funsel.boot i-coerfn.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-map.$(FASLEXT): i-map.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-eval.$(FASLEXT): i-eval.boot i-analy.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-coerfn.$(FASLEXT): i-coerfn.boot i-coerce.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-coerce.$(FASLEXT): i-coerce.boot i-analy.$(FASLEXT) i-resolv.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-resolv.$(FASLEXT): i-resolv.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-analy.$(FASLEXT): i-analy.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-intern.$(FASLEXT): i-intern.boot i-object.$(FASLEXT) ptrees.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-code.$(FASLEXT): i-code.boot i-object.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -394,7 +394,7 @@ i-util.$(FASLEXT): i-util.boot g-util.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< format.$(FASLEXT): format.boot macros.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< match.$(FASLEXT): match.boot sys-macros.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -449,7 +449,7 @@ package.$(FASLEXT): package.boot clam.$(FASLEXT) database.$(FASLEXT): database.boot clam.$(FASLEXT) nlib.$(FASLEXT) \ cattable.$(FASLEXT) compat.$(FASLEXT) g-cndata.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< functor.$(FASLEXT): functor.boot category.$(FASLEXT) c-util.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -671,10 +671,10 @@ g-opt.$(FASLEXT): g-opt.boot def.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< g-timer.$(FASLEXT): g-timer.boot macros.$(FASLEXT) g-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< msgdb.$(FASLEXT): msgdb.boot g-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< g-boot.$(FASLEXT): g-boot.boot def.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -683,7 +683,7 @@ g-error.$(FASLEXT): g-error.boot diagnostics.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< c-util.$(FASLEXT): c-util.boot g-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< pathname.$(FASLEXT): pathname.boot nlib.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 461b0f66..46ef06d6 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -575,7 +575,7 @@ alql.$(FASLEXT): alql.boot br-search.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< br-search.$(FASLEXT): br-search.boot bc-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< br-saturn.$(FASLEXT): br-saturn.boot bc-util.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -648,43 +648,43 @@ int-top.$(FASLEXT): int-top.boot incl.$(FASLEXT) i-toplev.$(FASLEXT) \ $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-toplev.$(FASLEXT): i-toplev.boot i-analy.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-syscmd.$(FASLEXT): i-syscmd.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-output.$(FASLEXT): i-output.boot sys-macros.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-spec2.$(FASLEXT): i-spec2.boot i-spec1.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-spec1.$(FASLEXT): i-spec1.boot i-analy.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-funsel.$(FASLEXT): i-funsel.boot i-coerfn.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-map.$(FASLEXT): i-map.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-eval.$(FASLEXT): i-eval.boot i-analy.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-coerfn.$(FASLEXT): i-coerfn.boot i-coerce.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-coerce.$(FASLEXT): i-coerce.boot i-analy.$(FASLEXT) i-resolv.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-resolv.$(FASLEXT): i-resolv.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-analy.$(FASLEXT): i-analy.boot i-object.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-intern.$(FASLEXT): i-intern.boot i-object.$(FASLEXT) ptrees.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< i-code.$(FASLEXT): i-code.boot i-object.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -696,7 +696,7 @@ i-util.$(FASLEXT): i-util.boot g-util.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< format.$(FASLEXT): format.boot macros.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< match.$(FASLEXT): match.boot sys-macros.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -751,7 +751,7 @@ package.$(FASLEXT): package.boot clam.$(FASLEXT) database.$(FASLEXT): database.boot clam.$(FASLEXT) nlib.$(FASLEXT) \ cattable.$(FASLEXT) compat.$(FASLEXT) g-cndata.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< functor.$(FASLEXT): functor.boot category.$(FASLEXT) c-util.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -973,10 +973,10 @@ g-opt.$(FASLEXT): g-opt.boot def.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< g-timer.$(FASLEXT): g-timer.boot macros.$(FASLEXT) g-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< msgdb.$(FASLEXT): msgdb.boot g-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< g-boot.$(FASLEXT): g-boot.boot def.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< @@ -985,7 +985,7 @@ g-error.$(FASLEXT): g-error.boot diagnostics.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< c-util.$(FASLEXT): c-util.boot g-util.$(FASLEXT) - $(BOOTSYS) --compile --boot="old" --output=$@ --load-directory=. $< + $(BOOTSYS) --compile --output=$@ --load-directory=. $< pathname.$(FASLEXT): pathname.boot nlib.$(FASLEXT) $(BOOTSYS) --compile --output=$@ --load-directory=. $< diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 4e860c08..941f24fb 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -548,7 +548,7 @@ pmatchWithSl(s,p,al) == elapsedTime() == currentTime:= TEMPUS_-FUGIT() - elapsedSeconds:= (currentTime-$previousTime)*1.0/$timerTicksPerSecond + elapsedSeconds:= (currentTime-$previousTime)*QUOTIENT(1.0,$timerTicksPerSecond) $previousTime:= currentTime elapsedSeconds diff --git a/src/interp/database.boot b/src/interp/database.boot index fb2e6bf5..d2dd49a4 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -174,7 +174,7 @@ augmentLisplibModemapsFromFunctor(form,opAlist,signature) == nonCategorySigAlist:= mkAlistOfExplicitCategoryOps first signature or return nil for (entry:= [[op,sig,:.],pred,sel]) in opAlist | - or/[(sig in catSig) for catSig in + or/[member(sig,catSig) for catSig in allLASSOCs(op,nonCategorySigAlist)] repeat skip:= argl and CONTAINED("$",rest sig) => 'SKIP diff --git a/src/interp/format.boot b/src/interp/format.boot index 3144410e..c807bffc 100644 --- a/src/interp/format.boot +++ b/src/interp/format.boot @@ -135,9 +135,9 @@ formatModemap modemap == target:= substInOrder(alist,target) sl:= substInOrder(alist,sl) else if removeIsDomainD pred is [D,npred] then - pred := SUBST(D,'D,npred) - target := SUBST(D,'D,target) - sl := SUBST(D,'D,sl) + pred := substitute(D,'D,npred) + target := substitute(D,'D,target) + sl := substitute(D,'D,sl) predPart:= formatIf pred targetPart:= prefix2String target argTypeList:= @@ -167,7 +167,7 @@ formatModemap modemap == concat(firstPart,'%l,predPart) substInOrder(alist,x) == - alist is [[a,:b],:y] => substInOrder(y,SUBST(b,a,x)) + alist is [[a,:b],:y] => substInOrder(y,substitute(b,a,x)) x reportOpSymbol op1 == @@ -246,7 +246,7 @@ formatOpSymbol(op,sig) == [quad,".",sel] [quad,".",quad] op - STRINGP op or GET(op,"Led") or GET(op,"Nud") => + STRINGP op or GETL(op,"Led") or GETL(op,"Nud") => n = 3 => if op = 'SEGMENT then op := '".." op = 'in => [quad,'" ",op,'" ",quad] @@ -255,7 +255,7 @@ formatOpSymbol(op,sig) == op = 'exquo => op [quad,op,quad] n = 2 => - not GET(op,"Nud") => [quad,op] + not GETL(op,"Nud") => [quad,op] [op,quad] op op @@ -534,13 +534,13 @@ formIterator2String x == tuple2String argl == null argl => nil string := first argl - if string in '("failed" "nil" "prime" "sqfr" "irred") + if member(string, '("failed" "nil" "prime" "sqfr" "irred")) then string := STRCONC('"_"",string,'"_"") else string := ATOM string => object2String string [f x for x in string] for x in rest argl repeat - if x in '("failed" "nil" "prime" "sqfr" "irred") then + if member(x,'("failed" "nil" "prime" "sqfr" "irred")) then x := STRCONC('"_"",x,'"_"") string:= concat(string,concat(",",f x)) string @@ -671,7 +671,7 @@ plural(n,string) == formatIf pred == not pred => nil - pred in '(T (QUOTE T)) => nil + member(pred,'(T (QUOTE T))) => nil concat('%b,'"if",'%d,pred2English pred) formatPredParts s == @@ -680,7 +680,7 @@ formatPredParts s == s is ['devaluate,s1] => formatPredParts s1 s is ['getDomainView,s1,.] => formatPredParts s1 s is ['SUBST,a,b,c] => -- this is a signature - s1 := formatPredParts SUBST(formatPredParts a,b,c) + s1 := formatPredParts substitute(formatPredParts a,b,c) s1 isnt [fun,sig] => s1 ['SIGNATURE,fun,[formatPredParts(r) for r in sig]] s diff --git a/src/interp/g-timer.boot b/src/interp/g-timer.boot index 8e3dee73..8b00c522 100644 --- a/src/interp/g-timer.boot +++ b/src/interp/g-timer.boot @@ -102,8 +102,8 @@ normalizeStatAndStringify t == INTP t => K := 1024 M := K*K - t > 9*M => CONCAT(STRINGIMAGE((t + 512*K)/M), '"M") - t > 9*K => CONCAT(STRINGIMAGE((t + 512)/K), '"K") + t > 9*M => CONCAT(STRINGIMAGE QUOTIENT(t + 512*K,M), '"M") + t > 9*K => CONCAT(STRINGIMAGE QUOTIENT(t + 512,K), '"K") STRINGIMAGE t STRINGIMAGE t @@ -114,7 +114,7 @@ significantStat t == roundStat t == not RNUMP t => t - (FIX (0.5 + t * 1000.0)) / 1000.0 + QUOTIENT(FIX (0.5 + t * 1000.0), 1000.0) makeStatString(oldstr,time,abb,flag) == time = '"" => oldstr @@ -224,9 +224,9 @@ computeElapsedTime() == currentGCTime:= elapsedGcTime() gcDelta := currentGCTime - $oldElapsedGCTime elapsedSeconds:= - 1.*(currentTime-$oldElapsedTime-gcDelta)/$timerTicksPerSecond + 1.* QUOTIENT(currentTime-$oldElapsedTime-gcDelta,$timerTicksPerSecond) PUT('gc, 'TimeTotal,GETL('gc,'TimeTotal) + - 1.*gcDelta/$timerTicksPerSecond) + 1.*QUOTIENT(gcDelta,$timerTicksPerSecond)) $oldElapsedTime := elapsedUserTime() $oldElapsedGCTime := elapsedGcTime() elapsedSeconds diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index 6825df75..ea19ccda 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -251,7 +251,7 @@ bottomUp t == -- If this is a type producing form, then we don't want -- to store the representation object in the environment. -- Rather, we want to record the reified canonical form. - if ms is [m] and (m in $LangSupportTypes or isCategoryForm(m,$e)) + if ms is [m] and (member(m,$LangSupportTypes) or isCategoryForm(m,$e)) then putValue(t,objNew(devaluate objValUnwrap getValue t, m)) -- given no target or package calling, force integer constants to @@ -627,7 +627,7 @@ sayIntelligentMessageAboutOpAvailability(opName, nArgs) == conceptualType: %Thing -> %List conceptualType type == isPartialMode type => $Mode - type in $LangSupportTypes => $Type + member(type,$LangSupportTypes) => $Type categoryForm?(type) => $Category $Domain diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index 2ab91994..c86ebf13 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -416,7 +416,7 @@ canCoerce1(t1,t2) == -- the result is NIL if it fails t1 = t2 => true absolutelyCanCoerceByCheating(t1,t2) or t1 = $None or t2 = $Any or - t1 in '((Mode) (Category)) => + member(t1,'((Mode) (Category))) => t2 = $OutputForm => true NIL -- next is for tagged union selectors for the time being @@ -460,8 +460,8 @@ canCoerce1(t1,t2) == arg and t:= last arg canCoerce(t1,t) and canCoerceByFunction(t,t2) and 'T - ans or (t1 in '((PositiveInteger) (NonNegativeInteger)) - and canCoerce($Integer,t2)) + ans or member(t1,'((PositiveInteger) (NonNegativeInteger))) + and canCoerce($Integer,t2) canCoerceFrom0(t1,t2) == -- top level test for coercion, which transfers all RN, RF and RR into @@ -634,7 +634,7 @@ newCanCoerceCommute(t1,t2) == canCoercePermute(t1,t2) == -- try to generate a sequence of transpositions that will convert -- t1 into t2 - t2 in '((Integer) (OutputForm)) => NIL + member(t2,'((Integer) (OutputForm))) => NIL towers := computeTTTranspositions(t1,t2) -- at this point, CAR towers = t1 and last towers should be similar -- to t2 in the sense that the components of t1 are in the same order @@ -751,7 +751,7 @@ coerceInteractive(triple,t2) == t2 = '$NoValueMode => objNew(val,t2) if t2 is ['SubDomain,x,.] then t2:= x -- JHD added category Aug 1996 for BasicMath - t1 in $LangSupportTypes => + member(t1,$LangSupportTypes) => t2 = $OutputForm => objNew(val,t2) t1 = $Domain and conceptualType t2 = $Category and ofCategory(val,t2)=> objNew(val,t2) @@ -946,7 +946,7 @@ getSubDomainPredicate(tSuper, tSub, pred) == decl := ['_:, name, ['Mapping, $Boolean, tSuper]] interpret(decl, nil) arg := GENSYM() - pred' := SUBST(arg, "#1", pred) + pred' := substitute(arg, "#1", pred) defn := ['DEF, [name, arg], '(NIL NIL), '(NIL NIL), removeZeroOne pred'] interpret(defn, nil) op := mkAtree name @@ -1204,7 +1204,7 @@ coerceIntCommute(obj,target) == NIL coerceIntPermute(object,t2) == - t2 in '((Integer) (OutputForm)) => NIL + member(t2,'((Integer) (OutputForm))) => NIL t1 := objMode object towers := computeTTTranspositions(t1,t2) -- at this point, CAR towers = t1 and last towers should be similar diff --git a/src/interp/i-coerfn.boot b/src/interp/i-coerfn.boot index 4574d9a2..35e60dac 100644 --- a/src/interp/i-coerfn.boot +++ b/src/interp/i-coerfn.boot @@ -754,7 +754,7 @@ Mp2Expr(u,source is [mp,vars,S], target is [Expr,T]) == Mp2FR(u,S is [.,vl,R],[.,T]) == u = '_$fromCoerceable_$ => S ^= T => nil - R in '((Integer) (Fraction (Integer))) => true + member(R,'((Integer) (Fraction (Integer)))) => true nil S ^= T => coercionFailure() package := @@ -991,7 +991,7 @@ varsInPoly(u) == P2FR(u,S is [.,R],[.,T]) == u = '_$fromCoerceable_$ => S ^= T => nil - R in '((Integer) (Fraction (Integer))) => true + member(R,'((Integer) (Fraction (Integer)))) => true nil S ^= T => coercionFailure() package := @@ -1144,10 +1144,10 @@ Qf2F(u,source is [.,D,:.],target) == coercionFailure() [.,:den']:= coerceInt(objNewWrap(den,D),target) or coercionFailure() - (unwrap num') * 1.0 / (unwrap den') + (unwrap num') * QUOTIENT(1.0, unwrap den') Rn2F(rnum, source, target) == - float(CAR(rnum)/CDR(rnum)) + float QUOTIENT(CAR rnum, CDR rnum) -- next function is needed in RN algebra code --Rn2F([a,:b],source,target) == @@ -1421,7 +1421,7 @@ Up2Expr(u,source is [up,var,S], target is [Expr,T]) == Up2FR(u,S is [.,x,R],target is [.,T]) == u = '_$fromCoerceable_$ => S ^= T => nil - R in '((Integer) (Fraction (Integer))) => true + member(R,'((Integer) (Fraction (Integer)))) => true nil S ^= T => coercionFailure() package := diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot index 574cbcb0..eed39efe 100644 --- a/src/interp/i-eval.boot +++ b/src/interp/i-eval.boot @@ -163,7 +163,7 @@ evaluateFormAsType form == form is [op,:args] and constructor? op => evaluateType1 form t := mkAtree form -- ??? Maybe we should be more careful about generalized types. - bottomUp t is [m] and (m in $LangSupportTypes or isCategoryForm(m,$e)) => + bottomUp t is [m] and (member(m,$LangSupportTypes) or isCategoryForm(m,$e)) => objVal getValue t throwEvalTypeMsg("S2IE0004",[form]) diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot index 7a373563..fc2c8145 100644 --- a/src/interp/i-intern.boot +++ b/src/interp/i-intern.boot @@ -454,7 +454,7 @@ rempropI(x,prop) == $InteractiveFrame:= remprop(id,prop,$InteractiveFrame) remprop(x,prop,e) == - u:= ASSOC(prop,pl:= getProplist(x,e)) => + u:= assoc(prop,pl:= getProplist(x,e)) => e:= addBinding(x,DELASC(first u,pl),e) e e diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index 20f15757..e79da786 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -312,7 +312,7 @@ sayMath u == --% Output transformations outputTran x == - x in '("failed" "nil" "prime" "sqfr" "irred") => + member(x,'("failed" "nil" "prime" "sqfr" "irred")) => STRCONC('"_"",x,'"_"") STRINGP x => x VECP x => @@ -436,7 +436,7 @@ outputTran x == -- without stack overflow. MCD. flattenOps l == [op, :args ] := l - op in ['"+",'"*","+","*"] => + member(op,['"+",'"*","+","*"]) => [op,:checkArgs(op,args)] l @@ -1382,7 +1382,7 @@ output(expr,domain) == if $texFormat then texFormat expr if $mathmlFormat then mathmlFormat expr if $algebraFormat then mathprintWithNumber expr - categoryForm? domain or domain in '((Mode) (Domain) (Type)) => + categoryForm? domain or member(domain,'((Mode) (Domain) (Type))) => if $algebraFormat then mathprintWithNumber outputDomainConstructor expr if $texFormat then @@ -1616,7 +1616,7 @@ charyMinus(u,v,start,linelength) == '" " charyBinary(d,u,v,start,linelength) == - d in '(" := " "= ") => + member(d,'(" := " "= ")) => charybdis(['CONCATB,v.1,d],start,linelength) charybdis(v.2,start+2,linelength-2) '" " diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot index 56561df3..7b8acc7f 100644 --- a/src/interp/i-resolv.boot +++ b/src/interp/i-resolv.boot @@ -363,7 +363,7 @@ resolveTCat(t,c) == rest(t) and (tc := resolveTCat1(t,c)) => tc -- now check some specific niladic categories - c in '((Field) (EuclideanDomain)) and ofCategory(t,'(IntegralDomain))=> + member(c,'((Field) (EuclideanDomain))) and ofCategory(t,'(IntegralDomain))=> eqType [$QuotientField, t] c = '(Field) and t = $Symbol => ['RationalFunction,$Integer] @@ -427,12 +427,12 @@ getConditionalCategoryOfType1(cat,conditions,match,seen) == conditions conditions cat is [catName,:.] and (getConstructorKindFromDB catName = "category") => - cat in CDR seen => conditions + member(cat, CDR seen) => conditions RPLACD(seen,[cat,:CDR seen]) subCat := getConstructorCategoryFromDB catName -- substitute vars of cat into category for v in rest cat for vv in $TriangleVariableList repeat - subCat := SUBST(v,vv,subCat) + subCat := substitute(v,vv,subCat) getConditionalCategoryOfType1(subCat,conditions,match,seen) conditions diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index f3bbb54d..3679d1be 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -254,10 +254,11 @@ upand x == putTarget(term1,$Boolean) putTarget(term2,$Boolean) ms := bottomUp term1 - ms isnt [=$Boolean] => nil + ms isnt [=$Boolean] => nil -- use general modemap $genValue => - BooleanEquality(objValUnwrap(getValue term1), - getConstantFromDomain('(false),$Boolean)) => + -- ??? we should find a way to check whether the + -- ??? the type of the second operand matters or not. + not objValUnwrap(getValue term1) => -- first operand is `false' putValue(x,getValue term1) putModeSet(x,ms) -- first term is true, so look at the second one @@ -267,7 +268,7 @@ upand x == putModeSet(x,ms) ms := bottomUp term2 - ms isnt [=$Boolean] => nil + ms isnt [=$Boolean] => nil -- use general modemap -- generate an IF expression and let the rest of the code handle it -- ??? In full generality, this is still incorrect. We should be -- ??? looking up modemaps to see whether the interpretation is @@ -290,8 +291,7 @@ upor x == ms := bottomUp term1 ms isnt [=$Boolean] => nil $genValue => - BooleanEquality(objValUnwrap(getValue term1), - getConstantFromDomain('(true),$Boolean)) => + objValUnwrap(getValue term1) => -- first operand is true, we are done. putValue(x,getValue term1) putModeSet(x,ms) -- first term is false, so look at the second one @@ -1041,7 +1041,7 @@ evalconstruct(op,l,m,tar) == replaceSymbols(modeList,l) == -- replaces symbol types with their corresponding polynomial types -- if not all type are symbols - not ($Symbol in modeList) => modeList + not member($Symbol,modeList) => modeList modeList is [a,:b] and and/[a=x for x in b] => modeList [if m=$Symbol then getMinimalVarMode(objValUnwrap(getValue arg), $declaredMode) else m for m in modeList for arg in l] @@ -1185,7 +1185,7 @@ isDomainValuedVariable form == get(form,'value,$InteractiveFrame) or _ (PAIRP($env) and get(form,'value,$env)) or _ (PAIRP($e) and get(form,'value,$e)))) and - ((m := objMode(val)) in '((Domain) (Category)) + (member(m := objMode(val),'((Domain) (Category))) or conceptualType m = $Category) => objValUnwrap(val) nil diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index f2c554e7..cd46b09b 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -983,7 +983,7 @@ interpFunctionDepAlists() == fixObjectForPrinting(v) == v' := object2Identifier v EQ(v',"%") => '"\%" - v' in $msgdbPrims => STRCONC('"\",PNAME v') + member(v',$msgdbPrims) => STRCONC('"\",PNAME v') v displayProperties(option,l) == diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot index f1defd1f..5af024b8 100644 --- a/src/interp/msgdb.boot +++ b/src/interp/msgdb.boot @@ -121,15 +121,15 @@ segmentedMsgPreprocess x == ATOM x => x [head,:tail] := x center := rightJust := NIL - if head in '(%ceon "%ceon") then center := true - if head in '(%rjon "%rjon") then rightJust := true + if member(head, '(%ceon "%ceon")) then center := true + if member(head, '(%rjon "%rjon")) then rightJust := true center or rightJust => -- start collecting terms y := NIL ok := true while tail and ok repeat [t,:tail] := tail - t in '(%ceoff "%ceoff" %rjoff "%rjoff") => ok := NIL + member(t, '(%ceoff "%ceoff" %rjoff "%rjoff")) => ok := NIL y := CONS(segmentedMsgPreprocess t,y) head1 := [(center => '"%ce"; '"%rj"),:NREVERSE y] NULL tail => [head1] @@ -235,8 +235,8 @@ addBlanks msg == msg1 := LIST x blank := '" " for y in rest msg repeat - y in '("%n" %n) => blanksOff := true - y in '("%y" %y) => blanksOff := false + member(y,'("%n" %n)) => blanksOff := true + member(y,'("%y" %y)) => blanksOff := false if noBlankAfterP x or noBlankBeforeP y or blanksOff then msg1 := [y,:msg1] else @@ -253,11 +253,11 @@ SETANDFILEQ($msgdbListPrims,'(%m %s %ce %rj "%m" "%s" "%ce" "%rj")) noBlankBeforeP word== INTP word => false - word in $msgdbNoBlanksBeforeGroup => true + member(word,$msgdbNoBlanksBeforeGroup) => true if CVECP word and SIZE word > 1 then word.0 = char '% and word.1 = char 'x => return true word.0 = char " " => return true - (PAIRP word) and (CAR word in $msgdbListPrims) => true + (PAIRP word) and member(CAR word,$msgdbListPrims) => true false $msgdbPunct := '(_[ _( "[" "(" ) @@ -266,11 +266,11 @@ SETANDFILEQ($msgdbNoBlanksAfterGroup,['" ", " ",'"%" ,"%",_ noBlankAfterP word== INTP word => false - word in $msgdbNoBlanksAfterGroup => true + member(word,$msgdbNoBlanksAfterGroup) => true if CVECP word and (s := SIZE word) > 1 then word.0 = char '% and word.1 = char 'x => return true word.(s-1) = char " " => return true - (PAIRP word) and (CAR word in $msgdbListPrims) => true + (PAIRP word) and member(CAR word, $msgdbListPrims) => true false cleanUpSegmentedMsg msg == @@ -284,10 +284,10 @@ cleanUpSegmentedMsg msg == "%b" "%d" "%l" "%i" "%m" "%u" "%ce" "%rj") msg1 := NIL for x in msg repeat - if haveBlank and ((x in blanks) or (x in prims)) then + if haveBlank and (member(x,blanks) or member(x,prims)) then msg1 := CDR msg1 msg1 := cons(x,msg1) - haveBlank := (x in blanks => true; NIL) + haveBlank := (member(x,blanks) => true; NIL) msg1 operationLink name == @@ -469,7 +469,7 @@ queryUserKeyedMsg(key,args) == -- display message and return reply conStream := DEFIOSTREAM ('((DEVICE . CONSOLE) (MODE . INPUT)),120,0) sayKeyedMsg(key,args) - ans := READ_-LINE conStream + ans := read_-line conStream SHUT conStream ans @@ -477,7 +477,7 @@ flowSegmentedMsg(msg, len, offset) == -- tries to break a sayBrightly-type input msg into multiple -- lines, with offset and given length. -- msgs that are entirely centered or right justified are not flowed - msg is [[ce,:.]] and ce in '(%ce "%ce" %rj "%rj") => msg + msg is [[ce,:.]] and member(ce, '(%ce "%ce" %rj "%rj")) => msg -- if we are formatting latex, then we assume -- that nothing needs to be done @@ -494,23 +494,23 @@ flowSegmentedMsg(msg, len, offset) == PAIRP msg => lnl := offset - if msg is [a,:.] and a in '(%b %d _ "%b" "%d" " ") then + if msg is [a,:.] and member(a,'(%b %d _ "%b" "%d" " ")) then nl := [off1] lnl := lnl - 1 else nl := [off] for f in msg repeat - f in '("%l" %l) => + member(f,'("%l" %l)) => actualMarg := potentialMarg if lnl = 99999 then nl := ['%l,:nl] lnl := 99999 - PAIRP(f) and CAR(f) in '("%m" %m '%ce "%ce" %rj "%rj") => + PAIRP(f) and member(CAR(f),'("%m" %m '%ce "%ce" %rj "%rj")) => actualMarg := potentialMarg nl := [f,'%l,:nl] lnl := 199999 - f in '("%i" %i ) => + member(f,'("%i" %i )) => potentialMarg := potentialMarg + 3 nl := [f,:nl] - PAIRP(f) and CAR(f) in '("%t" %t) => + PAIRP(f) and member(CAR(f),'("%t" %t)) => potentialMarg := potentialMarg + CDR f nl := [f,:nl] sbl := sayBrightlyLength f @@ -524,7 +524,7 @@ flowSegmentedMsg(msg, len, offset) == nl := [f,:nl] lnl := lnl + sbl else - f in '(%b %d _ "%b" "%d" " ") => + member(f,'(%b %d _ "%b" "%d" " ")) => nl := [f,off1,'%l,:nl] actualMarg := potentialMarg lnl := -1 + offset + sbl @@ -571,8 +571,8 @@ bright x == ['"%b",:(PAIRP(x) and NULL CDR LASTNODE x => x; [x]),'"%d"] --bright x == ['%b,:(ATOM x => [x]; x),'%d] mkMessage msg == - msg and (PAIRP msg) and ((first msg) in '(%l "%l")) and - ((last msg) in '(%l "%l")) => concat msg + msg and (PAIRP msg) and member((first msg),'(%l "%l")) and + member((last msg),'(%l "%l")) => concat msg concat('%l,msg,'%l) sayMessage msg == sayMSG mkMessage msg @@ -711,7 +711,7 @@ blankIndicator x == nil brightPrint1 x == - if x in '(%l "%l") then sayNewLine() + if member(x,'(%l "%l")) then sayNewLine() else if STRINGP x then sayString x else brightPrintHighlight x NIL @@ -728,7 +728,7 @@ brightPrintHighlight x == [key,:rst] := x if IDENTP key then key:=PNAME key key = '"%m" => mathprint rst - key in '("%p" "%s") => PRETTYPRIN0 rst + member(key,'("%p" "%s")) => PRETTYPRIN0 rst key = '"%ce" => brightPrintCenter rst key = '"%rj" => brightPrintRightJustify rst key = '"%t" => $MARG := $MARG + tabber rst @@ -791,7 +791,7 @@ brightPrintCenter x == y := NIL ok := true while x and ok repeat - if CAR(x) in '(%l "%l") then ok := NIL + if member(CAR(x),'(%l "%l")) then ok := NIL else y := cons(CAR x, y) x := CDR x y := NREVERSE y @@ -838,7 +838,7 @@ brightPrintRightJustify x == y := NIL ok := true while x and ok repeat - if CAR(x) in '(%l "%l") then ok := NIL + if member(CAR(x),'(%l "%l")) then ok := NIL else y := cons(CAR x, y) x := CDR x y := NREVERSE y @@ -900,7 +900,7 @@ sayAsManyPerLineAsPossible l == if str ^= '"" then sayMSG str NIL -say2PerLine l == say2PerLineWidth(l,$LINELENGTH / 2) +say2PerLine l == say2PerLineWidth(l, QUOTIENT($LINELENGTH,2)) say2PerLineWidth(l,n) == [short,long] := say2Split(l,nil,nil,n) @@ -922,7 +922,7 @@ sayLongOperation x == sayBrightly x splitListOn(x,key) == - key in x => + member(key,x) => while first x ^= key repeat y:= [first x,:y] x:= rest x @@ -933,7 +933,7 @@ say2PerLineThatFit l == while l repeat sayBrightlyNT first l sayBrightlyNT - fillerSpaces((($LINELENGTH/2)-sayDisplayWidth first l),'" ") + fillerSpaces((QUOTIENT($LINELENGTH,2)-sayDisplayWidth first l),'" ") (l:= rest l) => sayBrightlyNT first l l:= rest l @@ -947,7 +947,7 @@ sayDisplayStringWidth x == sayDisplayWidth x == PAIRP x => +/[fn y for y in x] where fn y == - y in '(%b %d "%b" "%d") or y=$quadSymbol => 1 + member(y,'(%b %d "%b" "%d")) or y=$quadSymbol => 1 k := blankIndicator y => k sayDisplayWidth y x = "%%" or x = '"%%" => 1 @@ -964,7 +964,7 @@ pp2Cols(al) == ppPair(abb,name) if canFit2ndEntry(name,al) then [[abb,:name],:al]:= al - TAB ($LINELENGTH / 2) + TAB QUOTIENT($LINELENGTH,2) ppPair(abb,name) sayNewLine() nil @@ -973,7 +973,7 @@ ppPair(abb,name) == sayBrightlyNT [:bright abb,fillerSpaces(8-entryWidth abb," "),name] canFit2ndEntry(name,al) == - wid := ($LINELENGTH/2) - 10 + wid := QUOTIENT($LINELENGTH,2) - 10 null al => nil entryWidth name > wid => nil entryWidth CDAR al > wid => nil diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot index d4bbf6b6..a83d2381 100644 --- a/src/interp/newfort.boot +++ b/src/interp/newfort.boot @@ -121,7 +121,7 @@ exp2Fort2(e,prec,oldOp) == nprec := unaryPrecs.p s := [:exp2Fort2(first args,nprec,op),op] op = '"-" and atom first args => s - op = oldOp and op in ['"*",'"+"] => s + op = oldOp and member(op,['"*",'"+"]) => s nprec <= prec => ['")",:s,'"("] s exp2FortFn(op,args,nargs) |