aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-04-30 18:55:21 +0000
committerdos-reis <gdr@axiomatics.org>2011-04-30 18:55:21 +0000
commit42cf0984b569e49060252e536c0c7e7aee469873 (patch)
treec2cb31c68df04f75bfd9a490ae10b9c6cf795102
parent5770442f576aa0c1e389344a636f1e4edca1b136 (diff)
downloadopen-axiom-42cf0984b569e49060252e536c0c7e7aee469873.tar.gz
* More cleanup
-rw-r--r--src/interp/as.boot9
-rw-r--r--src/interp/bc-misc.boot2
-rw-r--r--src/interp/br-con.boot2
-rw-r--r--src/interp/br-saturn.boot8
-rw-r--r--src/interp/br-search.boot2
-rw-r--r--src/interp/br-util.boot4
-rw-r--r--src/interp/c-doc.boot8
-rw-r--r--src/interp/c-util.boot4
-rw-r--r--src/interp/category.boot2
-rw-r--r--src/interp/cattable.boot4
-rw-r--r--src/interp/clammed.boot30
-rw-r--r--src/interp/construc.lisp2
-rw-r--r--src/interp/daase.lisp2
-rw-r--r--src/interp/database.boot20
-rw-r--r--src/interp/debug.lisp6
-rw-r--r--src/interp/define.boot8
-rw-r--r--src/interp/format.boot44
-rw-r--r--src/interp/fortcall.boot10
-rw-r--r--src/interp/functor.boot8
-rw-r--r--src/interp/g-cndata.boot14
-rw-r--r--src/interp/g-error.boot4
-rw-r--r--src/interp/g-timer.boot28
-rw-r--r--src/interp/g-util.boot24
-rw-r--r--src/interp/i-analy.boot94
-rw-r--r--src/interp/i-coerce.boot326
-rw-r--r--src/interp/i-coerfn.boot20
-rw-r--r--src/interp/i-eval.boot16
-rw-r--r--src/interp/i-intern.boot26
-rw-r--r--src/interp/i-map.boot34
-rw-r--r--src/interp/i-object.boot16
-rw-r--r--src/interp/i-output.boot20
-rw-r--r--src/interp/i-resolv.boot132
-rw-r--r--src/interp/i-special.boot178
-rw-r--r--src/interp/i-syscmd.boot282
-rw-r--r--src/interp/i-toplev.boot42
-rw-r--r--src/interp/i-util.boot6
-rw-r--r--src/interp/incl.boot6
-rw-r--r--src/interp/int-top.boot6
-rw-r--r--src/interp/interop.boot2
-rw-r--r--src/interp/lisplib.boot98
-rw-r--r--src/interp/macex.boot4
-rw-r--r--src/interp/macros.lisp4
-rw-r--r--src/interp/match.boot4
-rw-r--r--src/interp/modemap.boot2
-rw-r--r--src/interp/msg.boot20
-rw-r--r--src/interp/msgdb.boot66
-rw-r--r--src/interp/newfort.boot32
-rw-r--r--src/interp/nruncomp.boot6
-rw-r--r--src/interp/nrunfast.boot8
-rw-r--r--src/interp/pathname.boot14
-rw-r--r--src/interp/postpar.boot2
-rw-r--r--src/interp/preparse.lisp10
-rw-r--r--src/interp/scan.boot2
-rw-r--r--src/interp/server.boot6
-rw-r--r--src/interp/setvars.boot130
-rw-r--r--src/interp/setvart.boot2
-rw-r--r--src/interp/simpbool.boot2
-rw-r--r--src/interp/slam.boot8
-rw-r--r--src/interp/sys-macros.lisp12
-rw-r--r--src/interp/termrw.boot22
-rw-r--r--src/interp/trace.boot58
-rw-r--r--src/interp/union.lisp26
-rw-r--r--src/interp/vmlisp.lisp7
-rw-r--r--src/interp/word.boot14
64 files changed, 1002 insertions, 1008 deletions
diff --git a/src/interp/as.boot b/src/interp/as.boot
index f3522d20..f691cfec 100644
--- a/src/interp/as.boot
+++ b/src/interp/as.boot
@@ -142,7 +142,8 @@ asMakeAlist con ==
if atom(form) then form:=[form]
kind is 'function => asMakeAlistForFunction con
abb := asyAbbreviation(con,#(KDR sig))
- if null KDR form then PUT(opOf form,'NILADIC,'T)
+ if null KDR form then
+ property(opOf form,'NILADIC) := 'T
modemap := asySubstMapping LASSOC(con,$mmAlist)
$constructorCategory :local := modemap.mmTarget
parents := mySort HGET($parentsHash,con)
@@ -349,7 +350,7 @@ asyMakeOperationAlist(con,proplist, key) ==
u
key is 'domain =>
kind := 'domain
- u := NIL
+ u := nil
return nil
ht := MAKE_-HASH_-TABLE()
ancestorAlist := nil
@@ -728,10 +729,10 @@ asyGetAbbrevFromComments con ==
--above "first" assumes only one entry
x := asyExtractAbbreviation comments
x => intern x
- NIL
+ nil
asyExtractAbbreviation str ==
- not (k:= STRPOS('"Abbrev: ",str,0,nil)) => NIL
+ not (k:= STRPOS('"Abbrev: ",str,0,nil)) => nil
str := subString(str, k+8)
k := STRPOS($stringNewline, str,0,nil)
k => subString(str, 0, k)
diff --git a/src/interp/bc-misc.boot b/src/interp/bc-misc.boot
index 5d140aac..87d110aa 100644
--- a/src/interp/bc-misc.boot
+++ b/src/interp/bc-misc.boot
@@ -569,7 +569,7 @@ bcSeries() ==
(text . "Create a series by: ")
(text . "\beginmenu")
(text . "\item ")
- (bcLinks ("\menuitemstyle{Expansion}" "" bcSeriesExpansion NILl))
+ (bcLinks ("\menuitemstyle{Expansion}" "" bcSeriesExpansion NIL))
(text . "\tab{11}Expand a function in a series around a point")
(text . "\item ")
(bcLinks ("\menuitemstyle{Formula}" "" bcSeriesByFormula NIL))
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot
index 0a1c5c8a..c7cfbf86 100644
--- a/src/interp/br-con.boot
+++ b/src/interp/br-con.boot
@@ -953,7 +953,7 @@ dbShowCons(htPage,key,:options) ==
if key in '(exposureOn exposureOff) then
$exposedOnlyIfTrue :=
key = 'exposureOn => 'T
- NIL
+ nil
key := htpProperty(htPage,'exclusion)
dbShowCons1(htPage,cAlist,key)
diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot
index f380a334..bcc85827 100644
--- a/src/interp/br-saturn.boot
+++ b/src/interp/br-saturn.boot
@@ -82,8 +82,8 @@ off()==
--
--protectedEVAL1 x ==
-- error := true
--- val := NIL
--- UNWIND_-PROTECT((val := saturnEVAL x; error := NIL),
+-- val := nil
+-- UNWIND_-PROTECT((val := saturnEVAL x; error := nil),
-- error => (resetStackLimits(); sendHTErrorSignal()))
-- val
--
@@ -1157,7 +1157,7 @@ htShowPageStar() ==
$saturn => htShowPageStarSaturn()
htSayStandard '"\endscroll "
if $exposedOnlyIfTrue then
- htMakePage [['bcLinks,['"Unexposed Also",'"",'repeatSearch,NIL]]]
+ htMakePage [['bcLinks,['"Unexposed Also",'"",'repeatSearch,nil]]]
else
htMakePage [['bcLinks,['"Exposed Only",'"",'repeatSearch,'T]]]
htShowPageNoScroll()
@@ -1166,7 +1166,7 @@ htShowPageStarSaturn() ==
$newPage : local := nil
$htLineList : local := nil
if $exposedOnlyIfTrue then
- htMakePage [['bcLinks,['"Unexposed Also",'"",'repeatSearch,NIL]]]
+ htMakePage [['bcLinks,['"Unexposed Also",'"",'repeatSearch,nil]]]
else
htMakePage [['bcLinks,['"Exposed Only",'"",'repeatSearch,'T]]]
$saturnContextMenuLines := $htLineList
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index 57969906..8dd863a6 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -975,7 +975,7 @@ grepFile(pattern,:options) ==
key := (x := IFCAR options => (options := rest options; x); nil)
source := grepSource key
lines :=
- not PROBE_-FILE source => NIL
+ not PROBE_-FILE source => nil
target := getTempPath 'target
casepart :=
'iv in options => '"-vi"
diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot
index 9d8c3ab9..8382d0d7 100644
--- a/src/interp/br-util.boot
+++ b/src/interp/br-util.boot
@@ -408,8 +408,8 @@ bcConTable u ==
bcAbbTable u ==
htBeginTable()
firstTime := true
- for x in removeDuplicates u repeat --allow x to be NIL meaning "no abbreviation"
- -- for x in u repeat --allow x to be NIL meaning "no abbreviation"
+ for x in removeDuplicates u repeat --allow x to be nil meaning "no abbreviation"
+ -- for x in u repeat --allow x to be nil meaning "no abbreviation"
if firstTime then firstTime := false
else htSaySaturn '"&"
if x is [con,abb,:.] then
diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot
index 8d912a86..c124ff29 100644
--- a/src/interp/c-doc.boot
+++ b/src/interp/c-doc.boot
@@ -101,7 +101,7 @@ recordAttributeDocumentation(['Attribute,att],lineno) ==
recordDocumentation(key,lineno) ==
recordHeaderDocumentation lineno
u:= collectComBlock lineno
- --record NIL to mean "there was no documentation"
+ --record nil to mean "there was no documentation"
$maxSignatureLineNumber := lineno
$docList := [[key,:u],:$docList]
-- leave first of $docList alone as required by collectAndDeleteAssoc
@@ -143,7 +143,7 @@ finalizeDocumentation() ==
signatures := [y,:signatures]
name := first $lisplibForm
if noHeading or signatures or attributes or unusedCommentLineNumbers then
- sayKeyedMsg("S2CD0001",NIL)
+ sayKeyedMsg("S2CD0001",nil)
bigcnt := 1
if noHeading or signatures or attributes then
sayKeyedMsg("S2CD0002",[strconc(STRINGIMAGE bigcnt,'"."),name])
@@ -621,13 +621,13 @@ checkIndentedLines(u, margin) ==
newString2Words l ==
not string? l => [l]
m := maxIndex l
- m = -1 => NIL
+ m = -1 => nil
i := 0
[w while newWordFrom(l,i,m) is [w,i]]
newWordFrom(l,i,m) ==
while i <= m and stringChar(l,i) = char " " repeat i := i + 1
- i > m => NIL
+ i > m => nil
buf := '""
ch := stringChar(l,i)
ch = $charFauxNewline => [$stringFauxNewline, i+ 1]
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index f3bb0bf1..30d4a769 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -380,7 +380,7 @@ intersectionContour(c,c') ==
for u in getDomainsInScope $e repeat
if u is ["Union",:u'] and (and/[listMember?(v,u') for v in rest m]) then
return m
- --this loop will return NIL if not satisfied
+ --this loop will return nil if not satisfied
addContour(c,E is [cur,:tail]) ==
[append!(fn(c,E),cur),:tail] where
@@ -1133,7 +1133,7 @@ getFunctionReplacement name ==
++ remove any replacement info possibly associated with `name'.
clearReplacement name ==
- REMPROP(name,"SPADreplace")
+ property(name,"SPADreplace") := nil
++ Register the inlinable form of a function.
registerFunctionReplacement(name,body) ==
diff --git a/src/interp/category.boot b/src/interp/category.boot
index 3802a809..0d8ebcb1 100644
--- a/src/interp/category.boot
+++ b/src/interp/category.boot
@@ -496,7 +496,7 @@ JoinInner(l,$e) ==
-- first anc)
bCond:= ASSQ(b,CondList)
CondList := remove(CondList,bCond)
- -- value of bCond not used and could be NIL
+ -- value of bCond not used and could be nil
-- bCond:= second bCond
globalDomains:= $NewCatVec.5
for u in $NewCatVec.1 repeat
diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot
index 977ae46b..17b3c60c 100644
--- a/src/interp/cattable.boot
+++ b/src/interp/cattable.boot
@@ -347,7 +347,7 @@ getConstrCat(x) ==
-- gets a different representation of the constructorCategory from the
-- lisplib, which is a list of named categories or conditions
x:= if x is ['Join,:y] then y else [x]
- cats:= NIL
+ cats:= nil
for y in x repeat
y is ['CATEGORY,.,:z] =>
for zz in z repeat cats := makeCatPred(zz, cats, true)
@@ -435,7 +435,7 @@ compressSexpr(x,left,right) ==
squeezeList(l) ==
-- changes the list l, so that is has maximal sharing of cells
- $found:local:= NIL
+ $found:local:= nil
squeeze1 l
squeeze1(l) ==
diff --git a/src/interp/clammed.boot b/src/interp/clammed.boot
index 4c04ddba..a44bd8de 100644
--- a/src/interp/clammed.boot
+++ b/src/interp/clammed.boot
@@ -58,11 +58,11 @@ canCoerce(t1, t2) ==
nil
coerceConvertMmSelection(funName,m1,m2) ==
- -- calls selectMms with $Coerce=NIL and tests for required
+ -- calls selectMms with $Coerce=nil and tests for required
-- target type. funName is either 'coerce or 'convert.
- $declaredMode : local:= NIL
- $reportBottomUpFlag : local:= NIL
- l := selectMms1(funName,m2,[m1],[m1],NIL)
+ $declaredMode : local:= nil
+ $reportBottomUpFlag : local:= nil
+ l := selectMms1(funName,m2,[m1],[m1],nil)
mmS := [[sig,[targ,arg],:pred] for x in l | x is [sig,[.,arg],:pred] and
hasCorrectTarget(m2,sig) and sig is [dc,targ,oarg] and oarg = m1]
mmS and first mmS
@@ -85,26 +85,26 @@ isValidType form ==
((# args) = (# removeDuplicates args)) => true
false
form is ['Mapping,:mapargs] =>
- null mapargs => NIL
+ null mapargs => nil
and/[isValidType type for type in mapargs]
form is ['Union,:args] =>
-- check for a tagged union
args and first args is [":",:.] =>
and/[isValidType type for [:.,type] in args]
- null (and/[isValidType arg for arg in args]) => NIL
+ null (and/[isValidType arg for arg in args]) => nil
((# args) = (# removeDuplicates args)) => true
sayKeyedMsg("S2IR0005",[form])
- NIL
+ nil
badDoubles := [$QuotientField,:'(Gaussian Complex Polynomial Expression)]
- form is [T1, [T2, :.]] and T1 = T2 and member(T1, badDoubles) => NIL
+ form is [T1, [T2, :.]] and T1 = T2 and member(T1, badDoubles) => nil
form is [=$QuotientField,D] and not isPartialMode(D) and
- ofCategory(D,$Field) => NIL
+ ofCategory(D,$Field) => nil
form is ['UnivariatePolynomial, x, ['UnivariatePolynomial, y, .]] and x=y =>
- NIL
- form = '(Complex (AlgebraicNumber)) => NIL
- form is ['Expression, ['Kernel, . ]] => NIL
+ nil
+ form = '(Complex (AlgebraicNumber)) => nil
+ form is ['Expression, ['Kernel, . ]] => nil
form is [op,:argl] =>
not constructor? op => nil
cosig := getDualSignatureFromDB op
@@ -145,7 +145,7 @@ resolveTT(t1,t2) ==
-- resolves two types
-- this symmetric resolve looks for a type t to which both t1 and t2
-- can be coerced
- -- if resolveTT fails, the result will be NIL
+ -- if resolveTT fails, the result will be nil
startTimingProcess 'resolve
t1 := eqType t1
t2 := eqType t2
@@ -210,9 +210,9 @@ isLegitimateMode(t,hasPolyMode,polyVarList) ==
underDomainOf t ==
t = $RationalNumber => $Integer
- atom t => NIL
+ atom t => nil
d := deconstructT t
- 1 = #d => NIL
+ 1 = #d => nil
u := getUnderModeOf(t) => u
last d
diff --git a/src/interp/construc.lisp b/src/interp/construc.lisp
index 9d0d252d..0da772e1 100644
--- a/src/interp/construc.lisp
+++ b/src/interp/construc.lisp
@@ -167,7 +167,7 @@
(cond
((null p) p)
((pathnamep p) p)
- ((null (pairp p)) (pathname p))
+ ((null (consp p)) (pathname p))
('else
(when (> (length p) 2)
(setq p (list (mergelib (first p)) (second p))))
diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp
index 20c13873..1a86d669 100644
--- a/src/interp/daase.lisp
+++ b/src/interp/daase.lisp
@@ -781,7 +781,7 @@
(let (data table stream ignore struct)
(declare (ignore ignore))
(when (or (symbolp constructor)
- (and (eq key 'hascategory) (pairp constructor)))
+ (and (eq key 'hascategory) (consp constructor)))
(case key
; note that abbreviation, constructorkind and cosig are heavy hitters
; thus they occur first in the list of things to check
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 144a27e6..0fe67f99 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -574,7 +574,7 @@ getModemapsFromDatabase(op,nargs) ==
getSystemModemaps(op,nargs) ==
mml:= getOperationFromDB op =>
- mms := NIL
+ mms := nil
for (x := [[.,:sig],.]) in mml repeat
(integer? nargs) and (nargs ~= # sig.source) => 'iterate
$getUnexposedOperations or isFreeFunctionFromMm(x) or
@@ -702,9 +702,9 @@ dropPrefix(fn) ==
--++-- null MAKE_-INPUT_-FILENAME(egFile) =>
--++-- throwKeyedMsg("S2IL0003",[namestring egFile])
--++ stream:= DEFIOSTREAM(['(MODE . INPUT),['FILE,:egFile]],80,0)
---++ $globalExposureGroupAlist := NIL
---++ egName := NIL
---++ egFiles := NIL
+--++ $globalExposureGroupAlist := nil
+--++ egName := nil
+--++ egFiles := nil
--++ while (not PLACEP (x:= readLine stream)) repeat
--++ x := DROPTRAILINGBLANKS x
--++ # x = 0 => 'iterate -- blank line
@@ -715,7 +715,7 @@ dropPrefix(fn) ==
--++ throwKeyedMsg("S2IZ0069A",[namestring egFile,x])
--++ x := dropLeadingBlanks x
--++ -- should be two tokens on the line
---++ p := STRPOS('" ",x,1,NIL)
+--++ p := STRPOS('" ",x,1,nil)
--++ null p =>
--++ throwKeyedMsg("S2IZ0069B",[namestring egFile,x])
--++ n := object2Identifier subString(x,0,p)
@@ -726,8 +726,8 @@ dropPrefix(fn) ==
--++ -- have a new group name
--++ if egName then $globalExposureGroupAlist :=
--++ [[egName,:reverse! egFiles],:$globalExposureGroupAlist]
---++ egFiles := NIL
---++ STRPOS('" ",x,1,NIL) =>
+--++ egFiles := nil
+--++ STRPOS('" ",x,1,nil) =>
--++ throwKeyedMsg("S2IZ0069C",[namestring egFile,x])
--++ egName := object2Identifier x
--++ if egFiles then $globalExposureGroupAlist :=
@@ -749,7 +749,7 @@ isExposedConstructor name ==
-- check if it is explicitly exposed
symbolMember?(name,$localExposureData.1) => true
-- check if it is in an exposed group
- found := NIL
+ found := nil
for g in $localExposureData.0 while not found repeat
null (x := GETALIST($globalExposureGroupAlist,g)) => 'iterate
if GETALIST(x,name) then found := true
@@ -763,7 +763,7 @@ displayExposedGroups() ==
centerAndHighlight g
displayExposedConstructors() ==
- sayKeyedMsg("S2IZ0049B",NIL)
+ sayKeyedMsg("S2IZ0049B",nil)
if null $localExposureData.1
then centerAndHighlight
'"there are no explicitly exposed constructors"
@@ -771,7 +771,7 @@ displayExposedConstructors() ==
centerAndHighlight c
displayHiddenConstructors() ==
- sayKeyedMsg("S2IZ0049C",NIL)
+ sayKeyedMsg("S2IZ0049C",nil)
if null $localExposureData.2
then centerAndHighlight
'"there are no explicitly hidden constructors"
diff --git a/src/interp/debug.lisp b/src/interp/debug.lisp
index 71098c9c..a9ca2349 100644
--- a/src/interp/debug.lisp
+++ b/src/interp/debug.lisp
@@ -140,10 +140,10 @@
METAKEYLST DEFINITION_NAME |$sourceFileTypes|
$FUNCTION $NEWSPAD $LINESTACK $LINENUMBER STACK STACKX BACK OK
TRAPFLAG |$InteractiveMode| TOK ERRCOL COLUMN *QUERY CHR LINE))
- (if (PAIRP FN) (SETQ FN (QCAR FN)))
+ (if (CONSP FN) (SETQ FN (QCAR FN)))
(SETQ INFILE (OR INFILE (|getFunctionSourceFile| FN)))
;; $FUNCTION is freely set in getFunctionSourceFile
- (IF (PAIRP $FUNCTION) (SETQ $FUNCTION (QCAR $FUNCTION)))
+ (IF (CONSP $FUNCTION) (SETQ $FUNCTION (QCAR $FUNCTION)))
(SETQ FN $FUNCTION)
(SETQ /FN $FUNCTION)
LOOP (SETQ SOURCEFILES
@@ -297,7 +297,7 @@
(RETURN (LIST /FN)) ) )
(DEFUN FUNLOC (func &aux file)
- (if (PAIRP func) (SETQ func (CAR func)))
+ (if (CONSP func) (SETQ func (CAR func)))
(setq file (ifcar (findtag func)))
(if file (list (pathname-name file) (pathname-type file) func)
nil))
diff --git a/src/interp/define.boot b/src/interp/define.boot
index b670c3c9..961e3d3b 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -191,7 +191,7 @@ makeCompactDirect1(op,items) ==
0
--> drop items which are not present (predCode = -1)
predCode = -1 => return nil
- --> drop items with NIL slots if lookup function is incomplete
+ --> drop items with nil slots if lookup function is incomplete
if null slot then
$lookupFunction is 'lookupIncomplete => return nil
slot := 1 --signals that operation is not present
@@ -230,7 +230,7 @@ makeCompactSigCode sig == [fn for x in sig] where
--=======================================================================
NRTmakeCategoryAlist() ==
$depthAssocCache: local := hashTable 'EQ
- $catAncestorAlist: local := NIL
+ $catAncestorAlist: local := nil
pcAlist := [:[[x,:"T"] for x in $uncondAlist],:$condAlist]
$levelAlist: local := depthAssocList [CAAR x for x in pcAlist]
opcAlist := reverse! SORTBY(function NRTcatCompare,pcAlist)
@@ -782,9 +782,9 @@ compDefineCategory2(form,signature,specialCases,body,m,e,
for u in $extraParms repeat
formals:=[first u,:formals]
actuals:=[MKQ rest u,:actuals]
- body := ['sublisV,['PAIR,['QUOTE,formals],['%list,:actuals]],body]
+ body := ['sublisV,['pairList,['QUOTE,formals],['%list,:actuals]],body]
if argl then body:= -- always subst for args after extraparms
- ['sublisV,['PAIR,['QUOTE,sargl],['%list,:
+ ['sublisV,['pairList,['QUOTE,sargl],['%list,:
[['devaluate,u] for u in sargl]]],body]
body:=
["%bind",[[g:= gensym(),body]],
diff --git a/src/interp/format.boot b/src/interp/format.boot
index b5cefe7d..f092afc7 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -81,7 +81,7 @@ displayTranModemap (mm is [[x,:sig],[pred,:y],:z]) ==
listOfPredOfTypePatternIds p ==
p is ['AND,:lp] or p is ['OR,:lp] =>
- UNIONQ([:listOfPredOfTypePatternIds p1 for p1 in lp],NIL)
+ UNIONQ([:listOfPredOfTypePatternIds p1 for p1 in lp],nil)
p is [op,a,.] and op = 'ofType =>
isPatternVar a => [a]
nil
@@ -103,7 +103,7 @@ canRemoveIsDomain? pred ==
findSubstitutionOrder? alist
findSubstitutionOrder? alist == fn(alist,nil) where
- -- returns NIL or an appropriate substituion order
+ -- returns nil or an appropriate substituion order
fn(alist,res) ==
null alist => reverse! res
choice := or/[x for (x:=[a,:b]) in alist | null containedRight(a,alist)] =>
@@ -188,7 +188,7 @@ reportOpSymbol op1 ==
ok => apropos [op1]
sayNewLine()
-- filter modemaps on whether they are exposed
- mmsE := mmsU := NIL
+ mmsE := mmsU := nil
for mm in modemaps repeat
isFreeFunctionFromMm(mm) or isExposedConstructor getDomainFromMm(mm) => mmsE := [mm,:mmsE]
mmsU := [mm,:mmsU]
@@ -449,14 +449,14 @@ form2String1 u ==
(null argl) or null (first argl) => [lo, '".."]
[lo, '"..", form2String1 first argl]
isBinaryInfix op => formatAsFortranExpression [op,:argl]
- -- COMPILED_-FUNCTION_-P(op) => form2String1 coerceMap2E(u1,NIL)
+ -- COMPILED_-FUNCTION_-P(op) => form2String1 coerceMap2E(u1,nil)
application2String(op,[form2String1 x for x in argl], u1)
formWrapId id ==
$formatSigAsTeX = 1 => PNAME id
$formatSigAsTeX = 2 =>
sep := '"`"
- FORMAT(NIL,'"\verb~a~a~a",sep, id, sep)
+ FORMAT(nil,'"\verb~a~a~a",sep, id, sep)
error '"Bad formatSigValue"
formArguments2String(argl,ml) == [fn(x,m) for x in argl for m in ml] where
@@ -518,14 +518,14 @@ formJoin2 argl ==
-- argl is a list of categories NOT containing a "with"
null argl => '""
1=#argl => form2StringLocal argl.0
- application2String('Join,[form2StringLocal x for x in argl], NIL)
+ application2String('Join,[form2StringLocal x for x in argl],nil)
formJoin2String (u:=[:argl,last]) ==
last is ["CATEGORY",.,:atsigList] =>
postString:= concat('"(",formTuple2String atsigList,'")")
#argl=1 => concat(first argl,'" with ",postString)
- concat(application2String('Join,argl, NIL)," with ",postString)
- application2String('Join,u, NIL)
+ concat(application2String('Join,argl, nil)," with ",postString)
+ application2String('Join,u, nil)
formCollect2String [:itl,body] ==
['"(",body,:"append"/[formIterator2String x for x in itl],'")"]
@@ -621,16 +621,16 @@ formTuple2String argl ==
string
isInternalFunctionName(op) ==
- (not IDENTP(op)) or (op = "*") or (op = "**") => NIL
+ (not IDENTP(op)) or (op = "*") or (op = "**") => nil
op' := symbolName op
- 1 = #op' or char "*" ~= stringChar(op',0) => NIL
+ 1 = #op' or char "*" ~= stringChar(op',0) => nil
-- if there is a semicolon in the name then it is the name of
-- a compiled spad function
- null (e := STRPOS('"_;",op',1,NIL)) => NIL
- char " " = stringChar(op',1) or char "*" = stringChar(op',1) => NIL
- table := MAKETRTTABLE('"0123456789",NIL)
+ null (e := STRPOS('"_;",op',1,nil)) => nil
+ char " " = stringChar(op',1) or char "*" = stringChar(op',1) => nil
+ table := MAKETRTTABLE('"0123456789",nil)
s := STRPOSL(table,op',1,true)
- null(s) or s > e => NIL
+ null(s) or s > e => nil
subString(op',s,e-s)
application2String(op,argl, linkInfo) ==
@@ -657,7 +657,7 @@ application2String(op,argl, linkInfo) ==
concat('"(",concat(tuple2String argl,'")")))
app2StringConcat0(x,y) ==
- FORMAT(NIL, '"~a ~a", x, y)
+ FORMAT(nil, '"~a ~a", x, y)
app2StringWrap(string, linkInfo) ==
not linkInfo => string
@@ -665,12 +665,12 @@ app2StringWrap(string, linkInfo) ==
$formatSigAsTeX = 2 =>
str2 := "app2StringConcat0"/form2Fence linkInfo
sep := '"`"
- FORMAT(NIL, '"\lispLink{\verb!(|conPage| '~a)!}{~a}",
+ FORMAT(nil, '"\lispLink{\verb!(|conPage| '~a)!}{~a}",
str2, string)
error "Bad value for $formatSigAsTeX"
record2String x ==
- argPart := NIL
+ argPart := nil
for [":",a,b] in x repeat argPart:=
concat(argPart,'",",a,'": ",form2StringLocal b)
null argPart => '"Record()"
@@ -752,8 +752,8 @@ pkey keyStuff ==
if atom keyStuff then keyStuff := [keyStuff]
allMsgs := ['" "]
while not null keyStuff repeat
- dbN := NIL
- argL := NIL
+ dbN := nil
+ argL := nil
key := first keyStuff
keyStuff := IFCDR keyStuff
next := IFCAR keyStuff
@@ -787,14 +787,14 @@ form2Fence form ==
form2Fence1 x ==
x is [op,:argl] =>
op = "QUOTE" => ['"(QUOTE ",:form2FenceQuote first argl,'")"]
- ['"(", FORMAT(NIL, '"|~a|", op),:"append"/[form2Fence1 y for y in argl],'")"]
+ ['"(", FORMAT(nil, '"|~a|", op),:"append"/[form2Fence1 y for y in argl],'")"]
null x => '""
- IDENTP x => FORMAT(NIL, '"|~a|", x)
+ IDENTP x => FORMAT(nil, '"|~a|", x)
['" ", x]
form2FenceQuote x ==
integer? x => [STRINGIMAGE x]
- symbol? x => [FORMAT(NIL, '"|~a|", x)]
+ symbol? x => [FORMAT(nil, '"|~a|", x)]
string? x => ['"_"",x,'"_""]
atom x => systemErrorHere ["form2FenceQuote",x]
['"(",:form2FenceQuote first x,:form2FenceQuoteTail rest x]
diff --git a/src/interp/fortcall.boot b/src/interp/fortcall.boot
index 7a57359a..4ccdf592 100644
--- a/src/interp/fortcall.boot
+++ b/src/interp/fortcall.boot
@@ -401,11 +401,11 @@ vec2Lists u == [vec2Lists1 u.i for i in 0..#u-1]
spad2lisp(u) ==
-- Turn complexes into arrays of floats
first first(u)="Complex" =>
- makeVector([makeVector([second u,CDDR u],"%DoubleFloat")],NIL)
+ makeVector([makeVector([second u,CDDR u],"%DoubleFloat")],nil)
-- Turn arrays of complexes into arrays of floats so that tarnsposing
-- them puts them in the correct fortran order
first first(u)="Matrix" and first second first(u) = "Complex" =>
- makeVector([makeVector(complexRows vec2Lists rest u,"%DoubleFloat")],NIL)
+ makeVector([makeVector(complexRows vec2Lists rest u,"%DoubleFloat")],nil)
rest(u)
invokeFortran(objFile,args,dummies,decls,results,actual) ==
@@ -425,7 +425,7 @@ invokeFortran(objFile,args,dummies,decls,results,actual) ==
int2Bool u ==
-- Return something which looks like an axiom boolean
u=1 => "TRUE"
- NIL
+ nil
makeResultRecord(name,type,value) ==
-- Take an object returned by the NAG routine and make it into an AXIOM
@@ -715,10 +715,10 @@ nagCall(objFiles,nfile,data,results,tmpFiled,tmpFiler) ==
protectedNagCall(objFiles,nfile,data,results) ==
errors :=true
- val:=NIL
+ val:=nil
td:=generateDataName()
tr:=generateResultsName()
- UNWIND_-PROTECT( (val:=nagCall(objFiles,nfile,data,results,td,tr) ;errors :=NIL),
+ UNWIND_-PROTECT( (val:=nagCall(objFiles,nfile,data,results,td,tr) ;errors :=nil),
errors =>( resetStackLimits(); sendNagmanErrorSignal();cleanUpAfterNagman(td,tr,objFiles)))
val
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index 4891546e..8525abd1 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -50,7 +50,7 @@ keyItem a ==
-- invocation of DomainPrint1 to the next
DomainPrint(D,brief) ==
- -- If brief is non-NIL, %then only a summary is printed
+ -- If brief is non-nil, %then only a summary is printed
$WhereList: local := nil
$Sublis: local := nil
$WhereCounter: local := 1
@@ -58,7 +58,7 @@ DomainPrint(D,brief) ==
categoryObject? D => CategoryPrint(D,env)
$Sublis:= [[keyItem D,:'original]]
SAY '"-----------------------------------------------------------------------"
- DomainPrint1(D,NIL,env)
+ DomainPrint1(D,nil,env)
while ($WhereList) repeat
s:= $WhereList
$WhereList:= nil
@@ -549,7 +549,7 @@ DescendCode(code,flag,viewAssoc,EnvToPass) ==
$ConstantAssignments:= [u,:$ConstantAssignments]
nil
u
- code is ['_:,:.] => (code.first := '%list; code.rest := NIL)
+ code is ['_:,:.] => (code.first := '%list; code.rest := nil)
--Yes, I know that's a hack, but how else do you kill a line?
code is ['%list,:.] => nil
code is ['devaluate,:.] => nil
@@ -871,7 +871,7 @@ encodeLocalFunctionName op ==
makeSymbol strconc(prefix,'";",encodeItem op)
splitEncodedFunctionName(encodedName, sep) ==
- -- [encodedPackage, encodedItem, encodedSig, sequenceNo] or NIL
+ -- [encodedPackage, encodedItem, encodedSig, sequenceNo] or nil
-- sep0 is the separator used in "encodeFunctionName".
sep0 := '";"
if not string? encodedName then
diff --git a/src/interp/g-cndata.boot b/src/interp/g-cndata.boot
index d90b5ef3..357aa2df 100644
--- a/src/interp/g-cndata.boot
+++ b/src/interp/g-cndata.boot
@@ -55,16 +55,16 @@ augmentLowerCaseConTable x ==
HPUT($lowerCaseConTb,y,item)
getCDTEntry(info,isName) ==
- not IDENTP info => NIL
+ not IDENTP info => nil
(entry := HGET($lowerCaseConTb,info)) =>
[name,abb,:.] := entry
isName and sameObject?(name,info) => entry
not isName and sameObject?(abb,info) => entry
- NIL
+ nil
entry
putConstructorProperty(name,prop,val) ==
- null (entry := getCDTEntry(name,true)) => NIL
+ null (entry := getCDTEntry(name,true)) => nil
entry.rest.rest := PUTALIST(CDDR entry,prop,val)
true
@@ -132,9 +132,9 @@ constructorNameConflict(name,kind) ==
constructorAbbreviationErrorCheck(c,a,typ,errmess) ==
siz := # (s := symbolName a)
if typ = "category" and siz > 7
- then throwKeyedErrorMsg('precompilation,"S2IL0021",NIL)
- if siz > 8 then throwKeyedErrorMsg('precompilation,"S2IL0006",NIL)
- if s ~= stringUpcase s then throwKeyedMsg("S2IL0006",NIL)
+ then throwKeyedErrorMsg('precompilation,"S2IL0021",nil)
+ if siz > 8 then throwKeyedErrorMsg('precompilation,"S2IL0006",nil)
+ if s ~= stringUpcase s then throwKeyedMsg("S2IL0006",nil)
abb := getConstructorAbbreviationFromDB c
name:= getConstructorFullNameFromDB a
type := getConstructorKindFromDB c
@@ -150,7 +150,7 @@ abbreviationError(c,a,typ,abb,name,type,error) ==
throwKeyedMsg("S2IL0011",[a,type])
error='wrongType =>
throwKeyedMsg("S2IL0012",[c,type])
- NIL
+ nil
abbreviate u ==
u is ['Union,:arglist] =>
diff --git a/src/interp/g-error.boot b/src/interp/g-error.boot
index aafefd93..06275781 100644
--- a/src/interp/g-error.boot
+++ b/src/interp/g-error.boot
@@ -117,10 +117,10 @@ handleLispBreakLoop($BreakMode) ==
'" ",:bright '"break ",'" to enter a LISP break loop.",'"%l",_
'"%l",'" Please enter your choice now:"]
x := STRING2ID_-N(queryUser msgQ,1)
- x := selectOptionLC(x,'(top break continue),NIL)
+ x := selectOptionLC(x,'(top break continue),nil)
null x =>
sayBrightly bright '" That was not one of your choices!"
- gotIt := NIL
+ gotIt := nil
x = 'top => returnToTopLevel()
x = 'break =>
$BreakMode := 'break
diff --git a/src/interp/g-timer.boot b/src/interp/g-timer.boot
index 4b849bf8..69f538db 100644
--- a/src/interp/g-timer.boot
+++ b/src/interp/g-timer.boot
@@ -65,7 +65,7 @@ makeLongStatStringByProperty _
name = 'other => 'iterate
cl := first LASSOC(class,listofclasses)
n := property(name, prop)
- PUT(cl,classprop, n + property(cl,classprop))
+ property(cl,classprop) := n + property(cl,classprop)
total := total + n
if n >= 0.01
then timestr := normalizeStatAndStringify n
@@ -74,13 +74,13 @@ makeLongStatStringByProperty _
otherStatTotal := otherStatTotal + n
str := makeStatString(str,timestr,ab,flag)
otherStatTotal := otherStatTotal
- PUT('other, prop, otherStatTotal)
+ property('other, prop) := otherStatTotal
if otherStatTotal > 0 then
str := makeStatString(str,normalizeStatAndStringify otherStatTotal,'O,flag)
total := total + otherStatTotal
cl := first symbolLassoc('other,listofnames)
cl := first LASSOC(cl,listofclasses)
- PUT(cl,classprop, otherStatTotal + property(cl,classprop))
+ property(cl,classprop) := otherStatTotal + property(cl,classprop)
if flag ~= 'long then
total := 0
str := '""
@@ -187,20 +187,20 @@ $interpreterTimedClasses == '(
initializeTimedNames(listofnames,listofclasses) ==
for [name,:.] in listofnames repeat
- PUT(name, 'TimeTotal, 0.0)
- PUT(name, 'SpaceTotal, 0)
+ property(name, 'TimeTotal) := 0.0
+ property(name, 'SpaceTotal) := 0
for [.,name,:.] in listofclasses repeat
- PUT( name, 'ClassTimeTotal, 0.0)
- PUT( name, 'ClassSpaceTotal, 0)
+ property(name, 'ClassTimeTotal) := 0.0
+ property(name, 'ClassSpaceTotal) := 0
$timedNameStack := '(other)
computeElapsedTime()
- PUT('gc, 'TimeTotal, 0.0)
- PUT('gc, 'SpaceTotal, 0)
- NIL
+ property('gc, 'TimeTotal) := 0.0
+ property('gc, 'SpaceTotal) := 0
+ nil
updateTimedName name ==
count := (property(name,'TimeTotal) or 0) + computeElapsedTime()
- PUT(name,'TimeTotal, count)
+ property(name,'TimeTotal) := count
printNamedStats listofnames ==
printNamedStatsByProperty(listofnames, 'TimeTotal)
@@ -225,8 +225,8 @@ computeElapsedTime() ==
gcDelta := currentGCTime - $oldElapsedGCTime
elapsedSeconds:=
1.* (currentTime-$oldElapsedTime-gcDelta)/$timerTicksPerSecond
- PUT('gc, 'TimeTotal,property('gc,'TimeTotal) +
- 1.*QUOTIENT(gcDelta,$timerTicksPerSecond))
+ property('gc, 'TimeTotal) := property('gc,'TimeTotal) +
+ 1.*QUOTIENT(gcDelta,$timerTicksPerSecond)
$oldElapsedTime := elapsedUserTime()
$oldElapsedGCTime := elapsedGcTime()
elapsedSeconds
@@ -245,7 +245,7 @@ timedAlgebraEvaluation(code) ==
timedOptimization(code) ==
startTimingProcess 'optimization
- $getDomainCode : local := NIL
+ $getDomainCode : local := nil
r := simplifyVMForm code
if $reportOptimization then
sayBrightlyI bright '"Optimized intermediate code:"
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 23aa218a..11960741 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -406,7 +406,7 @@ PUTALIST(alist,prop,val) ==
REMALIST(alist,prop) ==
null alist => alist
alist is [[ =prop,:.],:r] =>
- null r => NIL
+ null r => nil
alist.first := first r
alist.rest := rest r
alist
@@ -416,9 +416,9 @@ REMALIST(alist,prop) ==
while ok repeat
[.,[p,:.],:r] := l
p = prop =>
- ok := NIL
+ ok := nil
l.rest := r
- if null (l := rest l) or null rest l then ok := NIL
+ if null (l := rest l) or null rest l then ok := nil
alist
deleteLassoc(x,y) ==
@@ -476,29 +476,29 @@ centerString(text,width,fillchar) ==
stringPrefix?(pref,str) ==
-- sees if the first #pref letters of str are pref
-- replaces STRINGPREFIXP
- not (string?(pref) and string?(str)) => NIL
+ not (string?(pref) and string?(str)) => nil
(lp := # pref) = 0 => true
- lp > # str => NIL
+ lp > # str => nil
ok := true
i := 0
while ok and (i < lp) repeat
- stringChar(pref,i) ~= stringChar(str,i) => ok := NIL
+ stringChar(pref,i) ~= stringChar(str,i) => ok := nil
i := i + 1
ok
stringChar2Integer(str,pos) ==
-- returns small integer represented by character in position pos
- -- in string str. Returns NIL if not a digit or other error.
+ -- in string str. Returns nil if not a digit or other error.
if IDENTP str then str := symbolName str
not (string?(str) and
- integer?(pos) and (pos >= 0) and (pos < #str)) => NIL
- not digit?(d := stringChar(str,pos)) => NIL
+ integer?(pos) and (pos >= 0) and (pos < #str)) => nil
+ not digit?(d := stringChar(str,pos)) => nil
DIG2FIX d
dropLeadingBlanks str ==
str := object2String str
l := # str
- nb := NIL
+ nb := nil
i := 0
while (i < l) and nb = nil repeat
if stringChar(str,i) ~= char " " then nb := i
@@ -631,14 +631,14 @@ mergeSort(f,g,p,n) ==
t := p
p := rest p
p.rest := t
- t.rest := NIL
+ t.rest := nil
if QSLESSP(n,3) then return p
-- split the list p into p and q of equal length
l := n quo 2
t := p
for i in 1..l-1 repeat t := rest t
q := rest t
- t.rest := NIL
+ t.rest := nil
p := mergeSort(f,g,p,l)
q := mergeSort(f,g,q,QSDIFFERENCE(n,l))
mergeInPlace(f,g,p,q)
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot
index c1bdf82c..dae28d1b 100644
--- a/src/interp/i-analy.boot
+++ b/src/interp/i-analy.boot
@@ -61,12 +61,12 @@ putCallInfo(t,op,arg,nargs) ==
getMinimalVariableTower(var,t) ==
-- gets the minimal polynomial subtower of t that contains the
- -- given variable. Returns NIL if none.
- string?(t) or IDENTP(t) => NIL
+ -- given variable. Returns nil if none.
+ string?(t) or IDENTP(t) => nil
t = $Symbol => t
t is ['Variable,u] =>
(u = var) => t
- NIL
+ nil
t is ['Polynomial,.] => t
t is ['RationalFunction,D] => ['Polynomial,D]
t is [up,t',u,.] and symbolMember?(up,$univariateDomains) =>
@@ -79,7 +79,7 @@ getMinimalVariableTower(var,t) ==
t is [mp,u,t'] and symbolMember?(mp,$multivariateDomains) =>
var in u => t
getMinimalVariableTower(var,t')
- null (t' := underDomainOf t) => NIL
+ null (t' := underDomainOf t) => nil
getMinimalVariableTower(var,t')
getMinimalVarMode(id,m) ==
@@ -122,8 +122,8 @@ polyVarlist m ==
pushDownTargetInfo(op,target,arglist) ==
-- put target info on args for certain operations
- target = $OutputForm => NIL
- target = $Any => NIL
+ target = $OutputForm => nil
+ target = $Any => nil
n := # arglist
pushDownOnArithmeticVariables(op,target,arglist)
(pdArgs := pushDownOp?(op,n)) =>
@@ -138,7 +138,7 @@ pushDownTargetInfo(op,target,arglist) ==
2 = nargs =>
op = "*" => -- only push down on 1st arg if not immed
if not getTarget second arglist then putTarget(second arglist,target)
- getTarget(x := first arglist) => NIL
+ getTarget(x := first arglist) => nil
if getUnname(x) ~= $immediateDataSymbol then putTarget(x,target)
op = "**" or op = "^" => -- push down on base
if not getTarget first arglist then putTarget(first arglist,target)
@@ -160,19 +160,19 @@ pushDownTargetInfo(op,target,arglist) ==
(op = 'SEGMENT) and (target is ['UniversalSegment,S]) =>
for x in arglist repeat
if not getTarget(x) then putTarget(x,S)
- NIL
- NIL
+ nil
+ nil
pushDownOnArithmeticVariables(op,target,arglist) ==
-- tries to push appropriate target information onto variable
-- occurring in arithmetic expressions
- cons?(target) and first(target) = 'Variable => NIL
- not symbolMember?(op,'(_+ _- _* _*_* _/)) => NIL
- not containsPolynomial(target) => NIL
+ cons?(target) and first(target) = 'Variable => nil
+ not symbolMember?(op,'(_+ _- _* _*_* _/)) => nil
+ not containsPolynomial(target) => nil
for x in arglist for i in 1.. repeat
vector?(x) => -- leaf
transferPropsToNode(xn := getUnname(x),x)
- getValue(x) or (xn = $immediateDataSymbol) => NIL
+ getValue(x) or (xn = $immediateDataSymbol) => nil
t := getMinimalVariableTower(xn,target) or target
if not getTarget(x) then putTarget(x,t)
cons?(x) => -- node
@@ -185,7 +185,7 @@ pushDownOp?(op,n) ==
-- the target type is equal to one or more arguments. If so, a list
-- of the appropriate arguments is returned.
ops := [sig for [sig,:.] in getModemapsFromDatabase(op,n)]
- null ops => NIL
+ null ops => nil
op in '(_+ _* _- _exquo) => [i for i in 0..(n-1)]
-- each signature has form
-- [domain of implementation, target, arg1, arg2, ...]
@@ -197,7 +197,7 @@ pushDownOp?(op,n) ==
for arg in argl for i in 0.. repeat
targ = arg => vectorRef(sameAsTarg,i) := 1 + sameAsTarg.i
-- now see which args have their count = numMms
- ok := NIL
+ ok := nil
for i in 0..(n-1) repeat
if numMms = sameAsTarg.i then ok := [i,:ok]
reverse ok
@@ -235,7 +235,7 @@ bottomUp t ==
else
transferPropsToNode(opName,op)
else
- opName := NIL
+ opName := nil
bottomUp op
opVal := getValue op
@@ -299,8 +299,8 @@ computeTypeWithVariablesTarget(p, q) ==
polyVarlist(p) or polyVarlist(q) =>
t := resolveTT(p, q)
polyVarlist(t) => t
- NIL
- NIL
+ nil
+ nil
bottomUpCompile t ==
$genValue:local := false
@@ -356,7 +356,7 @@ isUnambiguouslyConstructor(id,t) ==
bottomUpIdentifier(t,id) ==
ms := isUnambiguouslyConstructor(id,t) => ms
m := isType t => bottomUpType(t, m)
- id = "%noMapVal" => throwKeyedMsg('"S2IB0002",NIL)
+ id = "%noMapVal" => throwKeyedMsg('"S2IB0002",nil)
id = "%noBranch" =>
keyedSystemError("S2GE0016",
['"bottomUpIdentifier",'"trying to evaluate %noBranch"])
@@ -464,7 +464,7 @@ bottomUpDefaultEval(t,id,defaultMode,target,isSub) ==
['Variable,id]),dmode)) =>
defaultMode := dmode
val := val'
- NIL
+ nil
target := resolveTM(defaultMode,target)
-- The following is experimental. SCM 10/11/90
if target and (tm := getMinimalVarMode(id, target)) then
@@ -490,7 +490,7 @@ bottomUpDefaultCompile(t,id,defaultMode,target,isSub) ==
tmode and tval and (mdv := objMode tval) =>
if isPartialMode tmode then
null (tmode := resolveTM(mdv,tmode)) =>
- keyedMsgCompFailure("S2IB0010",NIL)
+ keyedMsgCompFailure("S2IB0010",nil)
putValue(t,objNew(expr,tmode))
[tmode]
tmode or (tval and (tmode := objMode tval)) =>
@@ -505,7 +505,7 @@ bottomUpDefaultCompile(t,id,defaultMode,target,isSub) ==
[defaultMode]
interpRewriteRule(t,id,expr) ==
- null get(id,'isInterpreterRule,$e) => NIL
+ null get(id,'isInterpreterRule,$e) => nil
(ms:= selectLocalMms(t,id,nil,nil)) and (ms:=evalForm(t,id,nil,ms)) =>
ms
nil
@@ -552,8 +552,8 @@ bottomUpForm2(t,op,opName,argl,argModeSetList) ==
bottomUpForm0(t,op,opName,argl,argModeSetList)
bottomUpFormTuple(t, op, opName, args, argModeSetList) ==
- getAtree(op,'dollar) => NIL
- null (singles := getModemapsFromDatabase(opName, 1)) => NIL
+ getAtree(op,'dollar) => nil
+ null (singles := getModemapsFromDatabase(opName, 1)) => nil
-- see if any of the modemaps have Tuple arguments
haveTuple := false
@@ -561,9 +561,9 @@ bottomUpFormTuple(t, op, opName, args, argModeSetList) ==
if getFirstArgTypeFromMm(mm) is ["Tuple",.] then haveTuple := true
not haveTuple => nil
nargs := #args
- nargs = 1 and getUnname first args = "Tuple" => NIL
+ nargs = 1 and getUnname first args = "Tuple" => nil
nargs = 1 and (ms := bottomUp first args) and
- (ms is [["Tuple",.]] or ms is [["List",.]]) => NIL
+ (ms is [["Tuple",.]] or ms is [["List",.]]) => nil
-- now make the args into a tuple
@@ -646,7 +646,7 @@ bottomUpForm0(t,op,opName,argl,argModeSetList) ==
opName0 = $immediateDataSymbol =>
(o := coerceInteractive(getValue op0,$OutputForm)) =>
outputTran objValUnwrap o
- NIL
+ nil
opName0
if null(opName1) then
@@ -674,14 +674,14 @@ sayIntelligentMessageAboutOpAvailability(opName, nArgs) ==
-- see if we can give some decent messages about the availability if
-- library messages
- integer? opName => NIL
+ integer? opName => nil
oo := object2Identifier opOf opName
if ( oo = "%" ) or ( oo = "Domain" ) or ( domainForm? opName ) then
opName := "elt"
- nAllExposedMmsWithName := #getModemapsFromDatabase(opName, NIL)
- nAllMmsWithName := #getAllModemapsFromDatabase(opName, NIL)
+ nAllExposedMmsWithName := #getModemapsFromDatabase(opName, nil)
+ nAllMmsWithName := #getAllModemapsFromDatabase(opName, nil)
-- first see if there are ANY ops with this name
@@ -736,8 +736,8 @@ bottomUpPercent(tree is [op,:argl]) ==
val:= fetchOutput i
putValue(op,val)
putModeSet(op,[objMode(val)])
- throwKeyedMsgSP('"S2IB0006",NIL,t)
- throwKeyedMsgSP('"S2IB0006",NIL,op)
+ throwKeyedMsgSP('"S2IB0006",nil,t)
+ throwKeyedMsgSP('"S2IB0006",nil,op)
bottomUpFormRetract(t,op,opName,argl,amsl) ==
-- tries to find one argument, which can be pulled back, and calls
@@ -747,13 +747,13 @@ bottomUpFormRetract(t,op,opName,argl,amsl) ==
-- if no such operation exists in the database, don't bother
$inRetract: local := true
- null getAllModemapsFromDatabase(getUnname op,#argl) => NIL
+ null getAllModemapsFromDatabase(getUnname op,#argl) => nil
u := bottomUpFormAnyUnionRetract(t,op,opName,argl,amsl) => u
- a := NIL
- b := NIL
- ms := NIL
+ a := nil
+ b := nil
+ ms := nil
for x in argl for m in amsl for i in 1.. repeat
-- do not retract first arg of a setelt
(i = 1) and (opName = "setelt") =>
@@ -762,7 +762,7 @@ bottomUpFormRetract(t,op,opName,argl,amsl) ==
(i = 1) and (opName = "set!") =>
a := [x,:a]
ms := [m,:ms]
- if cons?(m) and first(m) = $EmptyMode then return NIL
+ if cons?(m) and first(m) = $EmptyMode then return nil
object:= retract getValue x
a:= [x,:a]
object="failed" =>
@@ -798,15 +798,15 @@ retractAtree atr ==
bottomUpFormAnyUnionRetract(t,op,opName,argl,amsl) ==
-- see if we have a Union
- ok := NIL
+ ok := nil
for m in amsl while not ok repeat
- if atom first(m) then return NIL
+ if atom first(m) then return nil
first m = $Any => ok := true
(first first m = 'Union) => ok := true
- not ok => NIL
+ not ok => nil
- a:= NIL
- b:= NIL
+ a:= nil
+ b:= nil
for x in argl for m in amsl for i in 0.. repeat
m0 := first m
@@ -822,14 +822,14 @@ bottomUpFormAnyUnionRetract(t,op,opName,argl,amsl) ==
bottomUpFormUntaggedUnionRetract(t,op,opName,argl,amsl) ==
-- see if we have a Union with no tags, if so retract all such guys
- ok := NIL
+ ok := nil
for [m] in amsl while not ok repeat
- if atom m then return NIL
+ if atom m then return nil
if m is ['Union, :.] and null getUnionOrRecordTags m then ok := true
- not ok => NIL
+ not ok => nil
- a:= NIL
- b:= NIL
+ a:= nil
+ b:= nil
for x in argl for m in amsl for i in 0.. repeat
m0 := first m
diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot
index 207d49d1..a6dab0c3 100644
--- a/src/interp/i-coerce.boot
+++ b/src/interp/i-coerce.boot
@@ -156,9 +156,9 @@ retract2Specialization object ==
val' is [ =1,x,:.] =>
vl := removeDuplicates reverse varsInPoly val'
1 = #vl => coerceInt(object,['UnivariatePolynomial,x,D])
- NIL
+ nil
val' is [ =0,:.] => coerceInt(object, D)
- NIL
+ nil
type is ['Matrix,D] =>
n := # val'
m := # val'.0
@@ -166,15 +166,15 @@ retract2Specialization object ==
objNew(val,['RectangularMatrix,n,m,D])
type is ['RectangularMatrix,n,m,D] =>
n = m => objNew(val,['SquareMatrix,n,D])
- NIL
+ nil
(type is [agg,D]) and (agg in '(Vector Segment UniversalSegment)) =>
D = $PositiveInteger => objNew(val,[agg,$NonNegativeInteger])
D = $NonNegativeInteger => objNew(val,[agg,$Integer])
- NIL
+ nil
type is ['Array,bds,D] =>
D = $PositiveInteger => objNew(val,['Array,bds,$NonNegativeInteger])
D = $NonNegativeInteger => objNew(val,['Array,bds,$Integer])
- NIL
+ nil
type is ['List,D] =>
D isnt ['List,D'] =>
-- try to retract elements
@@ -190,14 +190,14 @@ retract2Specialization object ==
(e' := retract objNewWrap(e,D)) = 'failed => bad := true
vl := [objValUnwrap e',:vl]
tl := [objMode e',:tl]
- bad => NIL
- (m := resolveTypeListAny tl) = D => NIL
- D = equiType(m) => NIL
+ bad => nil
+ (m := resolveTypeListAny tl) = D => nil
+ D = equiType(m) => nil
vl' := nil
for e in vl for t in tl repeat
t = m => vl' := [e,:vl']
e' := coerceInt(objNewWrap(e,t),m)
- null e' => return NIL
+ null e' => return nil
vl' := [objValUnwrap e',:vl']
objNewWrap(vl',['List,m])
D' = $PositiveInteger =>
@@ -209,15 +209,15 @@ retract2Specialization object ==
n := # val'
m := # val'.0
- null isRectangularList(val',n,m) => NIL
+ null isRectangularList(val',n,m) => nil
coerceInt(object,['Matrix,D'])
type is ['Expression,D] =>
atom val' => nil -- certainly not a fraction
[num,:den] := val'
ofCategory(type,$Field) =>
-- coerceRetract already handles case where den = 1
- num isnt [0,:num] => NIL
- den isnt [0,:den] => NIL
+ num isnt [0,:num] => nil
+ den isnt [0,:den] => nil
objNewWrap([num,:den],[$QuotientField, D])
nil
type is ['SimpleAlgebraicExtension,k,rep,.] =>
@@ -227,7 +227,7 @@ retract2Specialization object ==
while (val' ~= 'failed) and
(equiType(objMode val') ~= k) repeat
val' := retract val'
- val' = 'failed => NIL
+ val' = 'failed => nil
val'
type is ['UnivariatePuiseuxSeries, coef, var, cen] =>
@@ -236,10 +236,10 @@ retract2Specialization object ==
coerceInt(object, ['UnivariateTaylorSeries, coef, var, cen])
type is ['FunctionCalled,name] =>
- null (m := get(name,'mode,$e)) => NIL
- isPartialMode m => NIL
+ null (m := get(name,'mode,$e)) => nil
+ isPartialMode m => nil
objNew(val,m)
- NIL
+ nil
coerceOrConvertOrRetract(T,m) ==
$useConvertForCoercions : local := true
@@ -258,51 +258,51 @@ coerceOrRetract(T,m) ==
coerceRetract(object,t2) ==
-- tries to handle cases such as P I -> I
- (val := objValUnwrap(object)) = "$fromCoerceable$" => NIL
+ (val := objValUnwrap(object)) = "$fromCoerceable$" => nil
t1 := objMode object
- t2 = $OutputForm => NIL
+ t2 = $OutputForm => nil
isEqualOrSubDomain(t1,$Integer) and typeIsASmallInteger(t2) and SMINTP(val) =>
objNewWrap(val,t2)
- t1 = $Integer => NIL
- t1 = $Symbol => NIL
- t1 = $OutputForm => NIL
+ t1 = $Integer => nil
+ t1 = $Symbol => nil
+ t1 = $OutputForm => nil
(c := retractByFunction(object, t2)) => c
t1 is [D,:.] =>
fun := GETL(D,'retract) or
makeSymbol strconc('"retract",STRINGIMAGE D)
functionp fun =>
- PUT(D,'retract,fun)
+ property(D,'retract) := fun
c := CATCH('coerceFailure,FUNCALL(fun,object,t2))
- (c = $coerceFailure) => NIL
+ (c = $coerceFailure) => nil
c
- NIL
- NIL
+ nil
+ nil
retractByFunction(object,u) ==
-- tries to retract by using function "retractIfCan"
-- if the type belongs to the correct category.
- $reportBottomUpFlag: local := NIL
+ $reportBottomUpFlag: local := nil
t := objMode object
- -- JHD/CRF not ofCategory(t,['RetractableTo,u]) => NIL
+ -- JHD/CRF not ofCategory(t,['RetractableTo,u]) => nil
val := objValUnwrap object
-- try to get and apply the function "retractable?"
target := ['Union,u,'"failed"]
funName := 'retractIfCan
if $reportBottomUpFlag then
- sayFunctionSelection(funName,[t],target,NIL,
+ sayFunctionSelection(funName,[t],target,nil,
'"coercion facility (retraction)")
-- JHD/CRF if (mms := findFunctionInDomain(funName,t,target,[t],[t],'T,'T))
- -- MCD: changed penultimate variable to NIL.
- if (mms := append(findFunctionInDomain(funName,t,target,[t],[t],NIL,'T),
- findFunctionInDomain(funName,u,target,[t],[t],NIL,'T)))
+ -- MCD: changed penultimate variable to nil.
+ if (mms := append(findFunctionInDomain(funName,t,target,[t],[t],nil,'T),
+ findFunctionInDomain(funName,u,target,[t],[t],nil,'T)))
-- The above two lines were: (RDJ/BMT 6/95)
-- if (mms := append(findFunctionInDomain(funName,t,target,[t],[t],'T,'T),
-- findFunctionInDomain(funName,u,target,[t],[t],'T,'T)))
then mms := orderMms(funName,mms,[t],[t],target)
if $reportBottomUpFlag then
sayFunctionSelectionResult(funName,[t],mms)
- null mms => NIL
+ null mms => nil
-- [[dc,:.],slot,.]:= first mms
dc := CAAAR mms
@@ -311,14 +311,14 @@ retractByFunction(object,u) ==
fun :=
--+
compiledLookup(funName,[target,t],dcVector)
- null fun => NIL
- first(fun) = function Undef => NIL
+ null fun => nil
+ first(fun) = function Undef => nil
--+
$: fluid := dcVector
object' := coerceUnion2Branch objNewWrap(SPADCALL(val,fun),target)
u' := objMode object'
u = u' => object'
- NIL
+ nil
--% Coercion utilities
@@ -327,7 +327,7 @@ retractByFunction(object,u) ==
-- returns the representation of 1 in the domain S.
getConstantFromDomain(form,domainForm) ==
- isPartialMode domainForm => NIL
+ isPartialMode domainForm => nil
opAlist := getConstructorOperationsFromDB domainForm.op
key := opOf form
entryList := LASSOC(key,opAlist)
@@ -395,11 +395,11 @@ algEqual(object1, object2, domain) ==
-- coerce D2D from s3 to s1
-- finally we embed s1 into t2, which completes the coercion t1 to t2
--- the result of canCoerceFrom is TRUE or NIL
--- the result of coerceInteractive is a object or NIL (=failed)
+-- the result of canCoerceFrom is TRUE or nil
+-- the result of coerceInteractive is a object or nil (=failed)
-- all boot coercion functions have the following result:
--- 1. if u=$fromCoerceable$, then TRUE or NIL
--- 2. if the coercion succeeds, the coerced value (this may be NIL)
+-- 1. if u=$fromCoerceable$, then TRUE or nil
+-- 2. if the coercion succeeds, the coerced value (this may be nil)
-- 3. if the coercion fails, they throw to a catch point in
-- coerceByFunction
@@ -407,12 +407,12 @@ algEqual(object1, object2, domain) ==
canCoerce1(t1,t2) ==
-- general test for coercion
- -- the result is NIL if it fails
+ -- the result is nil if it fails
t1 = t2 => true
absolutelyCanCoerceByCheating(t1,t2) or t1 = $None or t2 = $Any or
member(t1,'((Mode) (Category))) =>
t2 = $OutputForm => true
- NIL
+ nil
-- next is for tagged union selectors for the time being
t1 is ['Variable,=t2] or t2 is ['Variable,=t1] => true
string? t1 =>
@@ -420,14 +420,14 @@ canCoerce1(t1,t2) ==
t2 = $OutputForm => true
t2 is ['Union,:.] => canCoerceUnion(t1,t2)
t2 is ['Variable,v] and (t1 = PNAME(v)) => true
- NIL
+ nil
string? t2 =>
t1 is ['Variable,v] and (t2 = PNAME(v)) => true
- NIL
- atom t1 or atom t2 => NIL
- null isValidType(t2) => NIL
+ nil
+ atom t1 or atom t2 => nil
+ null isValidType(t2) => nil
- absolutelyCannotCoerce(t1,t2) => NIL
+ absolutelyCannotCoerce(t1,t2) => nil
nt1 := first t1
nt2 := first t2
@@ -436,7 +436,7 @@ canCoerce1(t1,t2) ==
nt2="Mapping" =>
nt1="Variable" or nt1="FunctionCalled" =>
canCoerceExplicit2Mapping(t1,t2)
- NIL
+ nil
nt1="Union" or nt2="Union" => canCoerceUnion(t1,t2)
-- efficiency hack
@@ -468,11 +468,11 @@ canCoerceFrom0(t1,t2) ==
-- make sure we are trying to coerce to a legal type
-- in particular, polynomials are repeated, etc.
- null isValidType(t2) => NIL
- null isLegitimateMode(t2,nil,nil) => NIL
+ null isValidType(t2) => nil
+ null isLegitimateMode(t2,nil,nil) => nil
t1 = $RationalNumber =>
- isEqualOrSubDomain(t2,$Integer) => NIL
+ isEqualOrSubDomain(t2,$Integer) => nil
canCoerce(t1,t2) or canCoerce(s1,s2)
canCoerce(s1,s2)
stopTimingProcess 'querycoerce
@@ -495,9 +495,9 @@ canCoerceTopMatching(t1,t2,tt1,tt2) ==
not (symbolMember?(tt1,$univariateDomains) or symbolMember?(tt2,$multivariateDomains)) =>
'maybe
u2 := deconstructT t2
- 1 = #u2 => NIL
+ 1 = #u2 => nil
u1 := deconstructT t1
- 1 = #u1 => NIL -- no under domain
+ 1 = #u1 => nil -- no under domain
first(u1) ~= first(u2) => 'maybe
canCoerce(underDomainOf t1, underDomainOf t2)
@@ -506,7 +506,7 @@ canCoerceExplicit2Mapping(t1,t is ['Mapping,target,:argl]) ==
-- and target
$useCoerceOrCroak: local := nil
t1 is ['Variable,var] =>
- null (mms :=selectMms1(var,target,argl,[NIL for a in argl],true)) => NIL
+ null (mms :=selectMms1(var,target,argl,[nil for a in argl],true)) => nil
mm := CAAR mms
mm is [., targ, :.] =>
targ = target => true
@@ -523,8 +523,8 @@ canCoerceExplicit2Mapping(t1,t is ['Mapping,target,:argl]) ==
targ = target => true
false
false
- NIL
- NIL
+ nil
+ nil
canCoerceUnion(t1,t2) ==
-- sees if one can coerce to or from a Union Domain
@@ -558,15 +558,15 @@ canCoerceByMap(t1,t2) ==
-- map: (U1 -> U2, D U1) -> D U2. If it exists, then answer true
-- if canCoerceFrom(t1,t2).
u2 := deconstructT t2
- 1 = #u2 => NIL
+ 1 = #u2 => nil
u1 := deconstructT t1
- 1 = #u1 => NIL -- no under domain
- first(u1) ~= first(u2) => NIL
+ 1 = #u1 => nil -- no under domain
+ first(u1) ~= first(u2) => nil
top := CAAR u1
u1 := underDomainOf t1
u2 := underDomainOf t2
- absolutelyCannotCoerce(u1,u2) => NIL
+ absolutelyCannotCoerce(u1,u2) => nil
-- save some time for those we know about
know := '(List Vector Segment Stream UniversalSegment Array
@@ -574,7 +574,7 @@ canCoerceByMap(t1,t2) ==
top in know => canCoerce(u1,u2)
null selectMms1('map,t2,[['Mapping,u2,u1],t1],
- [['Mapping,u2,u1],u1],NIL) => NIL
+ [['Mapping,u2,u1],u1],nil) => nil
-- don't bother checking for Undef, so avoid instantiation
canCoerce(u1,u2)
@@ -585,7 +585,7 @@ canCoerceTower(t1,t2) ==
canCoerceLocal(t1,t2) or canCoercePermute(t1,t2) or
[c1,:arg1]:= deconstructT t1
arg1 and
- TL:= NIL
+ TL:= nil
arg:= arg1
until x or not arg repeat x:=
t:= last arg
@@ -606,7 +606,7 @@ canCoerceLocal(t1,t2) ==
-- test for coercion on top level
p:= ASSQ(first t1,$CoerceTable)
p and ASSQ(first t2,rest p) is [.,:[tag,fun]] =>
- tag='partial => NIL
+ tag='partial => nil
tag='total => true
(functionp(fun) and
(v:=CATCH('coerceFailure,FUNCALL(fun,'_$fromCoerceable_$,t1,t2)))
@@ -628,14 +628,14 @@ newCanCoerceCommute(t1,t2) ==
canCoercePermute(t1,t2) ==
-- try to generate a sequence of transpositions that will convert
-- t1 into t2
- member(t2,'((Integer) (OutputForm))) => NIL
+ member(t2,'((Integer) (OutputForm))) => nil
towers := computeTTTranspositions(t1,t2)
-- at this point, first towers = t1 and last towers should be similar
-- to t2 in the sense that the components of t1 are in the same order
-- as in t2. If length towers = 2 and t2 = last towers, we quit to
-- avoid an infinte loop.
- null towers or null rest towers => NIL
- null CDDR towers and t2 = second towers => NIL
+ null towers or null rest towers => nil
+ null CDDR towers and t2 = second towers => nil
-- do the coercions successively, quitting if any fail
ok := true
for t in rest towers while ok repeat
@@ -644,23 +644,23 @@ canCoercePermute(t1,t2) ==
ok
canConvertByFunction(m1,m2) ==
- null $useConvertForCoercions => NIL
+ null $useConvertForCoercions => nil
canCoerceByFunction1(m1,m2,'convert)
canCoerceByFunction(m1,m2) == canCoerceByFunction1(m1,m2,'coerce)
canCoerceByFunction1(m1,m2,fun) ==
- -- calls selectMms with $Coerce=NIL and tests for required target=m2
- $declaredMode:local:= NIL
- $reportBottomUpFlag:local:= NIL
+ -- calls selectMms with $Coerce=nil and tests for required target=m2
+ $declaredMode:local:= nil
+ $reportBottomUpFlag:local:= nil
-- have to handle cases where we might have changed from RN to QF I
-- make 2 lists of expanded and unexpanded types
l1 := removeDuplicates [m1,eqType m1]
l2 := removeDuplicates [m2,eqType m2]
- ans := NIL
+ ans := nil
for t1 in l1 while not ans repeat
for t2 in l2 while not ans repeat
- l := selectMms1(fun,t2,[t1],[t1],NIL)
+ l := selectMms1(fun,t2,[t1],[t1],nil)
ans := [x for x in l | x is [sig,:.] and second sig=t2 and
third sig=t1 and
first(sig) isnt ['TypeEquivalence,:.]] and true
@@ -684,7 +684,7 @@ absolutelyCanCoerceByCheating(t1,t2) ==
absolutelyCannotCoerce(t1,t2) ==
-- response of true means "definitely cannot coerce"
-- this is largely an efficiency hack
- atom(t1) or atom(t2) => NIL
+ atom(t1) or atom(t2) => nil
t2 = $None => true
n1 := first t1
n2 := first t2
@@ -724,10 +724,10 @@ absolutelyCannotCoerce(t1,t2) ==
true
v2 := deconstructT t2
- 1 = #v2 => NIL
+ 1 = #v2 => nil
v1 := deconstructT t1
- 1 = #v1 => NIL
- first(v1) ~= first(v2) => NIL
+ 1 = #v1 => nil
+ first(v1) ~= first(v2) => nil
absolutelyCannotCoerce(u1,u2)
typeIsASmallInteger x == (x = $SingleInteger)
@@ -740,7 +740,7 @@ coerceInteractive(triple,t2) ==
-- (see recordInstantiation)
t1 := objMode triple
val := objVal triple
- null(t2) or t2 = $EmptyMode => NIL
+ null(t2) or t2 = $EmptyMode => nil
t2 = t1 => triple
t2 = '$NoValueMode => objNew(val,t2)
if t2 is ['SubDomain,x,.] then t2:= x
@@ -782,7 +782,7 @@ coerceInt0(triple,t2) ==
s1 := equiType(t1)
s2 := equiType(t2)
s1 = s2 => return objNew(val,t2)
- -- t1 is ['Mapping,:.] and t2 ~= $Any => NIL
+ -- t1 is ['Mapping,:.] and t2 ~= $Any => nil
-- note: may be able to coerce TO mapping
-- treat Exit like Any
-- handle case where we must generate code
@@ -796,7 +796,7 @@ coerceInt0(triple,t2) ==
sameObject?(s2,t2) => x
objSetMode(x,t2)
x
- NIL
+ nil
coerceInt(triple, t2) ==
val := coerceInt1(triple, t2) => val
@@ -809,9 +809,9 @@ coerceInt(triple, t2) ==
coerceInt1(triple,t2) ==
-- general interactive coercion
- -- the result is a new triple with type m2 or NIL (= failed)
+ -- the result is a new triple with type m2 or nil (= failed)
$useCoerceOrCroak: local := true
- t2 = $EmptyMode => NIL
+ t2 = $EmptyMode => nil
t1 := objMode triple
t1=t2 => triple
val := objVal triple
@@ -826,7 +826,7 @@ coerceInt1(triple,t2) ==
typeIsASmallInteger(t2) and isEqualOrSubDomain(t1, $Integer) and INTP val =>
SINTP val => objNew(val,t2)
- NIL
+ nil
t2 = $Void => objNew(voidValue(),$Void)
t2 = $Any => objNewWrap([t1,:unwrap val],$Any)
@@ -841,17 +841,17 @@ coerceInt1(triple,t2) ==
t1 is ['Variable,v] and (t2 = PNAME(v)) => objNewWrap(t2,t2)
val' := unwrap val
(t2 = val') and ((val' = t1) or (t1 = $String)) => objNew(val,t2)
- NIL
+ nil
t1 is ['Union,:.] => coerceIntFromUnion(triple,t2)
t2 is ['Union,:.] => coerceInt2Union(triple,t2)
(string? t1) and (t2 = $String) => objNew(val,$String)
(string? t1) and (t2 is ['Variable,v]) =>
t1 = PNAME(v) => objNewWrap(v,t2)
- NIL
+ nil
(string? t1) and (t1 = unwrap val) =>
t2 = $OutputForm => objNew(t1,$OutputForm)
- NIL
- atom t1 => NIL
+ nil
+ atom t1 => nil
if t1 = $AnonymousFunction and (t2 is ['Mapping,target,:margl]) then
$useCoerceOrCroak := nil
@@ -861,24 +861,24 @@ coerceInt1(triple,t2) ==
vars is ["tuple",:.] => rest vars
vars
#margl ~= #vars => 'continue
- tree := mkAtree ['ADEF,vars,[target,:margl],[NIL for x in rest t2],:body]
+ tree := mkAtree ['ADEF,vars,[target,:margl],[nil for x in rest t2],:body]
CATCH('coerceOrCroaker, bottomUp tree) = 'croaked => nil
return getValue tree
(t1 = $Symbol) and (t2 is ['Mapping,target,:margl]) =>
- null (mms := selectMms1(unwrap val,nil,margl,margl,target)) => NIL
+ null (mms := selectMms1(unwrap val,nil,margl,margl,target)) => nil
[dc,targ,:argl] := CAAR mms
- targ ~= target => NIL
+ targ ~= target => nil
$genValue =>
fun := getFunctionFromDomain(unwrap val,dc,argl)
objNewWrap(fun,t2)
val := NRTcompileEvalForm(unwrap val, rest CAAR mms, evalDomain dc)
objNew(val, t2)
(t1 is ['Variable,sym]) and (t2 is ['Mapping,target,:margl]) =>
- null (mms := selectMms1(sym,target,margl,margl,NIL)) =>
- null (mms := selectMms1(sym,target,margl,margl,true)) => NIL
+ null (mms := selectMms1(sym,target,margl,margl,nil)) =>
+ null (mms := selectMms1(sym,target,margl,margl,true)) => nil
[dc,targ,:argl] := CAAR mms
- targ ~= target => NIL
+ targ ~= target => nil
dc is ["__FreeFunction__",:freeFun] => objNew( freeFun, t2 )
$genValue => objNewWrap( getFunctionFromDomain(sym,dc,argl), t2 )
val := NRTcompileEvalForm(sym, rest CAAR mms, evalDomain dc)
@@ -886,26 +886,26 @@ coerceInt1(triple,t2) ==
(t1 is ['FunctionCalled,sym]) and (t2 is ['Mapping,target,:margl]) =>
symNode := mkAtreeNode sym
transferPropsToNode(sym,symNode)
- null (mms := selectLocalMms(symNode,sym,margl,target)) => NIL
+ null (mms := selectLocalMms(symNode,sym,margl,target)) => nil
[dc,targ,:argl] := CAAR mms
- targ ~= target => NIL
+ targ ~= target => nil
ml := [target,:margl]
intName :=
or/[mm for mm in mms | (mm is [[., :ml1],oldName,:.]
and compareTypeLists(ml1,ml))] => [oldName]
- NIL
- null intName => NIL
+ nil
+ null intName => nil
objNewWrap(intName,t2)
(t1 is ['FunctionCalled,sym]) =>
(t3 := get(sym,'mode,$e)) and t3 is ['Mapping,:.] =>
(triple' := coerceInt(triple,t3)) => coerceInt(triple',t2)
- NIL
- NIL
+ nil
+ nil
sameObject?(first(t1),'Variable) and cons?(t2) and
(isEqualOrSubDomain(t2,$Integer) or
(t2 = [$QuotientField, $Integer]) or symbolMember?(first(t2),
- '(RationalNumber BigFloat NewFloat Float DoubleFloat))) => NIL
+ '(RationalNumber BigFloat NewFloat Float DoubleFloat))) => nil
ans := coerceRetract(triple,t2) or coerceIntTower(triple,t2) or
[.,:arg]:= deconstructT t2
@@ -939,16 +939,16 @@ coerceIntX(val,t1, t2) ==
-- this will almost always be an empty list
null unwrap val =>
-- try getting a better flavor of List
- null (t0 := underDomainOf(t2)) => NIL
+ null (t0 := underDomainOf(t2)) => nil
coerceInt(objNewWrap(val,['List,t0]),t2)
- NIL
- NIL
+ nil
+ nil
compareTypeLists(tl1,tl2) ==
-- returns true if every type in tl1 is = or is a subdomain of
-- the corresponding type in tl2
for t1 in tl1 for t2 in tl2 repeat
- not isEqualOrSubDomain(t1,t2) => return NIL
+ not isEqualOrSubDomain(t1,t2) => return nil
true
coerceIntAlgebraicConstant(object,t2) ==
@@ -961,7 +961,7 @@ coerceIntAlgebraicConstant(object,t2) ==
ofCategory(t1,$AbelianMonoid) and ofCategory(t2,$AbelianMonoid) and
val = getConstantFromDomain($Zero,t1) =>
objNewWrap(getConstantFromDomain($Zero,t2),t2)
- NIL
+ nil
++ returns true if `val' belongs to the Union branch guarded by `pred'.
thisUnionBranch?: (%Code,%Thing) -> %Boolean
@@ -973,13 +973,13 @@ coerceUnion2Branch(object) ==
predList:= mkPredList doms
doms := stripUnionTags doms
val' := objValUnwrap object
- predicate := NIL
- targetType:= NIL
+ predicate := nil
+ targetType:= nil
for typ in doms for pred in predList while null targetType repeat
thisUnionBranch?(pred,val') =>
predicate := pred
targetType := typ
- null targetType => keyedSystemError("S2IC0013",NIL)
+ null targetType => keyedSystemError("S2IC0013",nil)
predicate is ['%ieq,['%head,.],p] => objNewWrap(rest val',targetType)
objNew(objVal object,targetType)
@@ -1010,7 +1010,7 @@ coerceInt2Union(object,union) ==
for d in unionDoms while noCoerce repeat
(val' := coerceInt(object,d)) => noCoerce := nil
val' => coerceBranch2Union(val',union)
- NIL
+ nil
coerceIntFromUnion(object,t2) ==
-- coerces from a Union type to something else
@@ -1024,12 +1024,12 @@ coerceIntByMap(triple,t2) ==
t1 := objMode triple
t2 = t1 => triple
u2 := deconstructT t2 -- compute t2 first because of Expression
- 1 = #u2 => NIL -- no under domain
+ 1 = #u2 => nil -- no under domain
u1 := deconstructT t1
- 1 = #u1 => NIL
+ 1 = #u1 => nil
CAAR u1 ~= CAAR u2 => nil -- constructors not equal
- not valueArgsEqual?(t1, t2) => NIL
--- first u1 ~= first u2 => NIL
+ not valueArgsEqual?(t1, t2) => nil
+-- first u1 ~= first u2 => nil
top := CAAR u1
u1 := underDomainOf t1
u2 := underDomainOf t2
@@ -1040,24 +1040,24 @@ coerceIntByMap(triple,t2) ==
args := [['Mapping,u2,u1],t1]
if $reportBottomUpFlag then
- sayFunctionSelection('map,args,t2,NIL,
+ sayFunctionSelection('map,args,t2,nil,
'"coercion facility (map)")
- mms := selectMms1('map,t2,args,args,NIL)
+ mms := selectMms1('map,t2,args,args,nil)
if $reportBottomUpFlag then
sayFunctionSelectionResult('map,args,mms)
- null mms => NIL
+ null mms => nil
[[dc,:sig],slot,.]:= first mms
fun := compiledLookup('map,sig,evalDomain(dc))
- null fun => NIL
+ null fun => nil
[fn,:d]:= fun
- fn = function Undef => NIL
+ fn = function Undef => nil
-- now compile a function to do the coercion
code := ['SPADCALL,['CONS,["function","coerceIntByMapInner"],MKQ [u1,:u2]],
getValueNormalForm triple,MKQ fun]
-- and apply the function
val := CATCH('coerceFailure,timedEvaluate code)
- (val = $coerceFailure) => NIL
+ (val = $coerceFailure) => nil
objNewWrap(val,t2)
coerceIntByMapInner(arg,[u1,:u2]) == coerceOrThrowFailure(arg,u1,u2)
@@ -1071,7 +1071,7 @@ valueArgsEqual?(t1, t2) ==
constrSig := rest getConstructorSignature first t1
tl1 := replaceSharps(constrSig, t1)
tl2 := replaceSharps(constrSig, t2)
- not symbolMember?(NIL, coSig) => true
+ not symbolMember?(nil, coSig) => true
done := false
value := true
for a1 in rest t1 for a2 in rest t2 for cs in coSig
@@ -1095,7 +1095,7 @@ coerceIntTower(triple,t2) ==
t1 := objMode triple
[c1,:arg1]:= deconstructT t1
arg1 and
- TL:= NIL
+ TL:= nil
arg:= arg1
until x or not arg repeat
t:= last arg
@@ -1104,17 +1104,17 @@ coerceIntTower(triple,t2) ==
x := arg and coerceIntTest(t,t2) =>
CDDR TL =>
s := constructT(c1,replaceLast(arg1,bubbleConstructor TL))
- (null isValidType(s)) => (x := NIL)
+ (null isValidType(s)) => (x := nil)
x := (coerceIntByMap(triple,s) or
coerceIntTableOrFunction(triple,s)) =>
[c2,:arg2]:= deconstructT last s
s:= bubbleConstructor [c2,arg2,c1,arg1]
- (null isValidType(s)) => (x := NIL)
+ (null isValidType(s)) => (x := nil)
x:= coerceIntCommute(x,s) =>
x := (coerceIntByMap(x,t2) or
coerceIntTableOrFunction(x,t2))
s:= bubbleConstructor [c,arg,c1,arg1]
- (null isValidType(s)) => (x := NIL)
+ (null isValidType(s)) => (x := nil)
x:= coerceIntCommute(triple,s) =>
x:= (coerceIntByMap(x,t2) or
coerceIntTableOrFunction(x,t2))
@@ -1123,15 +1123,15 @@ coerceIntTower(triple,t2) ==
coerceIntSpecial(triple,t2) ==
t1 := objMode triple
t2 is ['SimpleAlgebraicExtension,R,U,.] and t1 = R =>
- null (x := coerceInt(triple,U)) => NIL
+ null (x := coerceInt(triple,U)) => nil
coerceInt(x,t2)
- NIL
+ nil
coerceIntTableOrFunction(triple,t2) ==
-- this function does the actual coercion to t2, but not to an
-- argument type of t2
- null isValidType t2 => NIL -- added 9-18-85 by RSS
- null isLegitimateMode(t2,NIL,NIL) => NIL -- added 6-28-87 by RSS
+ null isValidType t2 => nil -- added 9-18-85 by RSS
+ null isLegitimateMode(t2,nil,nil) => nil -- added 6-28-87 by RSS
t1 := objMode triple
p:= ASSQ(first t1,$CoerceTable)
p and ASSQ(first t2,rest p) is [.,:[tag,fun]] =>
@@ -1139,20 +1139,20 @@ coerceIntTableOrFunction(triple,t2) ==
fun='Identity => objNew(val,t2)
tag='total =>
coerceByTable(fun,val,t1,t2,'T) or coerceByFunction(triple,t2)
- coerceByTable(fun,val,t1,t2,NIL) or coerceByFunction(triple,t2)
+ coerceByTable(fun,val,t1,t2,nil) or coerceByFunction(triple,t2)
coerceByFunction(triple,t2)
coerceCommuteTest(t1,t2) ==
- null isLegitimateMode(t2,NIL,NIL) => NIL
+ null isLegitimateMode(t2,nil,nil) => nil
-- sees whether t1 = D1 D2 R and t2 = D2 D1 S
- null (u1 := underDomainOf t1) => NIL
- null (u2 := underDomainOf t2) => NIL
+ null (u1 := underDomainOf t1) => nil
+ null (u2 := underDomainOf t2) => nil
-- must have underdomains (ie, R and S must be there)
- null (v1 := underDomainOf u1) => NIL
- null (v2 := underDomainOf u2) => NIL
+ null (v1 := underDomainOf u1) => nil
+ null (v2 := underDomainOf u2) => nil
-- now check that cross of constructors is correct
(first(deconstructT t1) = first(deconstructT u2)) and
@@ -1161,55 +1161,55 @@ coerceCommuteTest(t1,t2) ==
coerceIntCommute(obj,target) ==
-- note that the value in obj may be $fromCoerceable$, for canCoerce
source := objMode obj
- null coerceCommuteTest(source,target) => NIL
+ null coerceCommuteTest(source,target) => nil
S := underDomainOf source
T := underDomainOf target
- source = T => NIL -- handle in other ways
+ source = T => nil -- handle in other ways
source is [D,:.] =>
fun := GETL(D,'coerceCommute) or
makeSymbol strconc('"commute",STRINGIMAGE D)
functionp fun =>
- PUT(D,'coerceCommute,fun)
+ property(D,'coerceCommute) := fun
u := objValUnwrap obj
c := CATCH('coerceFailure,FUNCALL(fun,u,source,S,target,T))
- (c = $coerceFailure) => NIL
+ (c = $coerceFailure) => nil
u = "$fromCoerceable$" => c
objNewWrap(c,target)
- NIL
- NIL
+ nil
+ nil
coerceIntPermute(object,t2) ==
- member(t2,'((Integer) (OutputForm))) => NIL
+ member(t2,'((Integer) (OutputForm))) => nil
t1 := objMode object
towers := computeTTTranspositions(t1,t2)
-- at this point, first towers = t1 and last towers should be similar
-- to t2 in the sense that the components of t1 are in the same order
-- as in t2. If length towers = 2 and t2 = last towers, we quit to
-- avoid an infinte loop.
- null towers or null rest towers => NIL
- null CDDR towers and t2 = second towers => NIL
+ null towers or null rest towers => nil
+ null CDDR towers and t2 = second towers => nil
-- do the coercions successively, quitting if any fail
ok := true
for t in rest towers while ok repeat
- null (object := coerceInt(object,t)) => ok := NIL
+ null (object := coerceInt(object,t)) => ok := nil
ok => object
- NIL
+ nil
computeTTTranspositions(t1,t2) ==
-- decompose t1 into its tower parts
tl1 := decomposeTypeIntoTower t1
tl2 := decomposeTypeIntoTower t2
-- if not at least 2 parts, don't bother working here
- null (rest tl1 and rest tl2) => NIL
+ null (rest tl1 and rest tl2) => nil
-- determine the relative order of the parts of t1 in t2
p2 := [position(d1,tl2) for d1 in tl1]
- member(-1,p2) => NIL -- something not present
+ member(-1,p2) => nil -- something not present
-- if they are all ascending, this function will do nothing
p2' := MSORT p2
- p2 = p2' => NIL
+ p2 = p2' => nil
-- if anything is repeated twice, leave
- p2' ~= MSORT removeDuplicates p2' => NIL
+ p2' ~= MSORT removeDuplicates p2' => nil
-- create a list of permutations that transform the tower parts
-- of t1 into the order they are in in t2
n1 := #tl1
@@ -1251,16 +1251,16 @@ permuteToOrder(p,n,start) ==
-- of swaps of adjacent elements so that p will be in order. We only
-- begin looking at index start
r := n - start
- r <= 0 => NIL
+ r <= 0 => nil
r = 1 =>
- p.r < p.(r+1) => NIL
+ p.r < p.(r+1) => nil
[[r,:(r+1)]]
p.start = start => permuteToOrder(p,n,start+1)
-- bubble up element start to the top. Find out where it is
- stpos := NIL
+ stpos := nil
for i in start+1..n while not stpos repeat
if p.i = start then stpos := i
- perms := NIL
+ perms := nil
while stpos ~= start repeat
x := stpos - 1
perms := [[x,:stpos],:perms]
@@ -1283,11 +1283,11 @@ coerceIntTest(t1,t2) ==
coerceByTable(fn,x,t1,t2,isTotalCoerce) ==
-- catch point for 'failure in boot coercions
- t2 = $OutputForm and not (newType? t1) => NIL
+ t2 = $OutputForm and not (newType? t1) => nil
isWrapped x =>
x:= unwrap x
c:= CATCH('coerceFailure,FUNCALL(fn,x,t1,t2))
- c=$coerceFailure => NIL
+ c=$coerceFailure => nil
objNewWrap(c,t2)
isTotalCoerce => objNew([fn,x,MKQ t1,MKQ t2],t2)
objNew(['catchCoerceFailure,MKQ fn,x,MKQ t1,MKQ t2],t2)
@@ -1307,8 +1307,8 @@ coerceByFunction(T,m2) ==
-- using the new modemap selection without coercions
-- should not be called by canCoerceFrom
x := objVal T
- x = '_$fromCoerceable_$ => NIL
- m2 is ['Union,:.] => NIL
+ x = '_$fromCoerceable_$ => nil
+ m2 is ['Union,:.] => nil
m1 := objMode T
m2 is ['Boolean,:.] and m1 is ['Equation,ud] =>
dcVector := evalDomain ud
@@ -1320,7 +1320,7 @@ coerceByFunction(T,m2) ==
isWrapped x =>
x:= unwrap x
objNewWrap(SPADCALL(first x,rest x,fun),m2)
- x isnt ['SPADCALL,a,b,:.] => keyedSystemError("S2IC0015",NIL)
+ x isnt ['SPADCALL,a,b,:.] => keyedSystemError("S2IC0015",nil)
code := ['SPADCALL, a, b, fun]
objNew(code,$Boolean)
-- If more than one function is found, any should suffice, I think -scm
@@ -1335,12 +1335,12 @@ coerceByFunction(T,m2) ==
NRTcompiledLookup(funName,slot,dcVector)
NRTcompileEvalForm(funName,slot,dcVector)
[fn,:d]:= fun
- fn = function Undef => NIL
+ fn = function Undef => nil
isWrapped x =>
--+
$: fluid := dcVector
val := CATCH('coerceFailure, SPADCALL(unwrap x,fun))
- (val = $coerceFailure) => NIL
+ (val = $coerceFailure) => nil
objNewWrap(val,m2)
env := fun
code := ['failCheck, ['SPADCALL, x, env]]
@@ -1350,13 +1350,13 @@ coerceByFunction(T,m2) ==
m1' := eqType m1
m2' := eqType m2
(m1 ~= m1') or (m2 ~= m2') => coerceByFunction(objNew(x,m1'),m2')
- NIL
+ nil
hasCorrectTarget(m,sig is [dc,tar,:.]) ==
-- tests whether the target of signature sig is either m or a union
-- containing m. It also discards TEQ as it is not meant to be
-- used at top-level
- dc is ['TypeEquivalence,:.] => NIL
+ dc is ['TypeEquivalence,:.] => nil
m=tar => 'T
tar is ['Union,t,'failed] => t=m
tar is ['Union,'failed,t] and t=m
@@ -1366,7 +1366,7 @@ hasCorrectTarget(m,sig is [dc,tar,:.]) ==
--Modified by JHD 9/9/93 to fix a problem with coerces inside
--interpreter functions being used as mappings. They were being
---handled with $useCoerceOrCroak being NIL, and therefore internal
+--handled with $useCoerceOrCroak being nil, and therefore internal
--coercions were not correctly handled. Fix: remove dependence
--on $useCoerceOrCroak, and test explicitly for Mapping types.
@@ -1375,7 +1375,7 @@ hasCorrectTarget(m,sig is [dc,tar,:.]) ==
intCodeGenCOERCE(triple,t2) ==
-- NOTE: returns a triple
t1 := objMode triple
- t1 = $EmptyMode => NIL
+ t1 = $EmptyMode => nil
t1 = t2 => triple
val := objVal triple
diff --git a/src/interp/i-coerfn.boot b/src/interp/i-coerfn.boot
index d65e8897..ec19d8fd 100644
--- a/src/interp/i-coerfn.boot
+++ b/src/interp/i-coerfn.boot
@@ -103,7 +103,7 @@ coerceDmp2(u,source is [.,v1,S],target is [.,v2,T]) ==
li:= VEC2LIST e
a:= [[LIST2VEC [if x then li.x else 0 for x in pat],:one]]
x:= SPADCALL(x,SPADCALL(objValUnwrap(z),a,multfunc),plusfunc)
- NIL
+ nil
z => x
coercionFailure()
@@ -295,7 +295,7 @@ Dmp2Up(u, source is [dmp,vl,S],target is [up,var,T]) ==
S1 := [dmp,vl',S]
plusfunc:= getFunctionFromDomain('_+,T,[T,T])
zero := getConstantFromDomain($Zero,T)
- x := NIL
+ x := nil
pos:= POSN1(var,vl)
for [e,:c] in u until not y repeat
exp:= e.pos
@@ -365,7 +365,7 @@ Expr2Dmp(u,source is [Expr,S], target is [dmp,v2,T]) ==
null v2 =>
not (z := coerceInt(objNewWrap(u, source), T)) => coercionFailure()
- [[LIST2VEC NIL, :objValUnwrap z]]
+ [[LIST2VEC nil, :objValUnwrap z]]
obj := objNewWrap(u, source)
univ := coerceInt(obj, ['UnivariatePolynomial, first v2, T])
@@ -740,10 +740,10 @@ Mp2Dmp(u, source is [., x, S], target is [dmp, y, T]) ==
Mp2SimilarDmp(u,S,n,plus,mult,one,zero) ==
u is [ =0,:c] =>
- c = zero => NIL -- zero for dmp
+ c = zero => nil -- zero for dmp
[[LIST2VEC LZeros n,:c]]
u is [ =1,x,:terms] =>
- u' := NIL -- zero for dmp
+ u' := nil -- zero for dmp
for [e,:c] in terms repeat
e' := LIST2VEC LZeros n
e'.(x-1) := e
@@ -814,7 +814,7 @@ Mp2Mp(u,source is [mp,x,S], target is [.,y,T]) ==
null y' => -- change source to MP[common] MP[x'] S
univariate := getFunctionFromDomain('univariate,
source,[source,['OrderedVariableList,x]])
- u' := Mp2MpAux2(u,x,common,x',common,x',univariate,S,NIL)
+ u' := Mp2MpAux2(u,x,common,x',common,x',univariate,S,nil)
(u' := coerceInt(objNewWrap(u', [mp,common,[mp,x',S]]),target)) or
coercionFailure()
objValUnwrap(u')
@@ -1139,7 +1139,7 @@ Qf2PF(u,source is [.,D],target) ==
den':= coerceInt(objNewWrap(den,D),target) or
coercionFailure()
den' := objValUnwrap den'
- equalZero(den', target) => throwKeyedMsg("S2IA0001",NIL)
+ equalZero(den', target) => throwKeyedMsg("S2IA0001",nil)
SPADCALL(num',den', getFunctionFromDomain("/",target,[target,target]))
Qf2F(u,source is [.,D,:.],target) ==
@@ -1260,7 +1260,7 @@ SUP2Up(u,source is [.,S],target is [.,x,T]) ==
-- try to go underneath first
null (u' := coerceInt(objNewWrap(u,source),T)) =>
-- must be careful in case any of the coeffs come back 0
- u' := NIL
+ u' := nil
zero := getConstantFromDomain($Zero,T)
for [e,:c] in u repeat
c' := objValUnwrap (coerceInt(objNewWrap(c,S),T) or
@@ -1357,7 +1357,7 @@ Sy2Up(u,source,target is [up,x,S]) ==
[[0,:objValUnwrap u]]
Sy2Var(u,source,target is [.,x]) ==
- u = '_$fromCoerceable_$ => NIL
+ u = '_$fromCoerceable_$ => nil
u=x => u
coercionFailure()
@@ -1490,7 +1490,7 @@ Up2SUP(u,source is [.,x,S],target is [.,T]) ==
S = T => u
-- try to go underneath first
null (u' := coerceInt(objNewWrap(u,source),T)) =>
- u' := NIL
+ u' := nil
zero := getConstantFromDomain($Zero,T)
for [e,:c] in u repeat
c' := objValUnwrap (coerceInt(objNewWrap(c,S),T) or
diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot
index e0772989..597566b0 100644
--- a/src/interp/i-eval.boot
+++ b/src/interp/i-eval.boot
@@ -107,7 +107,7 @@ evaluateType0 form ==
[op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]]
op='Enumeration => form
constructor? op => evaluateType1 form
- NIL
+ nil
IDENTP form and niladicConstructorFromDB form => evaluateType [form]
IDENTP form and (constructor? form or form in $BuiltinConstructorNames) =>
throwEvalTypeMsg("S2IE0003",[form,form])
@@ -229,9 +229,9 @@ evalForm(op,opName,argl,mmS) ==
#argl ~= #CDDR sig => 'skip ---> RDJ 6/95
form:=
$genValue or null cond =>
- [getArgValue2(x,t,sideEffectedArg?(t,sig,opName),opName) or return NIL
+ [getArgValue2(x,t,sideEffectedArg?(t,sig,opName),opName) or return nil
for x in argl for t in CDDR sig]
- [getArgValueComp2(x,t,c,sideEffectedArg?(t,sig,opName),opName) or return NIL
+ [getArgValueComp2(x,t,c,sideEffectedArg?(t,sig,opName),opName) or return nil
for x in argl for t in CDDR sig for c in cond]
form or null argl =>
dc:= first sig
@@ -239,7 +239,7 @@ evalForm(op,opName,argl,mmS) ==
dc='local => --[fun,:form]
atom fun =>
isLocallyBound fun => ['SPADCALL,:form,fun]
- [fun,:form,NIL]
+ [fun,:form,nil]
['SPADCALL,:form,fun]
dc is ["__FreeFunction__",:freeFun] =>
['SPADCALL,:form,freeFun]
@@ -262,7 +262,7 @@ evalForm(op,opName,argl,mmS) ==
[bpi,:domain] := fun0
sameObject?(bpi,function Undef) =>
sayKeyedMsg("S2IE0009",[opName,formatSignature rest sig,first sig])
- NIL
+ nil
if $NRTmonitorIfTrue = true then
sayBrightlyNT ['"Applying ",first fun0,'" to:"]
pp [devaluateDeeply x for x in form]
@@ -318,12 +318,12 @@ getMappingArgValue(a,t,m is ['Mapping,:ml]) ==
mmS := selectLocalMms(a,name,rest ml, nil)
or/[mm for mm in mmS |
(mm is [[., :ml1],oldName,:.] and ml=ml1)] => MKQ [oldName]
- NIL
+ nil
una
mmS := selectLocalMms(a,una,rest ml, nil)
or/[mm for mm in mmS |
(mm is [[., :ml1],oldName,:.] and ml=ml1)] => MKQ [oldName]
- NIL
+ nil
getArgValueComp2(arg, type, cond, se?, opName) ==
se? and (objMode(getValue arg) ~= type) =>
@@ -357,7 +357,7 @@ failCheck x ==
stopTimingProcess peekTimedName()
THROW('interpreter,objNewWrap('"failed",$String))
x = $coerceFailure =>
- NIL
+ nil
x
--% Some Antique Comments About the Interpreter
diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot
index 1e3cfab2..5138bd28 100644
--- a/src/interp/i-intern.boot
+++ b/src/interp/i-intern.boot
@@ -36,8 +36,8 @@ import i_-object
import ptrees
namespace BOOT
-$useParserSrcPos := NIL
-$transferParserSrcPos := NIL
+$useParserSrcPos := nil
+$transferParserSrcPos := nil
-- Making Trees
@@ -100,7 +100,7 @@ mkAtree1 x ==
vector? x => x
atom x =>
x in '(%noBranch %noMapVal) => x
- x in '(nil true false) => mkAtree2([x],x,NIL)
+ x in '(nil true false) => mkAtree2([x],x,nil)
x = '_/throwAway =>
-- don't want to actually compute this
tree := mkAtree1 '(void)
@@ -197,7 +197,7 @@ mkAtree3(x,op,argl) ==
[mkAtreeNode "not",[mkAtreeNode "=",mkAtree1 lhs,mkAtree1 rhs]]
op="in" and argl is [var ,["SEGMENT",lb,ul]] =>
upTest:=
- null ul => NIL
+ null ul => nil
mkLessOrEqual(var,ul)
lowTest:=mkLessOrEqual(lb,var)
z :=
@@ -214,15 +214,15 @@ mkAtree3(x,op,argl) ==
if funbody is [":",body,type] then
types := [type]
funbody := body
- else types := [NIL]
+ else types := [nil]
v := collectDefTypesAndPreds funargs
types := [:types,:v.1]
- [mkAtreeNode "ADEF",[v.0,types,[NIL for a in types],funbody],
+ [mkAtreeNode "ADEF",[v.0,types,[nil for a in types],funbody],
if v.2 then v.2 else true, false]
x is ['ADEF,arg,:r] =>
r := mkAtreeValueOf r
v :=
- null arg => VECTOR(NIL,NIL,NIL)
+ null arg => VECTOR(nil,nil,nil)
cons? arg and rest arg and first arg ~= "|" =>
collectDefTypesAndPreds ["tuple",:arg]
null rest arg => collectDefTypesAndPreds first arg
@@ -239,7 +239,7 @@ mkAtree3(x,op,argl) ==
r := mkAtreeValueOf r
a is [op,:arg] =>
v :=
- null arg => VECTOR(NIL,NIL,NIL)
+ null arg => VECTOR(nil,nil,nil)
cons? arg and rest arg and first arg ~= "|" =>
collectDefTypesAndPreds ["tuple",:arg]
null rest arg => collectDefTypesAndPreds first arg
@@ -317,10 +317,10 @@ collectDefTypesAndPreds args ==
-- slot 0: just the variables
-- slot 1: the type declarations on the variables
-- slot 2: a predicate for all arguments
- pred := types := vars := NIL
+ pred := types := vars := nil
junk :=
IDENTP args =>
- types := [NIL]
+ types := [nil]
vars := [args]
args is [":",var,type] =>
types := [type]
@@ -339,14 +339,14 @@ collectDefTypesAndPreds args ==
types := [:types,:v.1]
pred := addPred(pred,v.2)
vars := [var]
- types := [NIL]
+ types := [nil]
args is ["tuple",:args'] =>
for a in args' repeat
v := collectDefTypesAndPreds a
vars := [:vars,first v.0]
types := [:types,first v.1]
pred := addPred(pred,v.2)
- types := [NIL]
+ types := [nil]
vars := [args]
VECTOR(vars,types,pred)
where
@@ -438,7 +438,7 @@ rempropI(x,prop) ==
atom x => x
first x
getI(id,prop) =>
- recordNewValue(id,prop,NIL)
+ recordNewValue(id,prop,nil)
recordOldValue(id,prop,getI(id,prop))
$InteractiveFrame:= remprop(id,prop,$InteractiveFrame)
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index 9ef6a509..373b3610 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -45,7 +45,7 @@ $insideCompileBodyIfTrue := false
--% Generating internal names for functions
-$specialMapNameSuffix := NIL
+$specialMapNameSuffix := nil
makeInternalMapName(userName,numArgs,numMms,extraPart) ==
name := strconc('"*",STRINGIMAGE numArgs,'";",
@@ -62,7 +62,7 @@ isInternalMapName name ==
sz := # (name' := symbolName name)
(sz < 7) or (char "*" ~= name'.0) => false
not digit? name'.1 => false
- null STRPOS('"_;",name',1,NIL) => false
+ null STRPOS('"_;",name',1,nil) => false
-- good enough
true
@@ -117,7 +117,7 @@ addDefMap(['DEF,lhs,mapsig,.,rhs],pred) ==
-- that are not numbers.
parameters := [p for p in rest lhs | IDENTP(p)]
- -- see if a signature has been given. if anything in mapsig is NIL,
+ -- see if a signature has been given. if anything in mapsig is nil,
-- then declaration was omitted.
someDecs := nil
allDecs := true
@@ -129,7 +129,7 @@ addDefMap(['DEF,lhs,mapsig,.,rhs],pred) ==
if d then
someDecs := true
d' := evaluateType unabbrev d
- isPartialMode d' => throwKeyedMsg("S2IM0004",NIL)
+ isPartialMode d' => throwKeyedMsg("S2IM0004",nil)
-- tree := mkAtree d'
-- null (d' := isType tree) => throwKeyedMsg("S2IM0005",[d])
mapmode := [d',:mapmode]
@@ -152,8 +152,8 @@ addDefMap(['DEF,lhs,mapsig,.,rhs],pred) ==
--step process as this should not include recursive calls to the map
--itself, or the formal parameters
userVariables1 := getUserIdentifiersIn rhs
- $freeVars: local := NIL
- $localVars: local := NIL
+ $freeVars: local := nil
+ $localVars: local := nil
for parm in parameters repeat mkLocalVar($mapName,parm)
userVariables2 := setDifference(userVariables1,findLocalVars(op,rhs))
userVariables3 := setDifference(userVariables2, parameters)
@@ -184,7 +184,7 @@ addMap(lhs,rhs,pred) ==
body:= SUBLISNQ($sl,rhs)
oldMap :=
(obj := get(op,'value,$InteractiveFrame)) => objVal obj
- NIL
+ nil
newMap := augmentMap(op,argList,finalPred,body,oldMap)
null newMap =>
sayRemoveFunctionOrValue op
@@ -218,7 +218,7 @@ deleteMap(op,pattern,map) ==
true
null rest newMap => nil
newMap
- NIL
+ nil
getUserIdentifiersIn body ==
null body => nil
@@ -499,7 +499,7 @@ analyzeMap(op,argTypes,mapDef, tar) ==
$repeatLabel : local := nil -- for loops; see upREPEAT
$breakCount : local := 0 -- breaks from loops; ditto
$mapTarget : local := tar
- $interpOnly: local := NIL
+ $interpOnly: local := nil
$mapName : local := op.0
if get($mapName,'recursive,$e) then
argTypes := [f t for t in argTypes] where
@@ -524,7 +524,7 @@ analyzeMap(op,argTypes,mapDef, tar) ==
if getMode op isnt ['Mapping,:sig] then
sig := [nil,:[nil for type in argTypes]]
$e:=putHist(opName,'localModemap,
- [[['interpOnly,:sig],fun,NIL]],$e)
+ [[['interpOnly,:sig],fun,nil]],$e)
x
analyzeMap0(op,argTypes,mapDef) ==
@@ -628,7 +628,7 @@ rewriteMap1(opName,argl,sig) ==
else
tar:= nil
argTypes:= nil
- evArgl := NIL
+ evArgl := nil
for arg in reverse argl repeat
v := getValue arg
evArgl := [objNew(objVal v, objMode v),:evArgl]
@@ -655,7 +655,7 @@ interpMap(opName,tar) ==
$genValue : local:= true
$interpMapTag : local := nil
$interpOnly : local := true
- $localVars : local := NIL
+ $localVars : local := nil
for lvar in get(opName,'localVars,$e) repeat mkLocalVar(opName,lvar)
$mapName : local := opName
$mapTarget : local := tar
@@ -716,7 +716,7 @@ makeLocalModemap(op,sig) ==
-- create a local modemap for op with sig, and put it into $e
if (currentMms := get(op,'localModemap,$e)) then
untraceMapSubNames [CADAR currentMms]
- newName := makeInternalMapName(op,#sig-1,1+#currentMms,NIL)
+ newName := makeInternalMapName(op,#sig-1,1+#currentMms,nil)
newMm := [['local,:sig],newName,nil]
mms := [newMm,:currentMms]
$e := putHist(op,'localModemap,mms,$e)
@@ -802,8 +802,8 @@ mapRecurDepth(opName,opList,body) ==
analyzeUndeclaredMap(op,argTypes,mapDef,$mapList) ==
-- Computes the signature of the map named op, and compiles the body
- $freeVars: local := NIL
- $localVars: local := NIL
+ $freeVars: local := nil
+ $localVars: local := nil
$env: local:= [[nil]]
$mapList := [op,:$mapList]
parms:=[var for var in $FormalMapVariableList for m in argTypes]
@@ -1100,7 +1100,7 @@ listOfVariables pat ==
-- return a list of the variables in pat, which is an "is" pattern
IDENTP pat => (pat='_. => nil ; [pat])
pat is ['_:,var] or pat is ['_=,var] =>
- (var='_. => NIL ; [var])
+ (var='_. => nil ; [var])
cons? pat => removeDuplicates [:listOfVariables p for p in pat]
nil
@@ -1135,7 +1135,7 @@ getLocalVars(op,body) ==
-- case, y can never contain embedded wrapped expressions. The mode
-- part m of the triple is the type of y in the wrapped case and is
-- consistent with the declared mode if given. The mode part of an
--- unwrapped value is always $EmptyMode. The e part is usually NIL
+-- unwrapped value is always $EmptyMode. The e part is usually nil
-- but may be used to hold a partial closure.
--
-- Effect of changes. A rule can be built up for a variable by
diff --git a/src/interp/i-object.boot b/src/interp/i-object.boot
index 74359a51..5e4db99f 100644
--- a/src/interp/i-object.boot
+++ b/src/interp/i-object.boot
@@ -191,7 +191,7 @@ getBasicObject x ==
objNewWrap(x,t)
string? x => objNewWrap(x,$String)
FLOATP x => objNewWrap(x,$DoubleFloat)
- NIL
+ nil
--%% Vectorized Attributed Trees
@@ -226,9 +226,9 @@ mkAtreeNode x ==
emptyAtree expr ==
vector? expr =>
$immediateDataSymbol = expr.0 => nil
- expr.1:= NIL
- expr.2:= NIL
- expr.3:= NIL
+ expr.1:= nil
+ expr.2:= nil
+ expr.3:= nil
-- kill proplist too?
atom expr => nil
for e in expr repeat emptyAtree e
@@ -321,9 +321,9 @@ getModeOrFirstModeSetIfThere x ==
y := x.aModeSet =>
(y = [$EmptyMode]) and ((m := getMode x) is ['Mapping,:.]) => m
first y
- NIL
+ nil
m := getBasicMode x => m
- NIL
+ nil
getModeSetUseSubdomain x ==
x and cons? x => getModeSetUseSubdomain first x
@@ -382,8 +382,8 @@ getAtree(x,prop) ==
-- only willing to get property if op is a vector
-- otherwise will be pushing to deeply into calling structure
vector? op => getAtree(op,prop)
- NIL
- not vector? x => NIL -- just ignore it
+ nil
+ not vector? x => nil -- just ignore it
n:= QLASSQ(prop,'((mode . 1) (value . 2) (modeSet . 3)))
=> x.n
QLASSQ(prop,x.4)
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index ddb6f291..07059fd7 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -656,7 +656,7 @@ outputTranIf ['IF,x,y,z] ==
['SC,['CONCATB,'then,y'],['CONCATB,'else,z']]]
outputMapTran l ==
- null l => NIL -- should not happen
+ null l => nil -- should not happen
-- display subscripts linearly
$linearFormatScripts : local := true
@@ -702,7 +702,7 @@ outputTranIterate x ==
final =>
LISTP first final => [['PAREN,outputTran first final]]
[outputTran first final]
- NIL
+ nil
['STEP,outputTran n,init',outputTran step,:final']
x is ["IN",n,s] => ["IN",outputTran n,outputTran s]
x is [op,p] and op in '(_| UNTIL WHILE) =>
@@ -755,7 +755,7 @@ mkSuperSub(op,argl) ==
l:= drop(indexList.1,argl) => [subPart,:l]
subPart
-- otherwise use the SUPERSUB form
- superSubPart := NIL
+ superSubPart := nil
for i in rest indexList repeat
scripts :=
this:= take(i,argl)
@@ -1203,7 +1203,7 @@ deMatrix m ==
LargeMatrixp(u,width, dist) ==
-- sees if there is a matrix wider than 'width' in the next 'dist'
-- part of u, a sized charybdis structure.
- -- NIL if not, first such matrix if there is one
+ -- nil if not, first such matrix if there is one
atom u => nil
CDAR u <= width => nil
--CDAR is the width of a charybdis structure
@@ -1531,7 +1531,7 @@ formulaFormat expr ==
if not $collectOutput then
TERPRI $algebraOutputStream
FORCE_-OUTPUT $formulaOutputStream
- NIL
+ nil
texFormat expr ==
tf := $TexFormat
@@ -1541,7 +1541,7 @@ texFormat expr ==
SPADCALL(SPADCALL(expr,$IOindex,formatFn),displayFn)
TERPRI $texOutputStream
FORCE_-OUTPUT $texOutputStream
- NIL
+ nil
texFormat1 expr ==
tf := $TexFormat
@@ -1550,7 +1550,7 @@ texFormat1 expr ==
SPADCALL(SPADCALL(expr,formatFn),displayFn)
TERPRI $texOutputStream
FORCE_-OUTPUT $texOutputStream
- NIL
+ nil
mathmlFormat expr ==
mml := $MathMLFormat
@@ -1560,7 +1560,7 @@ mathmlFormat expr ==
SPADCALL(SPADCALL(expr,formatFn),displayFn)
TERPRI $mathmlOutputStream
FORCE_-OUTPUT $mathmlOutputStream
- NIL
+ nil
output(expr,domain) ==
if isWrapped expr then expr := unwrap expr
@@ -1612,7 +1612,7 @@ outputNumber(start,linelength,num) ==
if firsttime then
blnks:=strconc(blnks,'" ")
linelength:=linelength-1
- firsttime:=NIL
+ firsttime:=nil
if $collectOutput then
$outputLines := [strconc(blnks, num), :$outputLines]
else
@@ -2594,7 +2594,7 @@ maPrin u ==
$highlightDelta := 0
c := CATCH('outputFailure,charybdis(u, $MARGIN, $LINELENGTH))
c ~= 'outputFailure => c
- sayKeyedMsg("S2IX0009",NIL)
+ sayKeyedMsg("S2IX0009",nil)
u is ['EQUATNUM,num,form] or u is [['EQUATNUM,:.],num,form] =>
charybdis(['EQUATNUM,num], $MARGIN, $LINELENGTH)
if not $collectOutput then
diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot
index 1308fb54..a266737d 100644
--- a/src/interp/i-resolv.boot
+++ b/src/interp/i-resolv.boot
@@ -54,7 +54,7 @@ resolveTypeList u ==
a := resolveTT(md,a)
null a => return nil
a
- throwKeyedMsg("S2IR0002",NIL)
+ throwKeyedMsg("S2IR0002",nil)
-- resolveTT is in CLAMMED BOOT
@@ -73,7 +73,7 @@ resolveTT1(t1,t2) ==
-- then it tries to use a rewrite rule
-- and finally it builds up a tower
t1=t2 => t1
- (t1 = '$NoValueMode) or (t2 = '$NoValueMode) => NIL
+ (t1 = '$NoValueMode) or (t2 = '$NoValueMode) => nil
(t1 = $Void) or (t2 = $Void) => $Void
(t1 = $Any) or (t2 = $Any) => $Any
t1 = $Exit => t2
@@ -82,11 +82,11 @@ resolveTT1(t1,t2) ==
t2 is ['Union,:.] => resolveTTUnion(t2,t1)
string?(t1) =>
t2 = $String => t2
- NIL
+ nil
string?(t2) =>
t1 = $String => t1
- NIL
- null acceptableTypesToResolve(t1,t2) => NIL
+ nil
+ null acceptableTypesToResolve(t1,t2) => nil
if compareTT(t1,t2) then
t := t1
t1 := t2
@@ -115,12 +115,12 @@ acceptableTypesToResolve(t1,t2) ==
acceptableTypesToResolve1(t1,t2) ==
t1 = $Integer =>
- t2 = $String => NIL
+ t2 = $String => nil
true
t1 = $DoubleFloat or t1 = $Float =>
- t2 = $String => NIL
- t2 = '(RationalNumber) => NIL
- t2 = [$QuotientField, $Integer] => NIL
+ t2 = $String => nil
+ t2 = '(RationalNumber) => nil
+ t2 = [$QuotientField, $Integer] => nil
true
true
@@ -139,7 +139,7 @@ resolveTTUnion(t1 is ['Union,:doms],t2) ==
tagged := false
doms
member(t2,unionDoms1) => t1
- tagged => NIL
+ tagged => nil
t2 isnt ['Union,:doms2] =>
ud := nil
bad := nil
@@ -147,7 +147,7 @@ resolveTTUnion(t1 is ['Union,:doms],t2) ==
d is '"failed" => ud := [d,:ud]
null (d' := resolveTT(d,t2)) => bad := true
ud := [d',:ud]
- bad => NIL
+ bad => nil
['Union,:removeDuplicates reverse ud]
ud := nil
bad := nil
@@ -155,7 +155,7 @@ resolveTTUnion(t1 is ['Union,:doms],t2) ==
d is '"failed" => ud := append(ud,[d])
null (d' := resolveTTUnion(t1,d)) => bad := true
ud := append(ud,rest d')
- bad => NIL
+ bad => nil
['Union,:removeDuplicates ud]
resolveTTSpecial(t1,t2) ==
@@ -213,9 +213,9 @@ resolveTTSpecial(t1,t2) ==
ofCategory(t2, '(IntegerNumberSystem)) => resolveTT(['Polynomial, t2], t2)
resolveTT(['Polynomial,$Integer],t2)
t1 is ['FunctionCalled,f] and t2 is ['FunctionCalled,g] =>
- null (mf := get(f,'mode,$e)) => NIL
- null (mg := get(g,'mode,$e)) => NIL
- mf ~= mg => NIL
+ null (mf := get(f,'mode,$e)) => nil
+ null (mg := get(g,'mode,$e)) => nil
+ mf ~= mg => nil
mf
t1 is ['UnivariatePolynomial,x,S] =>
t2 is ["Variable",:.] => resolveTTSpecial(t2,t1)
@@ -253,7 +253,7 @@ resolveTTCC(t1,t2) ==
gt21 := GGREATERP(t2,t1)
(c12 := canCoerceFrom(t1,t2)) and gt21 => t2
c21 := canCoerceFrom(t2,t1)
- null (c12 or c21) => NIL
+ null (c12 or c21) => nil
c12 and not c21 => t2
c21 and not c12 => t1
-- both are coerceable to each other
@@ -296,7 +296,7 @@ resolveTTEq2(c1,arg1,TL is [c,arg,:.]) ==
resolveTTRed(t1,t2) ==
-- the same function as resolveTTEq, but instead of testing for
-- constructor equality, it looks whether a rewrite rule can be applied
- t := resolveTTRed1(t1,t2,NIL) => t
+ t := resolveTTRed1(t1,t2,nil) => t
[c1,:arg1] := deconstructT t1
t := arg1 and resolveTTRed2(t2,last arg1,[c1,arg1]) => t
[c2,:arg2] := deconstructT t2
@@ -306,7 +306,7 @@ resolveTTRed1(t1,t2,TL) ==
-- tries to apply a reduction rule on (Resolve t1 t2)
-- then it creates a type using the result and TL
sameObject?(t,term1RW(t := ['Resolve,t1,t2],$Res)) and
- sameObject?(t,term1RW(t := ['Resolve,t2,t1],$Res)) => NIL
+ sameObject?(t,term1RW(t := ['Resolve,t2,t1],$Res)) => nil
[c2,:arg2] := deconstructT t2
[c2,arg2,:TL] := bubbleType [c2,arg2,:TL]
t2 := constructM(c2,arg2)
@@ -340,7 +340,7 @@ resolveTTRed3(t) ==
t is ['SetEqual,a,b] =>
(and/[member(x,a) for x in b] and "and"/[member(x,b) for x in a]) and a
[( atom x and x ) or ((not cs and x and not interpOp? x and x)
- or resolveTTRed3 x) or return NIL
+ or resolveTTRed3 x) or return nil
for x in t for cs in getDualSignatureFromDB first t ]
interpOp?(op) ==
@@ -351,7 +351,7 @@ interpOp?(op) ==
resolveTCat(t,c) ==
-- this function attempts to find a type tc of category c such that
- -- t can be coerced to tc. NIL returned for failure.
+ -- t can be coerced to tc. nil returned for failure.
-- Example: t = Integer, c = Field ==> tc = RationalNumber
-- first check whether t already belongs to c
@@ -373,23 +373,23 @@ resolveTCat(t,c) ==
sd := superType t => resolveTCat(sd,c)
- #(td := deconstructT t) ~= 2=> NIL
- #(tc := deconstructT c) ~= 2 => NIL
+ #(td := deconstructT t) ~= 2=> nil
+ #(tc := deconstructT c) ~= 2 => nil
ut := underDomainOf t
- null isValidType(uc := last tc) => NIL
- null canCoerceFrom(ut,uc) => NIL
+ null isValidType(uc := last tc) => nil
+ null canCoerceFrom(ut,uc) => nil
nt := constructT(first td,[uc])
ofCategory(nt,c) => nt
- NIL
+ nil
resolveTCat1(t,c) ==
-- does the hard work of looking at conditions on under domains
-- if null (ut := getUnderModeOf(t)) then ut := last dt
- null (conds := getConditionsForCategoryOnType(t,c)) => NIL
---rest(conds) => NIL -- will handle later
+ null (conds := getConditionsForCategoryOnType(t,c)) => nil
+--rest(conds) => nil -- will handle later
cond := first conds
- cond isnt [.,["has", pat, c1],:.] => NIL
- rest(c1) => NIL -- make it simple
+ cond isnt [.,["has", pat, c1],:.] => nil
+ rest(c1) => nil -- make it simple
argN := 0
t1 := nil
@@ -400,20 +400,20 @@ resolveTCat1(t,c) ==
argN := i
t1 := ut
- null t1 => NIL
- null (t1' := resolveTCat(t1,c1)) => NIL
+ null t1 => nil
+ null (t1' := resolveTCat(t1,c1)) => nil
t' := copy t
t'.argN := t1'
t'
getConditionsForCategoryOnType(t,cat) ==
- getConditionalCategoryOfType(t,[NIL],['ATTRIBUTE,cat])
+ getConditionalCategoryOfType(t,[nil],['ATTRIBUTE,cat])
getConditionalCategoryOfType(t,conditions,match) ==
if cons? t then t := first t
- t in '(Union Mapping Record) => NIL
+ t in '(Union Mapping Record) => nil
conCat := getConstructorCategoryFromDB t
- removeDuplicates rest getConditionalCategoryOfType1(conCat,conditions,match,[NIL])
+ removeDuplicates rest getConditionalCategoryOfType1(conCat,conditions,match,[nil])
getConditionalCategoryOfType1(cat,conditions,match,seen) ==
cat is ['Join,:cs] or cat is ['CATEGORY,:cs] =>
@@ -422,7 +422,7 @@ getConditionalCategoryOfType1(cat,conditions,match,seen) ==
getConditionalCategoryOfType1(first cs,conditions,match,seen),
match,seen)
cat is ['IF,., cond,.] =>
- matchUpToPatternVars(cond,match,NIL) =>
+ matchUpToPatternVars(cond,match,nil) =>
conditions.rest := [cat,:rest conditions]
conditions
conditions
@@ -448,10 +448,10 @@ matchUpToPatternVars(pat,form,patAlist) ==
patAlist := [[pat,:form],:patAlist]
true
cons?(pat) =>
- atom form => NIL
+ atom form => nil
matchUpToPatternVars(first pat, first form,patAlist) and
matchUpToPatternVars(rest pat, rest form,patAlist)
- NIL
+ nil
--% Resolve Type with Mode
@@ -463,7 +463,7 @@ resolveTMOrCroak(t,m) ==
resolveTM(t,m) ==
-- resolves a type with a mode which may be partially specified
startTimingProcess 'resolve
- $Subst : local := NIL
+ $Subst : local := nil
$Coerce : local := 'T
t := eqType t
m := eqType substitute("**",$EmptyMode,m)
@@ -487,14 +487,14 @@ resolveTM1(t,m) ==
p := ASSQ(m,$Subst) =>
$Coerce =>
tt := resolveTT1(t,rest p) => (p.rest := tt) and tt
- NIL
+ nil
t=rest p and t
$Subst := [[m,:t],:$Subst]
t
- atom(t) or atom(m) => NIL
+ atom(t) or atom(m) => nil
(t is ['Record,:tr]) and (m is ['Record,:mr]) and
(tt := resolveTMRecord(tr,mr)) => tt
- t is ['Record,:.] or m is ['Record,:.] => NIL
+ t is ['Record,:.] or m is ['Record,:.] => nil
t is ['Variable, .] and m is ['Mapping, :.] => m
t is ['FunctionCalled, .] and m is ['Mapping, :.] => m
if isEqualOrSubDomain(t, $Integer) then
@@ -506,16 +506,16 @@ resolveTM1(t,m) ==
$Coerce and canCoerceFrom(t,m) and m
resolveTMRecord(tr,mr) ==
- #tr ~= #mr => NIL
+ #tr ~= #mr => nil
ok := true
- tt := NIL
+ tt := nil
for ta in tr for ma in mr while ok repeat
-- element is [':,tag,mode]
- second(ta) ~= second(ma) => ok := NIL -- match tags
+ second(ta) ~= second(ma) => ok := nil -- match tags
ra := resolveTM1(third ta, third ma) -- resolve modes
- null ra => ok := NIL
+ null ra => ok := nil
tt := [[first ta,second ta,ra],:tt]
- not ok => NIL
+ not ok => nil
['Record,reverse! tt]
resolveTMUnion(t, m is ['Union,:ums]) ==
@@ -535,9 +535,9 @@ resolveTMUnion(t, m is ['Union,:ums]) ==
m' := ['Union,:removeDuplicates reverse ums']
success =>
null CONTAINED('_*_*,m') => m'
- t = $Integer => NIL
+ t = $Integer => nil
resolveTM1($Integer,m')
- NIL
+ nil
-- t is actually a Union if we got here
ums := removeDuplicates spliceTypeListForEmptyMode(uts,ums)
bad := nil
@@ -546,11 +546,11 @@ resolveTMUnion(t, m is ['Union,:ums]) ==
(m' := resolveTMUnion(ut,['Union,:ums])) =>
doms := append(rest m',doms)
bad := true
- bad => NIL
+ bad => nil
['Union,:removeDuplicates doms]
resolveTMTaggedUnion(t, m is ['Union,:ums]) ==
- NIL
+ nil
spliceTypeListForEmptyMode(tl,ml) ==
-- splice in tl for occurrence of ** in ml
@@ -574,7 +574,7 @@ resolveTMEq(t,m) ==
(res := resolveTMSpecial(t,m)) => res
[cm,:argm] := deconstructT m
c := containsVars cm
- TL := NIL
+ TL := nil
until b or not t repeat
[ct,:argt] := deconstructT t
b :=
@@ -596,28 +596,28 @@ resolveTMSpecial(t,m) ==
t is ['Variable,x] and m is ['OrderedVariableList,le] =>
isPatternVar le => ['OrderedVariableList,[x]]
cons?(le) and member(x,le) => le
- NIL
+ nil
t is ['Fraction, ['Complex, t1]] and m is ['Complex, m1] =>
resolveTM1(['Complex, ['Fraction, t1]], m)
t is ['Fraction, ['Polynomial, ['Complex, t1]]] and m is ['Complex, m1] =>
resolveTM1(['Complex, ['Fraction, ['Polynomial, t1]]], m)
t is ['Mapping,:lt] and m is ['Mapping,:lm] =>
- #lt ~= #lm => NIL
- l := NIL
+ #lt ~= #lm => nil
+ l := nil
ok := true
for at in lt for am in lm while ok repeat
(ok := resolveTM1(at,am)) => l := [ok,:l]
ok and ['Mapping,:reverse l]
t is ['Segment,u] and m is ['UniversalSegment,.] =>
resolveTM1(['UniversalSegment, u], m)
- NIL
+ nil
resolveTMEq1(ct,cm) ==
-- ct and cm are type constructors
-- tests for a match from cm to ct
-- the result is a substitution or 'failed
not (first ct=first cm) => 'failed
- SL := NIL
+ SL := nil
ct := rest ct
cm := rest cm
b := 'T
@@ -647,8 +647,8 @@ resolveTMEq2(cm,argm,TL) ==
TL
null TL and
null argm => constructM(ct,argt)
--- null argm => NIL
- arg := NIL
+-- null argm => nil
+ arg := nil
while argt and argm until not tt repeat
x1 := first argt
argt := rest argt
@@ -661,7 +661,7 @@ resolveTMEq2(cm,argm,TL) ==
resolveTMRed(t,m) ==
-- looks for an applicable rewrite rule at any level of t and tries
-- to bubble this constructor up to the top to t
- TL := NIL
+ TL := nil
until b or not t repeat
[ct,:argt] := deconstructT t
b := not sameObject?(t,term1RW(['Resolve,t,m],$ResMode)) and
@@ -692,7 +692,7 @@ resolveTMRed1(t) ==
"and"/[member(x,a) for x in b] and SETDIFFERENCE(a,b)
t is ['SimpleAlgebraicExtension,a,b,p] => -- this is a hack. RSS
['SimpleAlgebraicExtension, resolveTMRed1 a, resolveTMRed1 b,p]
- [( atom x and x ) or resolveTMRed1 x or return NIL for x in t]
+ [( atom x and x ) or resolveTMRed1 x or return nil for x in t]
--% Type and Mode Representation
@@ -711,8 +711,8 @@ equiType(t) ==
t
getUnderModeOf d ==
- not cons? d => NIL
--- n := LASSOC(first d,$underDomainAlist) => d.n ----> $underDomainAlist NOW always NIL
+ not cons? d => nil
+-- n := LASSOC(first d,$underDomainAlist) => d.n ----> $underDomainAlist NOW always nil
for a in rest d for m in rest destructT d repeat
if m then return a
@@ -724,7 +724,7 @@ getUnderModeOf d ==
-- args := [ x for d in dt for y in t | ( x := d and y ) ]
-- c := [ x for d in dt for y in t | ( x := not d and y ) ]
-- [c,:args]
--- [t,:NIL]
+-- [t,:nil]
deconstructT(t) ==
-- M is a type, which may contain type variables
@@ -734,7 +734,7 @@ deconstructT(t) ==
args := [ x for d in dt for y in t | ( x := d and y ) ]
c := [ x for d in dt for y in t | ( x := not d and y ) ]
[c,:args]
- [t,:NIL]
+ [t,:nil]
constructT(c,A) ==
-- c is a type constructor, A a list of argument types
@@ -743,7 +743,7 @@ constructT(c,A) ==
constructM(c,A) ==
-- replaces top level RE's or QF's by equivalent types, if possible
- containsVars(c) or containsVars(A) => NIL
+ containsVars(c) or containsVars(A) => nil
-- collapses illegal FE's
first(c) = $FunctionalExpression => eqType defaultTargetFE first A
eqType constructT(c,A)
@@ -795,6 +795,6 @@ compareTT(t1,t2) ==
-- 'T if type t1 is more nested than t2
-- otherwise 'T if t1 is lexicographically greater than t2
t1 is [=$QuotientField,:.] or
- symbolMember?(opOf t2,[$QuotientField, 'SimpleAlgebraicExtension]) => NIL
+ symbolMember?(opOf t2,[$QuotientField, 'SimpleAlgebraicExtension]) => nil
CGREATERP(PRIN2CVEC opOf t1,PRIN2CVEC opOf t2)
diff --git a/src/interp/i-special.boot b/src/interp/i-special.boot
index 137de0a9..88c0cb31 100644
--- a/src/interp/i-special.boot
+++ b/src/interp/i-special.boot
@@ -44,7 +44,7 @@ $specialOps == '(
pretend QUOTE REDUCE REPEAT _return SEQ TARGET tuple typeOf _where
_[_|_|_] %Macro %MLambda %Import %Export %Inline %With %Add %Match)
-$repeatLabel := NIL
+$repeatLabel := nil
$anonymousMapCounter := 0
++ List of free variables in the current function
@@ -60,12 +60,12 @@ voidValue() == '"()"
--% Handlers for Anonymous Function Definitions
upADEF t ==
- t isnt [.,[vars,types,.,body],pred,.] => NIL
+ t isnt [.,[vars,types,.,body],pred,.] => nil
-- do some checking on what we got
for var in vars repeat
if not IDENTP(var) then throwKeyedMsg("S2IS0057",[var])
-- unabbreviate types
- types := [(if t then evaluateType unabbrev t else NIL) for t in types]
+ types := [(if t then evaluateType unabbrev t else nil) for t in types]
-- we do not allow partial types
if isPartialMode(m := first types) then throwKeyedMsg("S2IS0058",[m])
@@ -78,7 +78,7 @@ upADEF t ==
types' := rest types
for type in types' repeat
if (type and null m) or (m and null type) then
- throwKeyedMsg("S2IS0059",NIL)
+ throwKeyedMsg("S2IS0059",nil)
if isPartialMode type then throwKeyedMsg("S2IS0058",[type])
-- $localVars: local := nil
@@ -135,7 +135,7 @@ evalTargetedADEF(t,vars,types,body) ==
mkInterpTargetedADEF(t,vars,types,oldBody) ==
null first types =>
- throwKeyedMsg("S2IS0056",NIL)
+ throwKeyedMsg("S2IS0056",nil)
throwMessage '" map result type needed but not present."
arglCode := ["LIST",:[argCode for type in rest types for var in vars]]
where argCode() == ['putValueValue,['mkAtreeNode,MKQ var],
@@ -199,7 +199,7 @@ upAlgExtension t ==
-- to be a simple algebraic extension, with respect to the given
-- polynomial, and given the value "a" in this type.
t isnt [op,var,eq] => nil
- null $genValue => throwKeyedMsg("S2IS0001",NIL)
+ null $genValue => throwKeyedMsg("S2IS0001",nil)
a := getUnname var
clearCmdParts ['propert,a] --clear properties of a
algExtension:= eq2AlgExtension eq
@@ -221,14 +221,14 @@ upAlgExtension t ==
sae:= ['SimpleAlgebraicExtension,field,pd,objValUnwrap canonicalAE]
saeTypeSynonym := makeSymbol strconc('"SAE",STRINGIMAGE a)
saeTypeSynonymValue := objNew(sae,$Domain)
- fun := getFunctionFromDomain('generator,sae,NIL)
+ fun := getFunctionFromDomain('generator,sae,nil)
expr:= wrap SPADCALL(fun)
putHist(saeTypeSynonym,'value,saeTypeSynonymValue,$e)
putHist(a,'mode,sae,$e)
putHist(a,'value,T2:= objNew(expr,sae),$e)
clearDependencies(a,true)
if $printTypeIfTrue then
- sayKeyedMsg("S2IS0003",NIL)
+ sayKeyedMsg("S2IS0003",nil)
sayMSG concat ['"%l",'" ",saeTypeSynonym,'" := ",
:prefix2String objVal saeTypeSynonymValue]
sayMSG concat ['" ",a,'" : ",saeTypeSynonym,'" := ",a]
@@ -257,7 +257,7 @@ bottomUpProposition(t,mode) ==
upand x ==
-- generates code for and forms. The second argument is only
-- evaluated if the first argument is true.
- x isnt [op,term1,term2] => NIL
+ x isnt [op,term1,term2] => nil
putTarget(term1,$Boolean)
putCallInfo(term1,"and",1,2)
putTarget(term2,$Boolean)
@@ -294,7 +294,7 @@ upand x ==
upor x ==
-- generates code for or forms. The second argument is only
-- evaluated if the first argument is false.
- x isnt [op,term1,term2] => NIL
+ x isnt [op,term1,term2] => nil
putTarget(term1,$Boolean)
putCallInfo(term1,"or",1,2)
putTarget(term2,$Boolean)
@@ -385,9 +385,9 @@ upTARGET t ==
-- do not (yet) support local variables on the rhs
(not $genValue) and or/[CONTAINED(var,rhs) for var in $localVars] =>
keyedMsgCompFailure("S2IC0010",[rhs])
- $declaredMode: local := NIL
+ $declaredMode: local := nil
m:= evaluateType unabbrev rhs
- not isLegitimateMode(m,NIL,NIL) => throwKeyedMsg("S2IE0004",[m])
+ not isLegitimateMode(m,nil,nil) => throwKeyedMsg("S2IE0004",[m])
categoryForm?(m) => throwKeyedMsg("S2IE0014",[m])
$declaredMode:= m
cons? lhs and putTarget(lhs,m)
@@ -410,9 +410,9 @@ upCOERCE t ==
-- do not (yet) support local variables on the rhs
(not $genValue) and or/[CONTAINED(var,rhs) for var in $localVars] =>
keyedMsgCompFailure("S2IC0006",[rhs])
- $declaredMode: local := NIL
+ $declaredMode: local := nil
m := evaluateType unabbrev rhs
- not isLegitimateMode(m,NIL,NIL) => throwKeyedMsg("S2IE0004",[m])
+ not isLegitimateMode(m,nil,nil) => throwKeyedMsg("S2IE0004",[m])
categoryForm?(m) => throwKeyedMsg("S2IE0014",[m])
$declaredMode:= m
-- 05/16/89 (RSS) following line commented out to give correct
@@ -487,7 +487,7 @@ upLoopIters itrl ==
iter is ["SUCHTHAT",pred] =>
bottomUpCompilePredicate(pred,'"|")
iter is ["UNTIL",:.] =>
- NIL -- handle after body is analyzed
+ nil -- handle after body is analyzed
iter is ["IN",index,s] =>
upLoopIterIN(iter,index,s)
iter is ["STEP",index,lower,step,:upperList] =>
@@ -518,7 +518,7 @@ upLoopIterIN(iter,index,s) ==
step := [mkAtreeNode 'incr, s]
upperList :=
CAAR(iterMs) = 'Segment => [[mkAtreeNode 'hi,s]]
- NIL
+ nil
upLoopIterSTEP(index,lower,step,upperList)
newIter := ['STEP,index,lower,step,:upperList]
iter.first := first newIter
@@ -535,7 +535,7 @@ upLoopIterSTEP(index,lower,step,upperList) ==
throwKeyedMsg("S2IS0007",['"lower"])
stype := IFCAR bottomUpUseSubdomain(step)
not (typeIsASmallInteger(stype) or isEqualOrSubDomain(stype,$Integer))=>
- throwKeyedMsg("S2IS0008",NIL)
+ throwKeyedMsg("S2IS0008",nil)
types := [ltype]
utype := nil
for upper in upperList repeat
@@ -574,9 +574,9 @@ evalLoopIter itr ==
interpCOLLECT(op,itrl,body) ==
-- interpret-code mode COLLECT handler
- $collectTypeList: local := NIL
- $indexVars: local := NIL
- $indexTypes: local := NIL
+ $collectTypeList: local := nil
+ $indexVars: local := nil
+ $indexTypes: local := nil
emptyAtree op
emptyAtree itrl
emptyAtree body
@@ -640,7 +640,7 @@ interpCOLLECTbodyIter(exp,indexList,indexVals,indexTypes) ==
$collectTypeList:=
null $collectTypeList => [rm:=m]
[:$collectTypeList,rm:=resolveTT(m,last $collectTypeList)]
- null rm => throwKeyedMsg("S2IS0010",NIL)
+ null rm => throwKeyedMsg("S2IS0010",nil)
value:=
rm ~= m => coerceInteractive(getValue exp,rm)
getValue exp
@@ -663,11 +663,11 @@ isStreamCollect itrl ==
collectStream(t,op,itrl,body) ==
v := CATCH('loopCompiler,collectStream1(t,op,itrl,body))
- v = 'tryInterpOnly => throwKeyedMsg("S2IS0011",NIL)
+ v = 'tryInterpOnly => throwKeyedMsg("S2IS0011",nil)
v
collectStream1(t,op,itrl,body) ==
- $indexVars:local := NIL
+ $indexVars:local := nil
upStreamIters itrl
if #$indexVars = 1 then mode:=collectOneStream(t,op,itrl,body)
else mode:=collectSeveralStreams(t,op,itrl,body)
@@ -690,7 +690,7 @@ upStreamIterIN(iter,index,s) ==
step := [mkAtreeNode 'incr, s]
upperList :=
CAAR(iterMs) = 'Segment => [[mkAtreeNode 'hi,s]]
- NIL
+ nil
upStreamIterSTEP(index,lower,step,upperList)
newIter := ['STEP,index,lower,step,:upperList]
iter.first := first newIter
@@ -714,7 +714,7 @@ upStreamIterSTEP(index,lower,step,upperList) ==
null isEqualOrSubDomain(ltype := IFCAR bottomUpUseSubdomain(lower),
$Integer) => throwKeyedMsg("S2IS0007",['"lower"])
null isEqualOrSubDomain(stype := IFCAR bottomUpUseSubdomain(step),
- $Integer) => throwKeyedMsg("S2IS0008",NIL)
+ $Integer) => throwKeyedMsg("S2IS0008",nil)
for upper in upperList repeat
null isEqualOrSubDomain(IFCAR bottomUpUseSubdomain(upper),
$Integer) => throwKeyedMsg("S2IS0007",['"upper"])
@@ -989,7 +989,7 @@ upconstruct t ==
dol and dol is [topType,:.] and not (topType in aggs) =>
(mmS:= selectMms(op,l,tar)) and (mS:= evalForm(op,getUnname op,l,mmS)) =>
putModeSet(op,mS)
- NIL
+ nil
(tar and tar is [topType,:.] and not (topType in aggs)) and
(mmS:= modemapsHavingTarget(selectMms(op,l,tar),tar)) and
(mS:= evalForm(op,getUnname op,l,mmS)) =>
@@ -1064,7 +1064,7 @@ upNullList(op,l,tar) ==
tar and tar is [a,b] and (a in '(Stream Vector List)) and
not isPartialMode(b) => ['List,b]
'(List (None))
- val := objNewWrap(NIL,defMode)
+ val := objNewWrap(nil,defMode)
tar and not isPartialMode(tar) =>
null (val' := coerceInteractive(val,tar)) =>
throwKeyedMsg("S2IS0013",[tar])
@@ -1108,7 +1108,7 @@ upDeclare t ==
(not $genValue) and or/[CONTAINED(var,rhs) for var in $localVars] =>
keyedMsgCompFailure("S2IS0014",[lhs])
mode := evaluateType unabbrev rhs
- mode = $Void => throwKeyedMsgSP("S2IS0015",NIL,op)
+ mode = $Void => throwKeyedMsgSP("S2IS0015",nil,op)
not isLegitimateMode(mode,nil,nil) => throwKeyedMsgSP("S2IE0004",[mode],op)
categoryForm?(mode) => throwKeyedMsgSP("S2IE0011",[mode, 'category],op)
packageForm?(mode) => throwKeyedMsgSP("S2IE0011",[mode, 'package],op)
@@ -1148,7 +1148,7 @@ declare(var,mode) ==
mapval := objVal get(var,'value,$e)
-- mapval looks like '(%Map (args . defn))
margs := CAADR mapval
- -- if one args, margs is not a pair, just #1 or NIL
+ -- if one args, margs is not a pair, just #1 or nil
-- otherwise it looks like (tuple #1 #2 ...)
nargs :=
null margs => 0
@@ -1164,7 +1164,7 @@ declare(var,mode) ==
-- - value already has given type
-- - new mode is same as old declared mode
objMode(v) = mode => putHist(var,'mode,mode,$e)
- mode = get(var,'mode,$e) => NIL -- nothing to do
+ mode = get(var,'mode,$e) => nil -- nothing to do
throwKeyedMsg("S2IS0052",[var,mode])
putHist(var,'mode,mode,$e)
@@ -1172,7 +1172,7 @@ declareMap(var,mode) ==
-- declare a Mapping property
(v:=get(var,'value,$e)) and objVal(v) isnt ["%Map",:.] =>
throwKeyedMsg("S2IS0019",[var])
- isPartialMode mode => throwKeyedMsg("S2IM0004",NIL)
+ isPartialMode mode => throwKeyedMsg("S2IM0004",nil)
putHist(var,'mode,mode,$e)
getAndEvalConstructorArgument tree ==
@@ -1186,11 +1186,11 @@ getAndEvalConstructorArgument tree ==
replaceSharps(x,d) ==
-- replaces all sharps in x by the arguments of domain d
-- all replaces the triangle variables
- SL:= NIL
+ SL:= nil
for e in rest d for var in $FormalMapVariableList repeat
SL:= [[var,:e],:SL]
x := subCopy(x,SL)
- SL:= NIL
+ SL:= nil
for e in rest d for var in $TriangleVariableList repeat
SL:= [[var,:e],:SL]
subCopy(x,SL)
@@ -1246,18 +1246,18 @@ isPolynomialMode m ==
op = 'Variable => [a]
op in '(MultivariatePolynomial DistributedMultivariatePolynomial
HomogeneousDistributedMultivariatePolynomial) => a
- NIL
- NIL
+ nil
+ nil
containsPolynomial m ==
- atom m => NIL
+ atom m => nil
[d,:.] := m
d in $univariateDomains or d in $multivariateDomains or
d in '(Polynomial RationalFunction) => true
(m' := underDomainOf m) and containsPolynomial m'
containsVariables m ==
- atom m => NIL
+ atom m => nil
[d,:.] := m
d in $univariateDomains or d in $multivariateDomains => true
(m' := underDomainOf m) and containsVariables m'
@@ -1344,7 +1344,7 @@ constantInDomain?(form,domainForm) ==
++ Constant `c' of `type' is referenced from domain `d'; return its value
++ in the VAT `op'.
findConstantInDomain(op,c,type,d) ==
- isPartialMode d => throwKeyedMsg("S2IS0020",NIL)
+ isPartialMode d => throwKeyedMsg("S2IS0020",nil)
val :=
$genValue => wrap getConstantFromDomain([c],d)
["getConstantFromDomain",["LIST",MKQ c],MKQ d]
@@ -1357,7 +1357,7 @@ upDollar t ==
t isnt [op,D,form] => nil
t2 := t
(not $genValue) and "or"/[CONTAINED(var,D) for var in $localVars] =>
- keyedMsgCompFailure("S2IS0032",NIL)
+ keyedMsgCompFailure("S2IS0032",nil)
D="Lisp" => upLispCall(op,form)
if vector? D and (# D > 0) then D := D.0
t := evaluateType unabbrev D
@@ -1393,18 +1393,18 @@ upDollar t ==
upDollarTuple(op, f, t, t2, args, nargs) ==
-- this function tries to find a tuple function to use
- -- nargs = 1 and getUnname first args = "Tuple" => NIL
- -- nargs = 1 and (ms := bottomUp first args) and ms is [["Tuple",.]] => NIL
- null (singles := isOpInDomain(f,t,1)) => NIL
- tuple := NIL
+ -- nargs = 1 and getUnname first args = "Tuple" => nil
+ -- nargs = 1 and (ms := bottomUp first args) and ms is [["Tuple",.]] => nil
+ null (singles := isOpInDomain(f,t,1)) => nil
+ tuple := nil
for [[.,arg], :.] in singles while null tuple repeat
if arg is ['Tuple,.] then tuple := arg
- null tuple => NIL
+ null tuple => nil
[.,D,form] := t2
newArg := [mkAtreeNode "tuple",:args]
putTarget(newArg, tuple)
ms := bottomUp newArg
- first ms ~= tuple => NIL
+ first ms ~= tuple => nil
form := [first form, newArg]
putAtree(first form,"dollar",t)
ms := bottomUp form
@@ -1429,9 +1429,9 @@ upLispCall(op,t) ==
upequation tree ==
-- only handle this if there is a target of Boolean
-- this should speed things up a bit
- tree isnt [op,lhs,rhs] => NIL
- $Boolean ~= getTarget(op) => NIL
- not vector? op => NIL
+ tree isnt [op,lhs,rhs] => nil
+ $Boolean ~= getTarget(op) => nil
+ not vector? op => nil
-- change equation into '='
op.0 := "="
bottomUp tree
@@ -1441,10 +1441,10 @@ upequation tree ==
uperror t ==
-- when compiling a function, this merely inserts another argument
-- which is the name of the function.
- not $compilingMap => NIL
- t isnt [op,msg] => NIL
+ not $compilingMap => nil
+ t isnt [op,msg] => nil
msgMs := bottomUp putCallInfo(msg,"error",1,1)
- msgMs isnt [=$String] => NIL
+ msgMs isnt [=$String] => nil
t.rest := [mkAtree object2String $mapName,msg]
bottomUp t
@@ -1536,10 +1536,10 @@ evalIF(op,[cond,a,b],m) ==
elseCode:=
b="%noMapVal" =>
[[MKQ true, ["throwKeyedMsg",MKQ "S2IM0018",
- ["CONS",MKQ object2Identifier $mapName,NIL]]]]
+ ["CONS",MKQ object2Identifier $mapName,nil]]]]
b='%noBranch =>
$lastLineInSEQ => [[MKQ true,["voidValue"]]]
- NIL
+ nil
[[MKQ true,genIFvalCode(b,m)]]
code:=['%when,[getArgValue(cond,$Boolean),
genIFvalCode(a,m)],:elseCode]
@@ -1576,7 +1576,7 @@ interpIF(op,cond,a,b) ==
objValUnwrap(val) => upIFgenValue(op,a)
b="%noBranch" => setValueToVoid op
upIFgenValue(op,b)
- throwKeyedMsg("S2IS0031",NIL)
+ throwKeyedMsg("S2IS0031",nil)
upIFgenValue(op,tree) ==
-- evaluates tree and transfers the results to op
@@ -1608,7 +1608,7 @@ upisAndIsnt(t:=[op,a,pattern]) ==
putPvarModes(pattern,m) ==
-- Puts the modes for the pattern variables into $env
- m isnt ["List",um] => throwKeyedMsg("S2IS0030",NIL)
+ m isnt ["List",um] => throwKeyedMsg("S2IS0030",nil)
for pvar in pattern repeat
IDENTP pvar => (not (pvar=$quadSymbol)) and put(pvar,'mode,um,$env)
pvar is ['_:,var] =>
@@ -1639,7 +1639,7 @@ isLocalPred pattern ==
compileIs(val,pattern) ==
-- produce code for compiled "is" predicate. makes pattern variables
-- into local variables of the function
- vars:= NIL
+ vars:= nil
for pat in rest pattern repeat
IDENTP(pat) and isLocallyBound pat => vars:=[pat,:vars]
pat is [":",var] => vars:= [var,:vars]
@@ -1679,7 +1679,7 @@ removeConstruct pat ==
isPatternMatch(l,pats) ==
-- perform the actual pattern match
- $subs: local := NIL
+ $subs: local := nil
isPatMatch(l,pats)
$subs
@@ -1740,7 +1740,7 @@ up%LET t ==
-- analyzes and evaluates the righthand side, and does the variable
-- binding
t isnt [op,lhs,rhs] => nil
- $declaredMode: local := NIL
+ $declaredMode: local := nil
cons? lhs =>
var:= getUnname first lhs
var = "construct" => upLETWithPatternOnLhs t
@@ -1878,8 +1878,8 @@ upLETWithFormOnLhs(op,lhs,rhs) ==
lhs' := getUnnameIfCan lhs
rhs' := getUnnameIfCan rhs
lhs' = "tuple" =>
- rhs' ~= "tuple" => throwKeyedMsg("S2IS0039",NIL)
- #(lhs) ~= #(rhs) => throwKeyedMsg("S2IS0038",NIL)
+ rhs' ~= "tuple" => throwKeyedMsg("S2IS0039",nil)
+ #(lhs) ~= #(rhs) => throwKeyedMsg("S2IS0038",nil)
-- generate a sequence of assignments, using local variables
-- to first hold the assignments so that things like
-- (t1,t2) := (t2,t1) will work.
@@ -1902,35 +1902,35 @@ upLETWithFormOnLhs(op,lhs,rhs) ==
ms := bottomUp seq
putValue(op,getValue seq)
putModeSet(op,ms)
- rhs' = "tuple" => throwKeyedMsg("S2IS0039",NIL)
+ rhs' = "tuple" => throwKeyedMsg("S2IS0039",nil)
tree:= seteltable(lhs,rhs) => upSetelt(op,lhs,tree)
- throwKeyedMsg("S2IS0060", NIL)
+ throwKeyedMsg("S2IS0060", nil)
-- upTableSetelt(op,lhs,rhs)
seteltable(lhs is [f,:argl],rhs) ==
-- produces the setelt form for trees such as "l.2:= 3"
- null (g := getUnnameIfCan f) => NIL
+ null (g := getUnnameIfCan f) => nil
g="elt" => altSeteltable [:argl, rhs]
- get(g,'value,$e) is [expr,:.] and isMapExpr expr => NIL
+ get(g,'value,$e) is [expr,:.] and isMapExpr expr => nil
transferPropsToNode(g,f)
getValue(lhs) or getMode(lhs) =>
f is [f',:argl'] => altSeteltable [f',:argl',:argl,rhs]
altSeteltable [:lhs,rhs]
- NIL
+ nil
altSeteltable args ==
for x in args repeat bottomUp x
newOps := [mkAtreeNode "setelt", mkAtreeNode "set!"]
- form := NIL
+ form := nil
-- first look for exact matches for any of the possibilities
while null form for newOp in newOps repeat
- if selectMms(newOp, args, NIL) then form := [newOp, :args]
+ if selectMms(newOp, args, nil) then form := [newOp, :args]
-- now try retracting arguments after the first
while null form and ( "and"/[retractAtree(a) for a in rest args] ) repeat
while null form for newOp in newOps repeat
- if selectMms(newOp, args, NIL) then form := [newOp, :args]
+ if selectMms(newOp, args, nil) then form := [newOp, :args]
form
@@ -1949,7 +1949,7 @@ upSetelt(op,lhs,tree) ==
upTableSetelt(op,lhs is [htOp,:args],rhs) ==
-- called only for undeclared, uninitialized table setelts
("*" = (PNAME getUnname htOp).0) and (1 ~= # args) =>
- throwKeyedMsg("S2IS0040",NIL)
+ throwKeyedMsg("S2IS0040",nil)
# args ~= 1 =>
throwKeyedMsg("S2IS0041",[[getUnname htOp,'".[",
getUnname first args,
@@ -1984,15 +1984,15 @@ unVectorize body ==
isType t ==
-- Returns the evaluated type if t is a tree representing a type,
- -- and NIL otherwise
+ -- and nil otherwise
op:=opOf t
vector? op =>
- isMap(op:= getUnname op) => NIL
+ isMap(op:= getUnname op) => nil
op = 'Mapping and cons? t =>
argTypes := [isType type for type in rest t]
"or"/[null type for type in argTypes] => nil
['Mapping, :argTypes]
- isLocallyBound op => NIL
+ isLocallyBound op => nil
d := isDomainValuedVariable op => d
type:=
-- next line handles subscripted vars
@@ -2001,7 +2001,7 @@ isType t ==
unabbrev unVectorize t
type and evaluateType type
d := isDomainValuedVariable op => d
- NIL
+ nil
upLETtype(op,lhs,type) ==
-- performs type assignment
@@ -2035,19 +2035,19 @@ getInterpMacroNames() ==
isInterpMacro name ==
-- look in local and then global environment for a macro
- not IDENTP name => NIL
- name in $specialOps => NIL
+ not IDENTP name => nil
+ name in $specialOps => nil
(m := get("--macros--",name,$env)) => m
(m := get("--macros--",name,$e)) => m
(m := get("--macros--",name,$InteractiveFrame)) => m
-- $InterpreterMacroAlist will probably be phased out soon
- (sv := assoc(name,$InterpreterMacroAlist)) => [NIL,:rest sv]
- NIL
+ (sv := assoc(name,$InterpreterMacroAlist)) => [nil,:rest sv]
+ nil
--% Handlers for prefix QUOTE
upQUOTE t ==
- t isnt [op,expr] => NIL
+ t isnt [op,expr] => nil
ms:= list
m:= getBasicMode expr => m
IDENTP expr =>
@@ -2074,7 +2074,7 @@ up_[_|_|_] t ==
--% Handler for pretend
uppretend t ==
- t isnt [op,expr,type] => NIL
+ t isnt [op,expr,type] => nil
mode := evaluateType unabbrev type
not isValidType(mode) => throwKeyedMsg("S2IE0004",[mode])
bottomUp expr
@@ -2194,7 +2194,7 @@ upREPEAT0 t ==
upREPEAT1 t ==
-- repeat loop handler with compiled body
-- see if it has the expected form
- t isnt [op,:itrl,body] => NIL
+ t isnt [op,:itrl,body] => nil
-- determine the mode of the repeat loop. At the moment, if there
-- there are no iterators and there are no "break" statements, then
-- the return type is Exit, otherwise Void.
@@ -2243,8 +2243,8 @@ interpOnlyREPEAT t ==
interpREPEAT(op,itrl,body,repeatMode) ==
-- performs interpret-code repeat
- $indexVars: local := NIL
- $indexTypes: local := NIL
+ $indexVars: local := nil
+ $indexTypes: local := nil
code :=
-- we must insert a CATCH for the iterate clause
['%loop,:[interpIter itr for itr in itrl],
@@ -2280,9 +2280,9 @@ interpLoopIter(exp,indexList,indexVals,indexTypes,requiredType) ==
upreturn t ==
-- make sure we are in a user function
- t isnt [op,val] => NIL
+ t isnt [op,val] => nil
(null $compilingMap) and (null $interpOnly) =>
- throwKeyedMsg("S2IS0047",NIL)
+ throwKeyedMsg("S2IS0047",nil)
if $mapTarget then putTarget(val,$mapTarget)
bottomUp val
if $mapTarget
@@ -2305,7 +2305,7 @@ upreturn t ==
upSEQ u ==
-- assumes that exits were translated into if-then-elses
-- handles flat SEQs and embedded returns
- u isnt [op,:args] => NIL
+ u isnt [op,:args] => nil
if (target := getTarget(op)) then putTarget(last args, target)
for x in args repeat bottomUp x
null (m := computedMode last args) =>
@@ -2375,7 +2375,7 @@ upNullTuple(op,l,tar) ==
tar and tar is [a,b] and (a in '(Stream Vector List)) and
not isPartialMode(b) => ['Tuple,b]
'(Tuple (None))
- val := objNewWrap(asTupleNew(getVMType second defMode,0,NIL), defMode)
+ val := objNewWrap(asTupleNew(getVMType second defMode,0,nil), defMode)
tar and not isPartialMode(tar) =>
null (val' := coerceInteractive(val,tar)) =>
throwKeyedMsg("S2IS0013",[tar])
@@ -2387,7 +2387,7 @@ upNullTuple(op,l,tar) ==
--% Handler for typeOf
uptypeOf form ==
- form isnt [op, arg] => NIL
+ form isnt [op, arg] => nil
if vector? arg then transferPropsToNode(getUnname arg,arg)
if m := isType(arg) then
m := conceptualType m
@@ -2400,7 +2400,7 @@ uptypeOf form ==
upwhere t ==
-- upwhere does the puts in where into a local environment
- t isnt [op,tree,clause] => NIL
+ t isnt [op,tree,clause] => nil
-- since the "clause" might be a local macro, we now call mkAtree
-- on the "tree" part (it is not yet a vat)
not $genValue =>
@@ -2410,7 +2410,7 @@ upwhere t ==
[env,:e] := upwhereClause(clause,$env,$e)
tree := upwhereMkAtree(tree,env,e)
if x := getAtree(op,'dollar) then
- atom tree => throwKeyedMsg("S2IS0048",NIL)
+ atom tree => throwKeyedMsg("S2IS0048",nil)
putAtree(first tree,'dollar,x)
upwhereMain(tree,env,e)
val := getValue tree
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index 97c06443..7707906b 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -97,7 +97,7 @@ $options := nil
initializeSystemCommands() ==
l := $systemCommands
- $SYSCOMMANDS := NIL
+ $SYSCOMMANDS := nil
while l repeat
$SYSCOMMANDS := [CAAR l,:$SYSCOMMANDS]
l := rest l
@@ -123,11 +123,11 @@ synonymsForUserLevel l ==
-- l is a list of synonyms, and this returns a sublist of applicable
-- synonyms at the current user level.
$UserLevel = 'development => l
- nl := NIL
+ nl := nil
for syn in reverse l repeat
cmd := STRING2ID_-N(rest syn,1)
null selectOptionLC(cmd,commandsForUserLevel
- $systemCommands,NIL) => nil
+ $systemCommands,nil) => nil
nl := [syn,:nl]
nl
@@ -149,7 +149,7 @@ unAbbreviateKeyword x ==
hasOption(al,opt) ==
optPname:= PNAME opt
- found := NIL
+ found := nil
for pair in al while not found repeat
stringPrefix?(PNAME first pair,optPname) => found := pair
found
@@ -203,7 +203,7 @@ commandAmbiguityError(kind,x,u) ==
--% Utility for access to original command line
getSystemCommandLine() ==
- p := STRPOS('")",$currentLine,0,NIL)
+ p := STRPOS('")",$currentLine,0,nil)
line := if p then subString($currentLine,p) else $currentLine
idxmax:= maxIndex line
for i in 0..idxmax while stringChar(line,i) ~= char " " repeat
@@ -249,12 +249,12 @@ abbreviationsSpad2Cmd l ==
nil
listConstructorAbbreviations() ==
- x := UPCASE queryUserKeyedMsg("S2IZ0056",NIL)
+ x := UPCASE queryUserKeyedMsg("S2IZ0056",nil)
STRING2ID_-N(x,1) in '(Y YES) =>
whatSpad2Cmd '(categories)
whatSpad2Cmd '(domains)
whatSpad2Cmd '(packages)
- sayKeyedMsg("S2IZ0057",NIL)
+ sayKeyedMsg("S2IZ0057",nil)
--% )cd
@@ -279,7 +279,7 @@ clearSpad2Cmd l ==
null l =>
optList:= "append"/[['"%l",'" ",x] for x in $clearOptions]
sayKeyedMsg("S2IZ0010",[optList])
- arg := selectOptionLC(first l,'(all completely scaches),NIL)
+ arg := selectOptionLC(first l,'(all completely scaches),nil)
arg = 'all => clearCmdAll()
arg = 'completely => clearCmdCompletely()
arg = 'scaches => clearCmdSortedCaches()
@@ -296,15 +296,15 @@ clearCmdSortedCaches() ==
clearCmdCompletely() ==
clearCmdAll()
$localExposureData := COPY_-SEQ $localExposureDataDefault
- -- $functionTable := NIL
- sayKeyedMsg("S2IZ0013",NIL)
+ -- $functionTable := nil
+ sayKeyedMsg("S2IZ0013",nil)
clearClams()
clearConstructorCaches()
$existingFiles := hashTable 'EQUAL
- sayKeyedMsg("S2IZ0014",NIL)
+ sayKeyedMsg("S2IZ0014",nil)
RECLAIM()
- sayKeyedMsg("S2IZ0015",NIL)
- NIL
+ sayKeyedMsg("S2IZ0015",nil)
+ nil
clearCmdAll() ==
clearCmdSortedCaches()
@@ -313,17 +313,17 @@ clearCmdAll() ==
$previousBindings := nil
$variableNumberAlist := nil
untraceMapSubNames _/TRACENAMES
- $InteractiveFrame := [[NIL]]
+ $InteractiveFrame := [[nil]]
resetInCoreHist()
if $useInternalHistoryTable
- then $internalHistoryTable := NIL
+ then $internalHistoryTable := nil
else removeFile histFileName()
$IOindex := 1
updateCurrentInterpreterFrame()
$currentLine := '")clear all" --restored 3/94; needed for undo (RDJ)
clearMacroTable()
if $frameMessages then sayKeyedMsg("S2IZ0011",[$interpreterFrameName])
- else sayKeyedMsg("S2IZ0012",NIL)
+ else sayKeyedMsg("S2IZ0012",nil)
clearCmdExcept(l is [opt,:vl]) ==
--clears elements of vl of all options EXCEPT opt
@@ -346,7 +346,7 @@ clearCmdParts(l is [opt,:vl]) ==
option = 'values => 'value
option
- null vl => sayKeyedMsg("S2IZ0055",NIL)
+ null vl => sayKeyedMsg("S2IZ0055",nil)
pmacs := getParserMacroNames()
imacs := getInterpMacroNames()
if vl='(all) then
@@ -364,16 +364,16 @@ clearCmdParts(l is [opt,:vl]) ==
if isMap x then
(lm := get(x,'localModemap,$InteractiveFrame)) =>
cons? lm => untraceMapSubNames [CADAR lm]
- NIL
+ nil
for p2 in rest p1 repeat
prop:= first p2
recordOldValue(x,prop,rest p2)
- recordNewValue(x,prop,NIL)
+ recordNewValue(x,prop,nil)
CAAR($InteractiveFrame) := deleteAssoc(x,CAAR $InteractiveFrame)
p2:= assoc(option,rest p1) =>
recordOldValue(x,option,rest p2)
- recordNewValue(x,option,NIL)
- p2.rest := NIL
+ recordNewValue(x,option,nil)
+ p2.rest := nil
nil
--% )close
@@ -392,7 +392,7 @@ close args ==
numClients > 1 =>
sockSendInt($SessionManager, $CloseClient)
sockSendInt($SessionManager, $currentFrameNum)
- closeInterpreterFrame(NIL)
+ closeInterpreterFrame(nil)
for [opt,:.] in $options repeat
fullopt := selectOptionLC(opt, '(quiet), 'optionError)
fullopt = 'quiet =>
@@ -400,7 +400,7 @@ close args ==
quiet =>
sockSendInt($SessionManager, $CloseClient)
sockSendInt($SessionManager, $currentFrameNum)
- closeInterpreterFrame(NIL)
+ closeInterpreterFrame(nil)
x := UPCASE queryUserKeyedMsg('"S2IZ0072", nil)
STRING2ID_-N(x,1) in '(YES Y) =>
coreQuit() -- ??? should be coreQuit errorCount()
@@ -410,7 +410,7 @@ close args ==
constructor args ==
sayMessage '" Not implemented yet."
- NIL
+ nil
--% )compiler
@@ -535,8 +535,8 @@ compileAsharpCmd1 args ==
doLibrary := true -- so a )library after compilation
doCompileLisp := true -- do compile generated lisp code
- moreArgs := NIL
- onlyArgs := NIL
+ moreArgs := nil
+ onlyArgs := nil
for opt in $options repeat
[optname,:optargs] := opt
@@ -562,7 +562,7 @@ compileAsharpCmd1 args ==
tempArgs :=
pathType = '"ao" =>
-- want to strip out -Fao
- (p := STRPOS('"-Fao", $asharpCmdlineFlags, 0, NIL)) =>
+ (p := STRPOS('"-Fao", $asharpCmdlineFlags, 0, nil)) =>
p = 0 => subString($asharpCmdlineFlags, 5)
strconc(subString($asharpCmdlineFlags, 0, p), '" ",
subString($asharpCmdlineFlags, p+5))
@@ -801,7 +801,7 @@ compileSpad2Cmd args ==
fullopt := selectOptionLC(optname,optList,nil)
fullopt = 'new => error "Internal error: compileSpad2Cmd got )new"
- fullopt = 'old => NIL -- no opt
+ fullopt = 'old => nil -- no opt
fullopt = 'library => fun.1 := 'lib
fullopt = 'nolibrary => fun.1 := 'nolib
@@ -835,7 +835,7 @@ compileSpad2Cmd args ==
-- avoid Boolean semantics transformations based on syntax only
$normalizeTree: local := false
if $compileOnlyCertainItems then
- null constructor => sayKeyedMsg("S2IZ0040",NIL)
+ null constructor => sayKeyedMsg("S2IZ0040",nil)
compilerDoitWithScreenedLisplib(constructor, fun)
else
compilerDoit(constructor, fun)
@@ -1020,7 +1020,7 @@ displayMacros names ==
macro in pmacs =>
if first then
sayBrightly ['"%l",'"User-defined macros:"]
- first := NIL
+ first := nil
displayParserMacro macro
macro in imacs => 'iterate
sayBrightly ([" ",'"%b", macro, '"%d", " is not a known OpenAxiom macro."])
@@ -1033,17 +1033,17 @@ displayMacros names ==
macro in pmacs => 'iterate
if first then
sayBrightly ['"%l",'"System-defined macros:"]
- first := NIL
+ first := nil
displayMacro macro
macro in pmacs => 'iterate
- NIL
+ nil
getParserMacroNames() ==
removeDuplicates [first mac for mac in getParserMacros()]
clearParserMacro(macro) ==
-- first see if it is one
- not IFCDR assoc(macro, $pfMacros) => NIL
+ not IFCDR assoc(macro, $pfMacros) => nil
$pfMacros := REMALIST($pfMacros, macro)
displayMacro name ==
@@ -1079,18 +1079,18 @@ getWorkspaceNames() ==
displayOperations l ==
null l =>
- x := UPCASE queryUserKeyedMsg("S2IZ0058",NIL)
+ x := UPCASE queryUserKeyedMsg("S2IZ0058",nil)
if STRING2ID_-N(x,1) in '(Y YES)
then for op in allOperations() repeat reportOpSymbol op
- else sayKeyedMsg("S2IZ0059",NIL)
+ else sayKeyedMsg("S2IZ0059",nil)
nil
for op in l repeat reportOpSymbol op
interpFunctionDepAlists() ==
$e : local := $InteractiveFrame
deps := getFlag "$dependencies"
- $dependentAlist := [[NIL,:NIL]]
- $dependeeAlist := [[NIL,:NIL]]
+ $dependentAlist := [[nil,:nil]]
+ $dependeeAlist := [[nil,:nil]]
for [dependee,dependent] in deps repeat
$dependentAlist := PUTALIST($dependentAlist,dependee,
[dependent,:GETALIST($dependentAlist,dependee)])
@@ -1114,7 +1114,7 @@ displayProperties(option,l) ==
vl := MSORT append(getWorkspaceNames(),macros)
if $frameMessages then sayKeyedMsg("S2IZ0065",[$interpreterFrameName])
null vl =>
- null $frameMessages => sayKeyedMsg("S2IZ0066",NIL)
+ null $frameMessages => sayKeyedMsg("S2IZ0066",nil)
sayKeyedMsg("S2IZ0067",[$interpreterFrameName])
interpFunctionDepAlists()
for v in vl repeat
@@ -1213,7 +1213,7 @@ displayType($op,u,omitVariableNameIfTrue) ==
type := prefix2String objMode(u)
if atom type then type := [type]
sayMSG concat ['" Type of value of ",fixObjectForPrinting PNAME $op,'": ",:type]
- NIL
+ nil
displayValue($op,u,omitVariableNameIfTrue) ==
null u => sayMSG [" Value of ",fixObjectForPrinting PNAME $op,'": (none)"]
@@ -1232,7 +1232,7 @@ displayValue($op,u,omitVariableNameIfTrue) ==
sayMSG concat('" ",label,labmode,rhs,form2String expr)
mathprint ['CONCAT,label,:labmode,rhs,
outputFormat(expr,objMode(u))]
- NIL
+ nil
--% )edit
@@ -1272,7 +1272,7 @@ helpSpad2Cmd args ==
newHelpSpad2Cmd args ==
if null args then args := ["?"]
# args > 1 =>
- sayKeyedMsg("S2IZ0026",NIL)
+ sayKeyedMsg("S2IZ0026",nil)
true
sarg := PNAME first args
if sarg = '"?" then args := ['help]
@@ -1285,7 +1285,7 @@ newHelpSpad2Cmd args ==
-- see if new help file exists
narg := PNAME arg
- null (helpFile := MAKE_-INPUT_-FILENAME [narg,'HELPSPAD,'_*]) => NIL
+ null (helpFile := MAKE_-INPUT_-FILENAME [narg,'HELPSPAD,'_*]) => nil
$useFullScreenHelp =>
editFile helpFile
@@ -1319,12 +1319,12 @@ frameEnvironment fname ==
-- is returned
fname = frameName first $interpreterFrameRing => $InteractiveFrame
ifr := rest $interpreterFrameRing
- e := [[NIL]]
+ e := [[nil]]
while ifr repeat
[f,:ifr] := ifr
if fname = frameName f then
e := second f
- ifr := NIL
+ ifr := nil
e
frameSpad2Cmd args ==
@@ -1346,10 +1346,10 @@ frameSpad2Cmd args ==
addNewInterpreterFrame(args)
arg = "next" => nextInterpreterFrame()
- NIL
+ nil
addNewInterpreterFrame(name) ==
- null name => throwKeyedMsg("S2IZ0018",NIL)
+ null name => throwKeyedMsg("S2IZ0018",nil)
updateCurrentInterpreterFrame()
-- see if we already have one by that name
for f in $interpreterFrameRing repeat
@@ -1362,27 +1362,27 @@ addNewInterpreterFrame(name) ==
emptyInterpreterFrame(name) ==
[name, -- frame name
- [[NIL]], -- environment
+ [[nil]], -- environment
1, -- $IOindex
$HiFiAccess, -- $HiFiAccess
$HistList, -- $HistList
$HistListLen, -- $HistListLen
$HistListAct, -- $HistListAct
$HistRecord, -- $HistRecord
- NIL, -- $internalHistoryTable
+ nil, -- $internalHistoryTable
COPY_-SEQ $localExposureDataDefault -- $localExposureData
]
closeInterpreterFrame(name) ==
- -- if name = NIL then it means the current frame
+ -- if name = nil then it means the current frame
null rest $interpreterFrameRing =>
name and (name ~= $interpreterFrameName) =>
throwKeyedMsg("S2IZ0020",[$interpreterFrameName])
- throwKeyedMsg("S2IZ0021",NIL)
+ throwKeyedMsg("S2IZ0021",nil)
if null name then $interpreterFrameRing := rest $interpreterFrameRing
else -- find the frame
found := nil
- ifr := NIL
+ ifr := nil
for f in $interpreterFrameRing repeat
found or (name ~= frameName(f)) => ifr := [f,:ifr]
found := true
@@ -1393,14 +1393,14 @@ closeInterpreterFrame(name) ==
previousInterpreterFrame() ==
updateCurrentInterpreterFrame()
- null rest $interpreterFrameRing => NIL -- nothing to do
+ null rest $interpreterFrameRing => nil -- nothing to do
[:b,l] := $interpreterFrameRing
$interpreterFrameRing := append!([l],b)
updateFromCurrentInterpreterFrame()
nextInterpreterFrame() ==
updateCurrentInterpreterFrame()
- null rest $interpreterFrameRing => NIL -- nothing to do
+ null rest $interpreterFrameRing => nil -- nothing to do
$interpreterFrameRing :=
append!(rest $interpreterFrameRing,[first $interpreterFrameRing])
updateFromCurrentInterpreterFrame()
@@ -1435,30 +1435,30 @@ updateFromCurrentInterpreterFrame() ==
if $frameMessages then
sayMessage ['" Current interpreter frame is called",:bright
$interpreterFrameName]
- NIL
+ nil
updateCurrentInterpreterFrame() ==
$interpreterFrameRing.first := createCurrentInterpreterFrame()
updateFromCurrentInterpreterFrame()
- NIL
+ nil
initializeInterpreterFrameRing() ==
$interpreterFrameName := 'initial
$interpreterFrameRing := [emptyInterpreterFrame($interpreterFrameName)]
updateFromCurrentInterpreterFrame()
- NIL
+ nil
changeToNamedInterpreterFrame(name) ==
updateCurrentInterpreterFrame()
frame := findFrameInRing(name)
- null frame => NIL
+ null frame => nil
$interpreterFrameRing := [frame,:remove!($interpreterFrameRing,frame)]
updateFromCurrentInterpreterFrame()
findFrameInRing(name) ==
- val := NIL
+ val := nil
for frame in $interpreterFrameRing repeat
first frame = name =>
val := frame
@@ -1473,17 +1473,17 @@ displayFrameNames() ==
importFromFrame args ==
-- args should have the form [frameName,:varNames]
if args and atom args then args := [args]
- null args => throwKeyedMsg("S2IZ0073",NIL)
+ null args => throwKeyedMsg("S2IZ0073",nil)
[fname,:args] := args
not member(fname,frameNames()) =>
throwKeyedMsg("S2IZ0074",[fname])
fname = frameName first $interpreterFrameRing =>
- throwKeyedMsg("S2IZ0075",NIL)
+ throwKeyedMsg("S2IZ0075",nil)
fenv := frameEnvironment fname
null args =>
x := UPCASE queryUserKeyedMsg("S2IZ0076",[fname])
STRING2ID_-N(x,1) in '(Y YES) =>
- vars := NIL
+ vars := nil
for [v,:props] in CAAR fenv repeat
v = "--macros" =>
for [m,:.] in props repeat vars := [m,:vars]
@@ -1511,7 +1511,7 @@ $historyFileType := 'axh
++ vm/370 filename name component
$oldHistoryFileName := 'last
-$internalHistoryTable := NIL
+$internalHistoryTable := nil
++ t means keep history in core
$useInternalHistoryTable := true
@@ -1523,7 +1523,7 @@ $historyDirectory := "A"
$HiFiAccess := true
history l ==
- l or null $options => sayKeyedMsg("S2IH0006",NIL)
+ l or null $options => sayKeyedMsg("S2IH0006",nil)
historySpad2Cmd()
@@ -1557,12 +1557,12 @@ initHistList() ==
-- creates $HistList as a circular list of length $HistListLen
-- and $HistRecord
$HistListLen:= 20
- $HistList:= [NIL]
+ $HistList:= [nil]
li:= $HistList
- for i in 1..$HistListLen repeat li:= [NIL,:li]
+ for i in 1..$HistListLen repeat li:= [nil,:li]
$HistList.rest := li
$HistListAct:= 0
- $HistRecord:= NIL
+ $HistRecord:= nil
historySpad2Cmd() ==
-- history is a system command which can call resetInCoreHist
@@ -1573,26 +1573,26 @@ historySpad2Cmd() ==
for [opt,:optargs] in $options]
for [opt,:optargs] in opts repeat
opt in '(on yes) =>
- $HiFiAccess => sayKeyedMsg("S2IH0007",NIL)
+ $HiFiAccess => sayKeyedMsg("S2IH0007",nil)
$IOindex = 1 => -- haven't done anything yet
$HiFiAccess:= true
initHistList()
- sayKeyedMsg("S2IH0008",NIL)
- x := UPCASE queryUserKeyedMsg("S2IH0009",NIL)
+ sayKeyedMsg("S2IH0008",nil)
+ x := UPCASE queryUserKeyedMsg("S2IH0009",nil)
STRING2ID_-N(x,1) in '(Y YES) =>
histFileErase histFileName()
$HiFiAccess:= true
$options := nil
clearSpad2Cmd '(all)
- sayKeyedMsg("S2IH0008",NIL)
+ sayKeyedMsg("S2IH0008",nil)
initHistList()
- sayKeyedMsg("S2IH0010",NIL)
+ sayKeyedMsg("S2IH0010",nil)
opt in '(off no) =>
- null $HiFiAccess => sayKeyedMsg("S2IH0011",NIL)
+ null $HiFiAccess => sayKeyedMsg("S2IH0011",nil)
$HiFiAccess:= false
disableHist()
- sayKeyedMsg("S2IH0012",NIL)
- opt = 'file => setHistoryCore NIL
+ sayKeyedMsg("S2IH0012",nil)
+ opt = 'file => setHistoryCore nil
opt = 'memory => setHistoryCore true
opt = 'reset => resetInCoreHist()
opt = 'save => saveHistory optargs
@@ -1605,13 +1605,13 @@ historySpad2Cmd() ==
setHistoryCore inCore ==
inCore = $useInternalHistoryTable =>
- sayKeyedMsg((inCore => "S2IH0030"; "S2IH0029"),NIL)
+ sayKeyedMsg((inCore => "S2IH0030"; "S2IH0029"),nil)
not $HiFiAccess =>
$useInternalHistoryTable := inCore
- inCore => sayKeyedMsg("S2IH0032",NIL)
- sayKeyedMsg("S2IH0031",NIL)
+ inCore => sayKeyedMsg("S2IH0032",nil)
+ sayKeyedMsg("S2IH0031",nil)
inCore =>
- $internalHistoryTable := NIL
+ $internalHistoryTable := nil
if $IOindex ~= 0 then
-- actually put something in there
l := # RKEYIDS histFileName()
@@ -1620,7 +1620,7 @@ setHistoryCore inCore ==
$internalHistoryTable := [[i,:vec],:$internalHistoryTable]
histFileErase histFileName()
$useInternalHistoryTable := true
- sayKeyedMsg("S2IH0032",NIL)
+ sayKeyedMsg("S2IH0032",nil)
$HiFiAccess:= false
histFileErase histFileName()
str := RDEFIOSTREAM ['(MODE . OUTPUT),['FILE,:histFileName()]]
@@ -1628,14 +1628,14 @@ setHistoryCore inCore ==
SPADRWRITE(object2Identifier n,rec,str)
RSHUT str
$HiFiAccess:= true
- $internalHistoryTable := NIL
- $useInternalHistoryTable := NIL
- sayKeyedMsg("S2IH0031",NIL)
+ $internalHistoryTable := nil
+ $useInternalHistoryTable := nil
+ sayKeyedMsg("S2IH0031",nil)
writeInputLines(fn,initial) ==
-- writes all input lines into file histInputFileName()
- not $HiFiAccess => sayKeyedMsg("S2IH0013",NIL) -- history not on
+ not $HiFiAccess => sayKeyedMsg("S2IH0013",nil) -- history not on
null fn =>
throwKeyedMsg("S2IH0038", nil) -- missing file name
maxn := 72
@@ -1666,7 +1666,7 @@ writeInputLines(fn,initial) ==
-- see file "undo" for definition of removeUndoLines
if fn ~= 'redo then sayKeyedMsg("S2IH0014",[namestring file])
SHUT inp
- NIL
+ nil
resetInCoreHist() ==
@@ -1674,7 +1674,7 @@ resetInCoreHist() ==
$HistListAct:= 0
for i in 1..$HistListLen repeat
$HistList:= rest $HistList
- $HistList.first := NIL
+ $HistList.first := nil
changeHistListLen(n) ==
-- changes the length of $HistList. n must be nonnegative
@@ -1683,7 +1683,7 @@ changeHistListLen(n) ==
$HistListLen:= n
l:= rest $HistList
if dif > 0 then
- for i in 1..dif repeat l:= [NIL,:l]
+ for i in 1..dif repeat l:= [nil,:l]
if dif < 0 then
for i in 1..-dif repeat l:= rest l
if $HistListAct > n then $HistListAct:= n
@@ -1697,7 +1697,7 @@ updateHist() ==
updateInCoreHist()
if $HiFiAccess then
(try writeHiFi(); finally disableHist())
- $HistRecord:= NIL
+ $HistRecord:= nil
$IOindex:= $IOindex+1
updateCurrentInterpreterFrame()
$mkTestInputStack := nil
@@ -1707,7 +1707,7 @@ updateHist() ==
updateInCoreHist() ==
-- updates $HistList and $IOindex
$HistList:= rest($HistList)
- $HistList.first := NIL
+ $HistList.first := nil
if $HistListAct < $HistListLen then $HistListAct:= $HistListAct+1
putHist(x,prop,val,e) ==
@@ -1782,7 +1782,7 @@ undoFromFile(n) ==
val =>
if not (x='%) then recordOldValue(x,prop,val)
if $HiFiAccess then recordNewValue(x,prop,val)
- p.rest := NIL
+ p.rest := nil
for i in 1..n repeat
vec:= (try rest readHiFi(i); finally disableHist())
for p1 in vec repeat
@@ -1795,9 +1795,9 @@ undoFromFile(n) ==
saveHistory(fn) ==
$seen: local := hashTable 'EQ
- not $HiFiAccess => sayKeyedMsg("S2IH0016",NIL)
+ not $HiFiAccess => sayKeyedMsg("S2IH0016",nil)
not $useInternalHistoryTable and
- null MAKE_-INPUT_-FILENAME histFileName() => sayKeyedMsg("S2IH0022",NIL)
+ null MAKE_-INPUT_-FILENAME histFileName() => sayKeyedMsg("S2IH0022",nil)
null fn =>
throwKeyedMsg("S2IH0037", nil)
savefile := makeHistFileName(fn)
@@ -1818,7 +1818,7 @@ saveHistory(fn) ==
restoreHistory(fn) ==
-- uses fn $historyFileType to recover an old session
- -- if fn = NIL, then use $oldHistoryFileName
+ -- if fn = nil, then use $oldHistoryFileName
if null fn then fn' := $oldHistoryFileName
else if fn is [fn'] and IDENTP(fn') then fn' := fn'
else throwKeyedMsg("S2IH0023",[fn'])
@@ -1837,8 +1837,8 @@ restoreHistory(fn) ==
l:= # RKEYIDS curfile
$HiFiAccess:= true
oldInternal := $useInternalHistoryTable
- $useInternalHistoryTable := NIL
- if oldInternal then $internalHistoryTable := NIL
+ $useInternalHistoryTable := nil
+ if oldInternal then $internalHistoryTable := nil
for i in 1..l repeat
vec:= (try readHiFi(i); finally disableHist())
if oldInternal then $internalHistoryTable :=
@@ -1866,10 +1866,10 @@ restoreHistory(fn) ==
-- show history.
showHistory(arg) ==
-- arg can be of form
- -- NIL show at most last 20 input lines
+ -- nil show at most last 20 input lines
-- (n) show at most last n input lines
-- (lit) where lit is an abbreviation for 'input or 'both
- -- if 'input, same as NIL
+ -- if 'input, same as nil
-- if 'both, show last 5 input and outputs
-- (n lit) show last n input lines + last n output lines
-- if lit expands to 'both
@@ -1887,7 +1887,7 @@ showHistory(arg) ==
n := arg1
nset := true
KDR arg => arg1 := second arg
- arg1 := NIL
+ arg1 := nil
arg1 =>
arg2 := selectOptionLC(arg1,'(input both),nil)
if arg2
@@ -1941,14 +1941,14 @@ fetchOutput(n) ==
val:= rest ASSQ('value,rest Alist) => val
throwKeyedMsg("S2IH0003",[n])
throwKeyedMsg("S2IH0003",[n])
- throwKeyedMsg("S2IH0004",NIL)
+ throwKeyedMsg("S2IH0004",nil)
readHiFi(n) ==
-- reads the file using index n
if $useInternalHistoryTable
then
pair := assoc(n,$internalHistoryTable)
- atom pair => keyedSystemError("S2IH0034",NIL)
+ atom pair => keyedSystemError("S2IH0034",nil)
vec := rest pair
else
HiFi:= RDEFIOSTREAM ['(MODE . INPUT),['FILE,:histFileName()]]
@@ -1971,7 +1971,7 @@ disableHist() ==
-- disables the history mechanism if an error occurred in the protected
-- piece of code
not $HiFiAccess => histFileErase histFileName()
- NIL
+ nil
writeHistModesAndValues() ==
for [a,:.] in CAAR $InteractiveFrame repeat
@@ -1979,7 +1979,7 @@ writeHistModesAndValues() ==
putHist(a,'value,x,$InteractiveFrame)
x := get(a,'mode,$InteractiveFrame) =>
putHist(a,'mode,x,$InteractiveFrame)
- NIL
+ nil
SPADRREAD(vec, stream) ==
dewritify rread(vec, stream, nil)
@@ -2157,7 +2157,7 @@ dewritify ob ==
HPUT($seen, nob, nob)
nob
type = 'PLACE =>
- nob := VMREAD MAKE_-INSTREAM NIL
+ nob := VMREAD MAKE_-INSTREAM nil
HPUT($seen, ob, nob)
HPUT($seen, nob, nob)
nob
@@ -2201,7 +2201,7 @@ load args == loadSpad2Cmd args
loadSpad2Cmd args ==
sayKeyedMsg("S2IU0003", nil)
- NIL
+ nil
-- load1(args,$forceDatabaseUpdate)
--load1(args,$forceDatabaseUpdate) == -- $ var is now local
@@ -2271,9 +2271,9 @@ quit() == quitSpad2Cmd()
quitSpad2Cmd() ==
$quitCommandType ~= 'protected => leaveScratchpad()
- x := UPCASE queryUserKeyedMsg("S2IZ0031",NIL)
+ x := UPCASE queryUserKeyedMsg("S2IZ0031",nil)
STRING2ID_-N(x,1) in '(Y YES) => leaveScratchpad()
- sayKeyedMsg("S2IZ0032",NIL)
+ sayKeyedMsg("S2IZ0032",nil)
TERSYSCOMMAND ()
leaveScratchpad () ==
@@ -2335,7 +2335,7 @@ savesystem l ==
show l == showSpad2Cmd l
showSpad2Cmd l ==
- l = [NIL] => helpSpad2Cmd '(show)
+ l = [nil] => helpSpad2Cmd '(show)
$showOptions : local := '(attributes operations)
if null $options then $options := '((operations))
$e : local := $InteractiveFrame
@@ -2345,11 +2345,11 @@ showSpad2Cmd l ==
constr = 'Record =>
sayKeyedMsg("S2IZ0044R",[constr, '")show Record(a: Integer, b: String)"])
constr = 'Mapping =>
- sayKeyedMsg("S2IZ0044M",NIL)
+ sayKeyedMsg("S2IZ0044M",nil)
sayKeyedMsg("S2IZ0045T",[constr, '")show Union(a: Integer, b: String)"])
sayKeyedMsg("S2IZ0045U",[constr, '")show Union(Integer, String)"])
constr is ['Mapping, :.] =>
- sayKeyedMsg("S2IZ0044M",NIL)
+ sayKeyedMsg("S2IZ0044M",nil)
reportOperations(constr,constr)
reportOperations(l,l)
@@ -2363,12 +2363,12 @@ reportOperations(oldArg,u) ==
u = $quadSymbol =>
sayBrightly ['" mode denotes", :bright '"any", "type"]
u = "%" =>
- sayKeyedMsg("S2IZ0063",NIL)
- sayKeyedMsg("S2IZ0064",NIL)
+ sayKeyedMsg("S2IZ0063",nil)
+ sayKeyedMsg("S2IZ0064",nil)
u isnt ['Record,:.] and u isnt ['Union,:.] and
null(isNameOfType u) and u isnt ['typeOf,.] =>
if atom oldArg then oldArg := [oldArg]
- sayKeyedMsg("S2IZ0063",NIL)
+ sayKeyedMsg("S2IZ0063",nil)
for op in oldArg repeat
sayKeyedMsg("S2IZ0062",[opOf op])
(v := isDomainValuedVariable u) => reportOpsFromUnitDirectly0 v
@@ -2449,7 +2449,7 @@ reportOpsFromUnitDirectly unitForm ==
sayBrightly '""
attList:= removeDuplicates MSORT [x for [x,:.] in unit.2]
say2PerLine [formatAttribute x for x in attList]
- NIL
+ nil
opt = 'operations =>
$commentedOps: local := 0
--new form is (<op> <signature> <slotNumber> <condition> <kind>)
@@ -2472,14 +2472,14 @@ reportOpsFromUnitDirectly unitForm ==
['"Functions that are not yet implemented are preceded by",
:bright '"--"]
sayBrightly '""
- NIL
+ nil
reportOpsFromLisplib(op,u) ==
null(fn:= getConstructorAbbreviationFromDB op) =>
sayKeyedMsg("S2IZ0054",[u])
argml :=
(s := getConstructorSignature op) => KDR s
- NIL
+ nil
typ:= getConstructorKindFromDB op
nArgs:= #argml
argList:= KDR getConstructorFormFromDB op
@@ -2513,7 +2513,7 @@ reportOpsFromLisplib(op,u) ==
null attList => sayBrightly
concat('"%b",form2String functorForm,'"%d","has no attributes.",'"%l")
say2PerLine [formatAttribute x for x in attList]
- NIL
+ nil
opt = 'operations => displayOperationsFromLisplib functorForm
nil
@@ -2565,7 +2565,7 @@ synonym(:l) == synonymSpad2Cmd() -- always passed a null list
synonymSpad2Cmd() ==
line := getSystemCommandLine()
- if line = '"" then printSynonyms(NIL)
+ if line = '"" then printSynonyms(nil)
else
pair := processSynonymLine line
if $CommandSynonymAlist then
@@ -2633,13 +2633,13 @@ diffAlist(new,old) ==
for (pair := [name,:proplist]) in new repeat
-- name has an entry both in new and old world
-- (1) if the old world had no proplist for that variable, then
- -- record NIL as the value of each new property
+ -- record nil as the value of each new property
-- (2) if the old world does have a proplist for that variable, then
-- a) for each property with a value: give the old value
- -- b) for each property missing: give NIL as the old value
+ -- b) for each property missing: give nil as the old value
oldPair := ASSQ(name,old) =>
null (oldProplist := rest oldPair) =>
- --record old values of new properties as NIL
+ --record old values of new properties as nil
acc := [[name,:[[prop] for [prop,:.] in proplist]],:acc]
deltas := nil
for (propval := [prop,:val]) in proplist repeat
@@ -2809,7 +2809,7 @@ whatSpad2Cmd l ==
null l => reportWhatOptions()
[key0,:args] := l
key := selectOptionLC(key0,$whatOptions,nil)
- null key => sayKeyedMsg("S2IZ0043",NIL)
+ null key => sayKeyedMsg("S2IZ0043",nil)
args := [fixpat p for p in args] where
fixpat x ==
x is [x',:.] => DOWNCASE x'
@@ -2859,7 +2859,7 @@ apropos l ==
sayAsManyPerLineAsPossible MSORT ops
sayKeyedMsg("S2IF0011",[first ops])
sayMessage '" There are no operations containing those patterns"
- NIL
+ nil
printSynonyms(patterns) ==
@@ -2882,7 +2882,7 @@ printLabelledList(ls,label1,label2,prefix,patterns) ==
sayMessage [label1,'"-defined ",label2,'" satisfying patterns:",
'"%l",'" ",'"%b",:blankList patterns,'"%d"]
for [syn,:comm] in ls repeat
- if subString(syn,0,1) = '"|" then syn := subString(syn,1,NIL)
+ if subString(syn,0,1) = '"|" then syn := subString(syn,1,nil)
if syn = '"%i" then syn := '"%i "
wid := MAX(30 - (entryWidth syn),1)
sayBrightly concat('"%b",prefix,syn,'"%d",
@@ -2905,7 +2905,7 @@ whatCommands(patterns) ==
sayAsManyPerLineAsPossible l
SAY " "
patterns => nil -- don't be so verbose
- sayKeyedMsg("S2IZ0046",NIL)
+ sayKeyedMsg("S2IZ0046",nil)
nil
reportWhatOptions() ==
@@ -2920,7 +2920,7 @@ filterListOfStrings(patterns,names) ==
-- returns: list of strings in names that contains any of the strings
-- in patterns
(null patterns) or (null names) => names
- names' := NIL
+ names' := nil
for name in reverse names repeat
satisfiesRegularExpressions(name,patterns) =>
names' := [name,:names']
@@ -2932,7 +2932,7 @@ filterListOfStringsWithFn(patterns,names,fn) ==
-- returns: list of strings in names that contains any of the strings
-- in patterns
(null patterns) or (null names) => names
- names' := NIL
+ names' := nil
for name in reverse names repeat
satisfiesRegularExpressions(FUNCALL(fn,name),patterns) =>
names' := [name,:names']
@@ -2954,7 +2954,7 @@ satisfiesRegularExpressions(name,patterns) ==
workfiles l == workfilesSpad2Cmd l
workfilesSpad2Cmd args ==
- args => throwKeyedMsg("S2IZ0047",NIL)
+ args => throwKeyedMsg("S2IZ0047",nil)
deleteFlag := nil
for [type,:.] in $options repeat
type1 := selectOptionLC(type,'(boot lisp meta delete),nil)
@@ -2993,14 +2993,14 @@ zsystemdevelopment1(l,im) ==
newopt := append(optargs,fromopt)
opt1 := selectOptionLC(opt,'(from),nil)
opt1 = 'from => nil
- opt = "c" => _/D_,1 (newopt ,_/COMP(),NIL,NIL)
- opt = "d" => _/D_,1 (newopt ,'DEFINE,NIL,NIL)
- opt = "dt" => _/D_,1 (newopt ,'DEFINE,NIL,true)
- opt = "ct" => _/D_,1 (newopt ,_/COMP(),NIL,true)
- opt = "ctl" => _/D_,1 (newopt ,_/COMP(),NIL,'TRACELET)
- opt = "ec" => _/D_,1 (newopt ,_/COMP(),true,NIL)
+ opt = "c" => _/D_,1 (newopt ,_/COMP(),nil,nil)
+ opt = "d" => _/D_,1 (newopt ,'DEFINE,nil,nil)
+ opt = "dt" => _/D_,1 (newopt ,'DEFINE,nil,true)
+ opt = "ct" => _/D_,1 (newopt ,_/COMP(),nil,true)
+ opt = "ctl" => _/D_,1 (newopt ,_/COMP(),nil,'TRACELET)
+ opt = "ec" => _/D_,1 (newopt ,_/COMP(),true,nil)
opt = "ect" => _/D_,1 (newopt ,_/COMP(),true,true)
- opt = "e" => _/D_,1 (newopt ,NIL,true,NIL)
+ opt = "e" => _/D_,1 (newopt ,nil,true,nil)
opt = "version" => version()
opt = "pause" =>
conStream := DEFIOSTREAM ('((DEVICE . CONSOLE) (QUAL . V)),120,0)
@@ -3022,7 +3022,7 @@ zsystemdevelopment1(l,im) ==
--% Synonym File Reader
processSynonyms() ==
- p := STRPOS('")",LINE,0,NIL)
+ p := STRPOS('")",LINE,0,nil)
fill := '""
if p
then
@@ -3035,9 +3035,9 @@ processSynonyms() ==
if to then to := to - 1
synstr := subString(line, 1, to)
syn := STRING2ID_-N (synstr, 1)
- null (fun := LASSOC (syn, $CommandSynonymAlist)) => NIL
+ null (fun := LASSOC (syn, $CommandSynonymAlist)) => nil
fun := eval fun -- fun may have been a suspension
- to := STRPOS('")",fun,1,NIL)
+ to := STRPOS('")",fun,1,nil)
if to and to ~= #(fun)-1 then
opt := strconc('" ",subString(fun,to))
fun := subString(fun,0,to-1)
@@ -3086,17 +3086,17 @@ handleNoParseCommands(unab, string) ==
spaceIndex := SEARCH('" ", string)
unab = "lisp" =>
if (null spaceIndex) then
- sayKeyedMsg("S2IV0005", NIL)
+ sayKeyedMsg("S2IV0005", nil)
nil
else nplisp(stripLisp string)
unab = "boot" =>
if (null spaceIndex) then
- sayKeyedMsg("S2IV0005", NIL)
+ sayKeyedMsg("S2IV0005", nil)
nil
else npboot(subSequence(string, spaceIndex+1))
unab = "system" =>
if (null spaceIndex) then
- sayKeyedMsg("S2IV0005", NIL)
+ sayKeyedMsg("S2IV0005", nil)
nil
else npsystem(unab, string)
unab = "synonym" =>
@@ -3108,7 +3108,7 @@ handleNoParseCommands(unab, string) ==
pquit _
credits _
copyright ) =>
- sayKeyedMsg("S2IV0005", NIL)
+ sayKeyedMsg("S2IV0005", nil)
nil
funName := makeSymbol strconc('"np",STRING unab)
FUNCALL(funName, subSequence(string, spaceIndex+1))
@@ -3245,7 +3245,7 @@ stripSpaces str ==
STRING_-TRIM('" ", str)
npProcessSynonym(str) ==
- if str = '"" then printSynonyms(NIL)
+ if str = '"" then printSynonyms(nil)
else
pair := processSynonymLine str
if $CommandSynonymAlist then
diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index 9d3642aa..5e2b5f65 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -45,11 +45,11 @@ $intRestart ==
-- When $QuiteCommand is true Spad will not produce any output from
-- a top level command
-$QuietCommand := NIL
+$QuietCommand := nil
-- When $ProcessInteractiveValue is true, we don't want the value printed
-- or recorded.
-$ProcessInteractiveValue := NIL
-$HTCompanionWindowID := NIL
+$ProcessInteractiveValue := nil
+$HTCompanionWindowID := nil
++ initialize the garbage collection timer
statisticsInitialization() ==
@@ -85,7 +85,7 @@ start(:l) ==
if not $ruleSetsInitialized then initializeRuleSets()
if $displayStartMsgs then sayKeyedMsg("S2IZ0053",['"constructors"])
makeConstructorsAutoLoad()
- GCMSG(NIL)
+ GCMSG(nil)
SETQ($IOindex,1)
if $displayStartMsgs then sayKeyedMsg("S2IZ0053",['"history"])
initHist()
@@ -101,11 +101,11 @@ start(:l) ==
if $OLDLINE ~= 'END__UNIT
then
centerAndHighlight($OLDLINE,$LINELENGTH,'" ")
- sayKeyedMsg("S2IZ0051",NIL)
- else sayKeyedMsg("S2IZ0052",NIL)
+ sayKeyedMsg("S2IZ0051",nil)
+ else sayKeyedMsg("S2IZ0052",nil)
SAY fillerSpaces($LINELENGTH,char "=")
TERPRI()
- $OLDLINE := NIL
+ $OLDLINE := nil
$superHash := hashTable 'EQUAL
if null l then runspad()
'EndOfSpad
@@ -116,7 +116,7 @@ readSpadProfileIfThere() ==
MAKE_-INPUT_-FILENAME file =>
SETQ(_/EDITFILE,file)
_/RQ ()
- NIL
+ nil
--% Parser Output --> Interpreter
@@ -128,18 +128,18 @@ processInteractive(form, posnForm) ==
initializeTimedNames($interpreterTimedNames,$interpreterTimedClasses)
$op: local:= (form is [op,:.] => op; form) --name of operator
- $Coerce: local := NIL
+ $Coerce: local := nil
$compErrorMessageStack: local := nil
- $freeVars : local := NIL
- $mapList:local := NIL --list of maps being type analyzed
- $compilingMap:local:= NIL --true when compiling a map
- $compilingLoop:local:= NIL --true when compiling a loop body
- $interpOnly: local := NIL --true when in interpret only mode
- $whereCacheList: local := NIL --maps compiled because of where
+ $freeVars : local := nil
+ $mapList:local := nil --list of maps being type analyzed
+ $compilingMap:local:= nil --true when compiling a map
+ $compilingLoop:local:= nil --true when compiling a loop body
+ $interpOnly: local := nil --true when in interpret only mode
+ $whereCacheList: local := nil --maps compiled because of where
$StreamFrame: local := nil --used in printing streams
- $declaredMode: local := NIL --Weak type propagation for symbols
- $localVars:local := NIL --list of local variables in function
- $analyzingMapList:local := NIL --names of maps currently being
+ $declaredMode: local := nil --Weak type propagation for symbols
+ $localVars:local := nil --list of local variables in function
+ $analyzingMapList:local := nil --names of maps currently being
--analyzed
$lastLineInSEQ: local := true --see evalIF and friends
$instantCoerceCount: local := 0
@@ -148,9 +148,9 @@ processInteractive(form, posnForm) ==
$defaultFortVar:= 'X --default FORTRAN variable name
$fortVar : local := --variable name for FORTRAN output
$defaultFortVar
- $minivector: local := NIL
- $domPvar: local := NIL
- $inRetract: local := NIL
+ $minivector: local := nil
+ $domPvar: local := nil
+ $inRetract: local := nil
object := processInteractive1(form, posnForm)
--object := ERRORSET(['processInteractive1,LIST('QUOTE,form),['QUOTE,posnForm]],'t,'t)
if not($ProcessInteractiveValue) then
diff --git a/src/interp/i-util.boot b/src/interp/i-util.boot
index c15dea3b..367eeff1 100644
--- a/src/interp/i-util.boot
+++ b/src/interp/i-util.boot
@@ -46,12 +46,12 @@ $intTopLevel ==
inputPrompt str ==
-- replaces older INPUT-PROMPT
- atom (x := $SCREENSIZE()) => NIL
+ atom (x := $SCREENSIZE()) => nil
p := first(x) - 2
y := $OLDLINE
- SETQ($OLDLINE,NIL)
+ SETQ($OLDLINE,nil)
y => _$SHOWLINE(strconc(str,EBCDIC 19,y),p)
- 0 = # str => NIL
+ 0 = # str => nil
_$SHOWLINE(strconc(str,EBCDIC 19),p)
protectedPrompt(:p) ==
diff --git a/src/interp/incl.boot b/src/interp/incl.boot
index bbe9cb08..7a68d933 100644
--- a/src/interp/incl.boot
+++ b/src/interp/incl.boot
@@ -190,10 +190,10 @@ incHandleMessage(xl) ==
inclHandleBug(incPos xl.0, xl.1.0)
xlOK(eb, str, lno, ufo) ==
- [incLine(eb, str, -1, lno, ufo), [NIL, "none"]]
+ [incLine(eb, str, -1, lno, ufo), [nil, "none"]]
xlOK1(eb, str,str1, lno, ufo) ==
- [incLine1(eb, str,str1, -1, lno, ufo), [NIL, "none"]]
+ [incLine1(eb, str,str1, -1, lno, ufo), [nil, "none"]]
incLine1(eb, str,str1, gno, lno, ufo) ==
ln := lnCreate(eb,str,gno,lno,ufo)
@@ -201,7 +201,7 @@ incLine1(eb, str,str1, gno, lno, ufo) ==
xlSkip(eb, str, lno, ufo) ==
str := strconc('"-- Omitting:", str)
- [incLine(eb, str, -1, lno, ufo), [NIL, "none"]]
+ [incLine(eb, str, -1, lno, ufo), [nil, "none"]]
xlMsg(eb, str, lno, ufo, mess) ==
[incLine(eb, str, -1, lno, ufo), mess]
diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot
index 74760f91..248077e8 100644
--- a/src/interp/int-top.boot
+++ b/src/interp/int-top.boot
@@ -86,7 +86,7 @@ ncTopLevel() ==
-- Top-level read-parse-eval-print loop for the interpreter. Uses
-- the Bill Burge's parser.
IN_-STREAM: fluid := $InputStream
- _*EOF_*: fluid := NIL
+ _*EOF_*: fluid := nil
$InteractiveMode :fluid := true
$NEWSPAD: fluid := true
$SPAD: fluid := true
@@ -369,7 +369,7 @@ ncError() ==
--% phParse: carrier[tokens,...] -> carrier[ptree, tokens,...]
--)line (defun pretty (x) (boottran::reallyprettyprint x))
--)line (defun packagetran (x) (boot::|packageTran|))
-$ncmParse := NIL
+$ncmParse := nil
phParse(carrier,ptree) ==
phBegin 'Parsing
@@ -426,7 +426,7 @@ ncloopPrefix?(prefix,whole) ==
good:= prefix.i = whole.j
if good then subString(whole,#prefix) else good
-$ncmPhase := NIL
+$ncmPhase := nil
phBegin id ==
$convPhase := id
diff --git a/src/interp/interop.boot b/src/interp/interop.boot
index b6eb54f7..1b2992ff 100644
--- a/src/interp/interop.boot
+++ b/src/interp/interop.boot
@@ -342,7 +342,7 @@ instantiate domenv ==
-- loadFunctor functor
-- fn := symbolFunction functor
-- symbolFunction(functor) := ofn
--- PUT(functor, 'instantiate, fn)
+-- proprty(functor, 'instantiate) := fn
-- domvec := apply(fn, args)
domvec := apply(functor, args)
oldDom.first := $oldAxiomDomainDispatch
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 413f0ebb..3a476ea6 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -101,7 +101,7 @@ makePredicateBitVector pl == --called by buildFunctor
$predGensymAlist := nil --bound by buildFunctor, used by optHas
for p in removeAttributePredicates pl repeat
pred := simpBool transHasCode p
- atom pred => 'skip --skip over T and NIL
+ atom pred => 'skip --skip over T and nil
if isHasDollarPred pred then
lasts := insert(pred,lasts)
for q in stripOutNonDollarPreds pred repeat firsts := insert(q,firsts)
@@ -222,7 +222,7 @@ putFileProperty(fn,ft,id,val) ==
val
lisplibWrite(prop,val,filename) ==
- -- this may someday not write NIL keys, but it will now
+ -- this may someday not write nil keys, but it will now
if $LISPLIB then
rwrite128(prop,val,filename)
@@ -256,7 +256,7 @@ hasFilePropertyNoCache(p,id,abbrev) ==
-- it is assumed that the file exists and is a proper pathname
-- startTimingProcess 'diskread
fnStream:= readLibPathFast p
- null fnStream => NIL
+ null fnStream => nil
-- str:= object2String id
val:= rread(id,fnStream, nil)
RSHUT fnStream
@@ -301,8 +301,8 @@ findModule cname ==
loadLibIfNotLoaded libName ==
-- replaces old SpadCondLoad
-- loads is library is not already loaded
- $PrintOnly => NIL
- property(libName,'LOADED) => NIL
+ $PrintOnly => nil
+ property(libName,'LOADED) => nil
loadLib libName
loadLib cname ==
@@ -324,14 +324,14 @@ loadLib cname ==
coSig :=
u =>
[[.,:sig],:.] := u
- [NIL,:[categoryForm?(x) for x in rest sig]]
- NIL
- -- in following, add property value false or NIL to possibly clear
+ [nil,:[categoryForm?(x) for x in rest sig]]
+ nil
+ -- in following, add property value false or nil to possibly clear
-- old value
if null rest getConstructorFormFromDB cname then
property(cname,'NILADIC) := true
else
- REMPROP(cname,'NILADIC)
+ property(cname,'NILADIC) := nil
property(cname,'LOADED) := fullLibName
if $InteractiveMode then $CategoryFrame := $EmptyEnvironment
stopTimingProcess 'load
@@ -405,11 +405,11 @@ loadFunctor u ==
makeConstructorsAutoLoad() ==
for cnam in allConstructors() repeat
cnam in $CategoryNames => nil
- REMPROP(cnam,'LOADED)
+ property(cnam,'LOADED) := nil
-- fn:=getConstructorAbbreviationFromDB cnam
if niladicConstructorFromDB cnam
- then PUT(cnam,'NILADIC,'T)
- else REMPROP(cnam,'NILADIC)
+ then property(cnam,'NILADIC) := 'T
+ else property(cnam,'NILADIC) := nil
systemDependentMkAutoload(getConstructorAbbreviationFromDB cnam,cnam)
systemDependentMkAutoload(fn,cnam) ==
@@ -433,11 +433,11 @@ autoLoad(abb,cname) ==
setAutoLoadProperty(name) ==
-- abb := getConstructorAbbreviationFromDB name
- REMPROP(name,'LOADED)
+ property(name,'LOADED) := nil
symbolFunction(name) := mkAutoLoad(getConstructorAbbreviationFromDB name, name)
unloadOneConstructor(cnam,fn) ==
- REMPROP(cnam,'LOADED)
+ property(cnam,'LOADED) := nil
symbolFunction(cnam) := mkAutoLoad(fn, cnam)
--% Compilation
@@ -458,22 +458,22 @@ compileConstructorLib(l,op,editFlag,traceFlag) ==
compConLib1(fun,infileOrNil,outfileOrNil,auxOp,editFlag,traceFlag) ==
$PrettyPrint: local := 'T
$LISPLIB: local := 'T
- $lisplibAttributes: local := NIL
- $lisplibPredicates: local := NIL
- $lisplibForm: local := NIL
- $lisplibAbbreviation: local := NIL
- $lisplibParents: local := NIL
- $lisplibAncestors: local := NIL
- $lisplibKind: local := NIL
- $lisplibModemap: local := NIL
- $lisplibModemapAlist: local := NIL
- $lisplibSlot1 : local := NIL --used by NRT mechanisms
- $lisplibOperationAlist: local := NIL
- $lisplibOpAlist: local:= NIL
- $lisplibSuperDomain: local := NIL
- $libFile: local := NIL
- $lisplibVariableAlist: local := NIL
- $lisplibSignatureAlist: local := NIL
+ $lisplibAttributes: local := nil
+ $lisplibPredicates: local := nil
+ $lisplibForm: local := nil
+ $lisplibAbbreviation: local := nil
+ $lisplibParents: local := nil
+ $lisplibAncestors: local := nil
+ $lisplibKind: local := nil
+ $lisplibModemap: local := nil
+ $lisplibModemapAlist: local := nil
+ $lisplibSlot1 : local := nil --used by NRT mechanisms
+ $lisplibOperationAlist: local := nil
+ $lisplibOpAlist: local:= nil
+ $lisplibSuperDomain: local := nil
+ $libFile: local := nil
+ $lisplibVariableAlist: local := nil
+ $lisplibSignatureAlist: local := nil
if cons? fun and null rest fun then fun:= first fun -- unwrap nullary
libName:= getConstructorAbbreviation fun
infile:= infileOrNil or getFunctionSourceFile fun or
@@ -491,23 +491,23 @@ compDefineLisplib(df:=["DEF",[op,:.],:.],m,e,prefix,fal,fn) ==
sayMSG fillerSpaces(72,char "-")
$LISPLIB: local := 'T
$op: local := op
- $lisplibAttributes: local := NIL
- $lisplibPredicates: local := NIL -- set by makePredicateBitVector
- $lisplibForm: local := NIL
- $lisplibKind: local := NIL
- $lisplibAbbreviation: local := NIL
- $lisplibParents: local := NIL
- $lisplibAncestors: local := NIL
- $lisplibModemap: local := NIL
- $lisplibModemapAlist: local := NIL
- $lisplibSlot1 : local := NIL -- used by NRT mechanisms
- $lisplibOperationAlist: local := NIL
+ $lisplibAttributes: local := nil
+ $lisplibPredicates: local := nil -- set by makePredicateBitVector
+ $lisplibForm: local := nil
+ $lisplibKind: local := nil
+ $lisplibAbbreviation: local := nil
+ $lisplibParents: local := nil
+ $lisplibAncestors: local := nil
+ $lisplibModemap: local := nil
+ $lisplibModemapAlist: local := nil
+ $lisplibSlot1 : local := nil -- used by NRT mechanisms
+ $lisplibOperationAlist: local := nil
$lisplibOpAlist: local := nil --operations alist for new runtime system
$lisplibSignatureAlist: local := nil
- $lisplibSuperDomain: local := NIL
- $libFile: local := NIL
- $lisplibVariableAlist: local := NIL
--- $lisplibRelatedDomains: local := NIL --from ++ Related Domains: see c-doc
+ $lisplibSuperDomain: local := nil
+ $libFile: local := nil
+ $lisplibVariableAlist: local := nil
+-- $lisplibRelatedDomains: local := nil --from ++ Related Domains: see c-doc
$lisplibCategory: local := nil
--for categories, is rhs of definition; otherwise, is target of functor
--will eventually become the "constructorCategory" property in lisplib
@@ -535,7 +535,7 @@ compDefineLisplib(df:=["DEF",[op,:.],:.],m,e,prefix,fal,fn) ==
FRESH_-LINE $algebraOutputStream
sayMSG fillerSpaces(72,char "-")
unloadOneConstructor(op,libName)
- LOCALDATABASE([symbolName getConstructorAbbreviationFromDB op],NIL)
+ LOCALDATABASE([symbolName getConstructorAbbreviationFromDB op],nil)
$newConlist := [op, :$newConlist] ----------> bound in function "compiler"
res
@@ -666,7 +666,7 @@ getSlot1 domainName ==
p := pathname [fn,$spadLibFT,'"*"]
not isExistingFile(p) =>
sayKeyedMsg("S2IL0003",[namestring p])
- NIL
+ nil
(sig := getConstructorSignature domainName) =>
[.,target,:argMml] := sig
for a in $FormalMapVariableList for m in argMml repeat
@@ -675,7 +675,7 @@ getSlot1 domainName ==
systemErrorHere ["getSlot1",domainName]
t.expr.1
sayKeyedMsg("S2IL0022",[namestring p,'"constructor modemap"])
- NIL
+ nil
transformOperationAlist operationAlist ==
-- this transforms the operationAlist which is written out onto LISPLIBs.
@@ -685,7 +685,7 @@ transformOperationAlist operationAlist ==
-- where signature-Alist has entries (<signature> . item)
-- where item has form (<slotNumber> <condition> <kind>)
-- where <kind> =
- -- NIL => function
+ -- nil => function
-- CONST => constant ... and others
newAlist:= nil
for [[op,sig,:.],condition,implementation] in operationAlist repeat
diff --git a/src/interp/macex.boot b/src/interp/macex.boot
index fdc0c5ff..ff1a4609 100644
--- a/src/interp/macex.boot
+++ b/src/interp/macex.boot
@@ -119,11 +119,11 @@ macMacro pf ==
mac0Define(sy, state, body) ==
$pfMacros := [[sy, state, body],:$pfMacros]
--- Returns [state, body] or NIL.
+-- Returns [state, body] or nil.
mac0Get sy ==
IFCDR assoc(sy, $pfMacros)
--- Returns [sy, state] or NIL.
+-- Returns [sy, state] or nil.
mac0GetName body ==
name := nil
for [sy,st,bd] in $pfMacros while not name repeat
diff --git a/src/interp/macros.lisp b/src/interp/macros.lisp
index 0bc2adb5..3fadfeac 100644
--- a/src/interp/macros.lisp
+++ b/src/interp/macros.lisp
@@ -235,16 +235,12 @@
(defun remdup (l) (remove-duplicates l :test #'equalp))
-(DEFUN GETTAIL (X L) (member X L :test #'equal))
-
; 15.6 Association Lists
(defun QLASSQ (p a-list) (cdr (assq p a-list)))
(define-function 'LASSQ #'QLASSQ)
-(defun pair (x y) (mapcar #'cons x y))
-
;;; Operations on Association Sets (AS)
(defun AS-INSERT (A B L)
diff --git a/src/interp/match.boot b/src/interp/match.boot
index b660e72c..c9addf40 100644
--- a/src/interp/match.boot
+++ b/src/interp/match.boot
@@ -74,7 +74,7 @@ stringPosition(s,t,startpos) ==
n := # t
if startpos < 0 or startpos > n then error '"index out of range"
if # s = 0 then return startpos -- bug in STRPOS
- r := STRPOS(s,t,startpos,NIL)
+ r := STRPOS(s,t,startpos,nil)
if r = nil then n else r
superMatch?(opattern,subject) == --subject assumed to be DOWNCASEd
@@ -178,7 +178,7 @@ basicMatch?(pattern,target) ==
matchSegment?(pattern,subject,k) ==
matchAnySegment?(pattern,DOWNCASE subject,k,nil)
-matchAnySegment?(pattern,target,k,nc) == --k = start position; nc=#chars or NIL
+matchAnySegment?(pattern,target,k,nc) == --k = start position; nc=#chars or nil
n := #pattern
p := charPosition($wildCard,pattern,0)
p = n =>
diff --git a/src/interp/modemap.boot b/src/interp/modemap.boot
index 85fa6886..89fe9f48 100644
--- a/src/interp/modemap.boot
+++ b/src/interp/modemap.boot
@@ -308,7 +308,7 @@ augModemapsFromCategory(domainName,domainView,functorForm,categoryForm,e) ==
-- --this is particularly dirty and should be cleaned up, say, by wrapping
-- -- an appropriate lambda expression around mapping forms
-- domainForm is [op,:l] and l =>
--- get(op,'modemap,e) is [[[mc,:.],:.]] => applySubst(PAIR(rest mc,l),catForm)
+-- get(op,'modemap,e) is [[[mc,:.],:.]] => applySubst(pairList(rest mc,l),catForm)
-- catForm
evalAndSub(domainName,viewName,functorForm,form,$e) ==
diff --git a/src/interp/msg.boot b/src/interp/msg.boot
index 2bd735a8..4e4c8542 100644
--- a/src/interp/msg.boot
+++ b/src/interp/msg.boot
@@ -50,7 +50,7 @@ $LINELENGTH := 80
$preLength := 11
$LOGLENGTH := $LINELENGTH - 6
$specificMsgTags := []
-$showKeyNum := NIL
+$showKeyNum := nil
$compErrorPrefix := '"Error"
$compBugPrefix := '"Bug!"
@@ -103,7 +103,7 @@ ncBug (erMsgKey, erArgL,:optAttr) ==
msgCreate(tag,posWTag,key,argL,optPre,:optAttr) ==
if cons? key then tag := 'old
- msg := [tag,posWTag,key,argL,optPre,NIL]
+ msg := [tag,posWTag,key,argL,optPre,nil]
if first optAttr then
setMsgForcedAttrList(msg,first optAttr)
putDatabaseStuff msg
@@ -143,7 +143,7 @@ getMsgInfoFromKey msg ==
getErFromDbL (erMsgKey,dbL) ==
- erMsg := NIL
+ erMsg := nil
while null erMsg repeat
dbName := first dbL
dbL := rest dbL
@@ -296,7 +296,7 @@ queueUpErrors(globalNumOfLine,msgList)==
msgList
redundant(msg,thisPosMsgs) ==
- found := NIL
+ found := nil
if msgNoRep? msg then
for item in $noRepList repeat
sameMsg?(msg,item) => return (found := true)
@@ -309,11 +309,11 @@ sameMsg? (msg1,msg2) ==
thisPosIsLess(pos,num) ==
- poNopos? pos => NIL
+ poNopos? pos => nil
poGlobalLinePosn pos < num
thisPosIsEqual(pos,num) ==
- poNopos? pos => NIL
+ poNopos? pos => nil
poGlobalLinePosn pos = num
--%outputting stuff
@@ -439,7 +439,7 @@ desiredMsg (erMsgKey,:optCatFlag) ==
true
isKeyQualityP (key,qual) ==
- --returns pair if found, else NIL
+ --returns pair if found, else nil
found := false
while not found and (qualPair := assoc(key,$specificMsgTags)) repeat
if rest qualPair = qual then found := true
@@ -508,7 +508,7 @@ makeLeaderMsg chPosList ==
st := strconc(st, _
rep(char ".", (posNum - oldPos - 1)),posLetter)
oldPos := posNum
- ['leader,$nopos,'nokey,NIL,NIL,[st]]
+ ['leader,$nopos,'nokey,nil,nil,[st]]
makeMsgFromLine line ==
posOfLine := getLinePos line
@@ -519,7 +519,7 @@ makeMsgFromLine line ==
stNum := STRINGIMAGE i
strconc(rep(char " ", ($preLength - 7 - # stNum)),_
stNum)
- ['line,posOfLine,NIL,NIL, strconc('"Line", localNumOfLine),_
+ ['line,posOfLine,nil,nil, strconc('"Line", localNumOfLine),_
textOfLine]
getMsgTag msg == ncTag msg
@@ -551,7 +551,7 @@ getMsgKey? msg == IDENTP (val := getMsgKey msg) => val
getMsgArgL msg == msg.3
getMsgPrefix? msg ==
- (pre := msg.4) = 'noPre => NIL
+ (pre := msg.4) = 'noPre => nil
pre
getMsgPrefix msg == msg.4
diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot
index d61a33a7..c2aae240 100644
--- a/src/interp/msgdb.boot
+++ b/src/interp/msgdb.boot
@@ -81,10 +81,10 @@ namespace BOOT
--% Message Database Code and Message Utility Functions
-$msgDatabase := NIL
+$msgDatabase := nil
$cacheMessages := 'T -- for debugging purposes
-$msgAlist := NIL
-$msgDatabaseName := NIL
+$msgAlist := nil
+$msgDatabaseName := nil
$testingErrorPrefix := '"Daly Bug"
$testingSystem := false
$MARG := 0
@@ -121,16 +121,16 @@ segmentKeyedMsg(msg) == string2Words msg
segmentedMsgPreprocess x ==
atom x => x
[head,:tail] := x
- center := rightJust := NIL
+ center := rightJust := nil
if member(head, '(%ceon "%ceon")) then center := true
if member(head, '(%rjon "%rjon")) then rightJust := true
center or rightJust =>
-- start collecting terms
- y := NIL
+ y := nil
ok := true
while tail and ok repeat
[t,:tail] := tail
- member(t, '(%ceoff "%ceoff" %rjoff "%rjoff")) => ok := NIL
+ member(t, '(%ceoff "%ceoff" %rjoff "%rjoff")) => ok := nil
y := [segmentedMsgPreprocess t,:y]
head1 := [(center => '"%ce"; '"%rj"),:reverse! y]
null tail => [head1]
@@ -144,7 +144,7 @@ removeAttributes msg ==
--takes a segmented message and returns it with the attributes
--separted.
first msg ~= '"%atbeg" =>
- [msg,NIL]
+ [msg,nil]
attList := []
until item = '"%atend" repeat
msg := rest msg
@@ -169,7 +169,7 @@ applyPrefix2String args ==
substituteSegmentedMsg(msg,args) ==
-- this does substitution of the parameters
- l := NIL
+ l := nil
nargs := #args
for x in segmentedMsgPreprocess msg repeat
-- x is a list
@@ -193,7 +193,7 @@ substituteSegmentedMsg(msg,args) ==
a <= nargs => args.(a-1)
'"???"
-- now pull out qualifiers
- q := NIL
+ q := nil
for i in 2..(n-1) repeat q := [stringChar(x,i),:q]
-- Note 'f processing must come first.
if char "f" in q then
@@ -294,16 +294,16 @@ cleanUpSegmentedMsg msg ==
-- takes a reversed msg and puts it in the correct order
atom msg => msg
blanks := ['" "," "]
- haveBlank := NIL
+ haveBlank := nil
prims :=
'(%b %d %l %i %u %m %ce %rj _
"%b" "%d" "%l" "%i" "%m" "%u" "%ce" "%rj")
- msg1 := NIL
+ msg1 := nil
for x in msg repeat
if haveBlank and (member(x,blanks) or member(x,prims)) then
msg1 := rest msg1
msg1 := [x,:msg1]
- haveBlank := (member(x,blanks) => true; NIL)
+ haveBlank := (member(x,blanks) => true; nil)
msg1
operationLink name ==
@@ -386,7 +386,7 @@ breakKeyedMsg(key,args) ==
handleLispBreakLoop($BreakMode)
keyedSystemError(key,args) ==
- sayKeyedMsg("S2GE0000",NIL)
+ sayKeyedMsg("S2GE0000",nil)
breakKeyedMsg(key,args)
systemErrorHere what ==
@@ -503,7 +503,7 @@ keyedMsgCompFailure(key,args) ==
not $useCoerceOrCroak => THROW('coerceOrCroaker, 'croaked)
if not($Coerce) and $reportInterpOnly then
sayKeyedMsg(key,args)
- sayKeyedMsg("S2IB0009",NIL)
+ sayKeyedMsg("S2IB0009",nil)
null $compilingMap => THROW('loopCompiler,'tryInterpOnly)
THROW('mapCompiler,'tryInterpOnly)
@@ -516,7 +516,7 @@ keyedMsgCompFailureSP(key,args,atree) ==
sayMSG '" "
srcPosDisplay(sp)
sayKeyedMsg(key,args)
- sayKeyedMsg("S2IB0009",NIL)
+ sayKeyedMsg("S2IB0009",nil)
null $compilingMap => THROW('loopCompiler,'tryInterpOnly)
THROW('mapCompiler,'tryInterpOnly)
@@ -553,18 +553,18 @@ sayString(x,out == $OutputStream) ==
spadStartUpMsgs() ==
-- messages displayed when the system starts up
- $LINELENGTH < 60 => NIL
+ $LINELENGTH < 60 => nil
bar := fillerSpaces($LINELENGTH,char specialChar 'hbar)
sayKeyedMsg("S2GL0001",[_*BUILD_-VERSION_*, _*YEARWEEK_*])
sayMSG bar
- sayKeyedMsg("S2GL0018C",NIL)
- sayKeyedMsg("S2GL0018D",NIL)
+ sayKeyedMsg("S2GL0018C",nil)
+ sayKeyedMsg("S2GL0018D",nil)
sayKeyedMsg("S2GL0003B",[$opSysName])
sayMSG bar
- $msgAlist := NIL -- these msgs need not be saved
+ $msgAlist := nil -- these msgs need not be saved
sayMSG " "
-HELP() == sayKeyedMsg("S2GL0019",NIL)
+HELP() == sayKeyedMsg("S2GL0019",nil)
version() == _*YEARWEEK_*
@@ -573,7 +573,7 @@ version() == _*YEARWEEK_*
brightPrint(x,out == $OutputStream) ==
$MARG : local := 0
for y in x repeat brightPrint0(y,out)
- NIL
+ nil
brightPrint0(x,out == $OutputStream) ==
$texFormatting => brightPrint0AsTeX(x,out)
@@ -654,7 +654,7 @@ brightPrint1(x, out == $OutputStream) ==
if member(x,'(%l "%l")) then sayNewLine(out)
else if string? x then sayString(x,out)
else brightPrintHighlight(x,out)
- NIL
+ nil
brightPrintHighlight(x, out == $OutputStream) ==
$texFormatting => brightPrintHighlightAsTeX(x,out)
@@ -722,11 +722,11 @@ brightPrintCenter(x,out == $OutputStream) ==
f := DIVIDE($LINELENGTH - wid,2)
x := [fillerSpaces(f.0,char " "),x]
for y in x repeat brightPrint0(y,out)
- NIL
- y := NIL
+ nil
+ y := nil
ok := true
while x and ok repeat
- if member(first(x),'(%l "%l")) then ok := NIL
+ if member(first(x),'(%l "%l")) then ok := nil
else y := [first x, :y]
x := rest x
y := reverse! y
@@ -738,7 +738,7 @@ brightPrintCenter(x,out == $OutputStream) ==
if x then
sayNewLine(out)
brightPrintCenter(x,out)
- NIL
+ nil
brightPrintCenterAsTeX(x, out == $OutputStream) ==
atom x =>
@@ -767,13 +767,13 @@ brightPrintRightJustify(x, out == $OutputStream) ==
wid < $LINELENGTH =>
x := [fillerSpaces($LINELENGTH-wid,char " "),x]
for y in x repeat brightPrint0(y,out)
- NIL
+ nil
brightPrint0(x,out)
- NIL
- y := NIL
+ nil
+ y := nil
ok := true
while x and ok repeat
- if member(first(x),'(%l "%l")) then ok := NIL
+ if member(first(x),'(%l "%l")) then ok := nil
else y := [first x, :y]
x := rest x
y := reverse! y
@@ -784,7 +784,7 @@ brightPrintRightJustify(x, out == $OutputStream) ==
if x then
sayNewLine(out)
brightPrintRightJustify(x,out)
- NIL
+ nil
--% Message Formatting Utilities
@@ -815,7 +815,7 @@ sayAsManyPerLineAsPossible l ==
-- w will be the field width in which we will display the elements
m > $LINELENGTH =>
for a in l repeat sayMSG a
- NIL
+ nil
w := MIN(m + 3,$LINELENGTH)
-- p is the number of elements per line
p := $LINELENGTH quo w
@@ -826,7 +826,7 @@ sayAsManyPerLineAsPossible l ==
str := strconc(str,c,fillerSpaces(w - #c,char " "))
(i+1) rem p = 0 => (sayMSG str ; str := '"" )
if str ~= '"" then sayMSG str
- NIL
+ nil
say2PerLine l == say2PerLineWidth(l, $LINELENGTH quo 2)
diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot
index d74329b4..1dc6f1ac 100644
--- a/src/interp/newfort.boot
+++ b/src/interp/newfort.boot
@@ -86,8 +86,8 @@ newFortranTempVar() ==
fortranCleanUp l ==
-- takes reversed list and cleans up a bit, putting it in
-- correct order
- oldTok := NIL
- m := NIL
+ oldTok := nil
+ m := nil
for e in l repeat
if not (oldTok = '"-" and e = '"+") then m := [e,:m]
oldTok := e
@@ -166,7 +166,7 @@ exp2FortOptimize e ==
-- 0 just extract arrays
-- 1 extract common subexpressions
-- 2 try to optimize computing of powers
- $exprStack : local := NIL
+ $exprStack : local := nil
atom e => [e]
$fortranOptimizationLevel = 0 =>
e1 := exp2FortOptimizeArray e
@@ -179,10 +179,10 @@ exp2FortOptimize e ==
exp2FortOptimizeCS e ==
- $fortCsList : local := NIL
+ $fortCsList : local := nil
$fortCsHash : local := hashTable 'EQ
- $fortCsExprStack : local := NIL
- $fortCsFuncStack : local := NIL
+ $fortCsExprStack : local := nil
+ $fortCsFuncStack : local := nil
f := exp2FortOptimizeCS1 e
reverse! [f,:$fortCsList]
@@ -232,12 +232,12 @@ exp2FortOptimizeCS1 e ==
$fortCsFuncStack := rest $fortCsFuncStack
$fortCsExprStack := rest $fortCsExprStack
g := rest f
- -- check to see of we have an non-NIL atomic CDR
+ -- check to see of we have an non-nil atomic CDR
g and atom g =>
pushCsStacks(f,'CDR)
f.rest := exp2FortOptimizeCS1 g
popCsStacks(0)
- f := NIL
+ f := nil
f := g
object2Identifier first e in '(ROW AGGLST) => e
@@ -245,7 +245,7 @@ exp2FortOptimizeCS1 e ==
-- see if we have already seen this expression
n := HGET($fortCsHash,e)
null n =>
- n := VECTOR(1,NIL,$fortCsExprStack,$fortCsFuncStack)
+ n := VECTOR(1,nil,$fortCsExprStack,$fortCsFuncStack)
HPUT($fortCsHash,e,n)
e
beenHere(e,n)
@@ -268,7 +268,7 @@ exp2FortOptimizeArray e ==
op1 = 'MATRIX =>
-- var := newFortranTempVar()
var := $fortName
- -- args looks like [NIL,[ROW,...],[ROW,...]]
+ -- args looks like [nil,[ROW,...],[ROW,...]]
$exprStack := [[op,var,:exp2FortOptimizeArray args],:$exprStack]
var
[exp2FortOptimizeArray op,:exp2FortOptimizeArray args]
@@ -283,8 +283,8 @@ fortran2Lines f ==
-- collect strings up to first %l or end of list. Then feed to
-- fortran2Lines1.
- fs := NIL
- lines := NIL
+ fs := nil
+ lines := nil
while f repeat
while f and (ff := first(f)) ~= '"%l" repeat
fs := [ff,:fs]
@@ -299,7 +299,7 @@ fortran2Lines1 f ==
-- return: a reverse list of FORTRAN lines
normPref := makeString $fortIndent
contPref := strconc(" &",makeString($fortIndent-6))
- lines := NIL
+ lines := nil
ll := $fortIndent
while f repeat
ok := true
@@ -357,7 +357,7 @@ fortexp0 x ==
f := expression2Fortran x
p := position('"%l",f)
p < 0 => f
- l := NIL
+ l := nil
while p < 0 repeat
[t,:f] := f
l := [t,:l]
@@ -467,13 +467,13 @@ exp2FortSpecial(op,args,nargs) ==
$exprStack := [["=",[var,object2String i],fortPre1(e)],:$exprStack]
fortError1 [op,:args]
op in ["CONCAT","CONCATB"] =>
- nargs = 0 => NIL
+ nargs = 0 => nil
nargs = 1 => fortPre1 first args
nargs = 2 and member(second args, ["!",'"!"]) =>
mkFortFn("FACTORIAL",[first args],1)
fortError1 [op,:args]
member(op, ['"MATRIX","MATRIX"]) =>
- args is [var, =NIL,:rows] =>
+ args is [var, =nil,:rows] =>
var := object2String var
nrows := #rows - 1
ncols := #(rest first rows) - 1
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 24978fbf..f176beee 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -571,7 +571,7 @@ NRTcheckVector domainShell ==
for i in $NRTbase..maxIndex domainShell repeat
--Vector elements can be one of
-- (a) T -- item was marked
--- (b) NIL -- ???
+-- (b) nil -- ???
-- (c) categoryForm-- it was a domain view; now irrelevant
-- (d) op-signature-- store missing function info in $CheckVectorList
v := vectorRef(domainShell,i)
@@ -624,9 +624,9 @@ NRTsetVector4a(sig,form,cond) ==
NRTmakeSlot1Info() ==
-- 4 cases:
-- a:T == b add c --- slot1 directory has #s for entries defined in c
--- a:T == b --- slot1 has all slot #s = NIL (see compFunctorBody)
+-- a:T == b --- slot1 has all slot #s = nil (see compFunctorBody)
-- a == b add c --- not allowed (line 7 of getTargetFromRhs)
--- a == b --- $NRTderivedTargetIfTrue = true; set directory to NIL
+-- a == b --- $NRTderivedTargetIfTrue = true; set directory to nil
pairlis :=
$insideCategoryPackageIfTrue =>
[:argl,dollarName] := rest $form
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index 3b6952f8..e5dff431 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -670,22 +670,22 @@ newHasTest(domform,catOrAtt) ==
-- atom (infovec := getInfovec opOf domform) => fn(domform,catOrAtt) where
fn(a,b) ==
categoryForm?(a) => assoc(b, ancestorsOf(a, nil))
- isPartialMode a => throwKeyedMsg("S2IS0025",NIL)
+ isPartialMode a => throwKeyedMsg("S2IS0025",nil)
b is ["SIGNATURE",:opSig] =>
HasSignature(evalDomain a,opSig)
b is ["ATTRIBUTE",attr] => HasAttribute(evalDomain a,attr)
- hasCaty(a,b,NIL) isnt 'failed
+ hasCaty(a,b,nil) isnt 'failed
HasCategory(evalDomain a,b) => true -- for asharp domains: must return Boolean
op := opOf catOrAtt
isAtom := atom catOrAtt
not isAtom and op is 'Join =>
and/[newHasTest(domform,x) for x in rest catOrAtt]
-- we will refuse to say yes for 'Cat has Cat'
---getConstructorKindFromDB opOf domform = "category" => throwKeyedMsg("S2IS0025",NIL)
+--getConstructorKindFromDB opOf domform = "category" => throwKeyedMsg("S2IS0025",nil)
-- on second thoughts we won't!
categoryForm? domform =>
domform = catOrAtt => 'T
- for [aCat,:cond] in [:ancestorsOf(domform,NIL),:applySubst(pairList($FormalMapVariableList,rest domform),getConstructorAttributesFromDB(opOf domform))] | aCat = catOrAtt repeat
+ for [aCat,:cond] in [:ancestorsOf(domform,nil),:applySubst(pairList($FormalMapVariableList,rest domform),getConstructorAttributesFromDB(opOf domform))] | aCat = catOrAtt repeat
return evalCond cond where
evalCond x ==
atom x => x
diff --git a/src/interp/pathname.boot b/src/interp/pathname.boot
index 8df91968..e5c9c8f3 100644
--- a/src/interp/pathname.boot
+++ b/src/interp/pathname.boot
@@ -114,32 +114,32 @@ newMKINFILENAM(infile) ==
nfile := file
if fn = '"*" or fn = '"NIL" then sayKeyedMsg("S2IL0016",NIL)
else sayKeyedMsg("S2IL0003",[namestring file])
- ans := queryUserKeyedMsg("S2IL0017",NIL)
+ ans := queryUserKeyedMsg("S2IL0017",nil)
if (#(ans) > 0) and ('")" = subString(ans,0,1)) then n := 2
else n := 1
nfn := stringUpcase STRING2ID_-N(ans,n)
(nfn = 0) or (nfn = 'QUIT) =>
- sayKeyedMsg("S2IL0018",NIL)
- THROW('FILENAM,NIL)
+ sayKeyedMsg("S2IL0018",nil)
+ THROW('FILENAM,nil)
nfn = 'CREATE => return 'fromThisLoop
file := pathname ans
return 'fromThisLoop
if nfile then pathname nfile
- else NIL
+ else nil
getFunctionSourceFile fun ==
- null (f := getFunctionSourceFile1 fun) => NIL
+ null (f := getFunctionSourceFile1 fun) => nil
if MAKE_-INPUT_-FILENAME(f) then updateSourceFiles f
f
getFunctionSourceFile1 fun ==
- -- returns NIL or [fn,ft,fm]
+ -- returns nil or [fn,ft,fm]
(file := KDR GETL(fun,'DEFLOC)) => pathname file
null ((fileinfo := FUNLOC fun) or
(fileinfo := FUNLOC unabbrev fun)) =>
u := bootFind fun => getFunctionSourceFile1 SETQ($FUNCTION,INTERN u)
- NIL
+ nil
3 = #fileinfo =>
[fn,ft,$FUNCTION] := fileinfo
newMKINFILENAM pathname [fn,ft]
diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot
index bc519adf..3b8d9ec8 100644
--- a/src/interp/postpar.boot
+++ b/src/interp/postpar.boot
@@ -257,7 +257,7 @@ postMDef(t) ==
[.,lhs,rhs] := t
$InteractiveMode =>
lhs := postTran lhs
- not IDENTP lhs => throwKeyedMsg("S2IP0001",NIL)
+ not IDENTP lhs => throwKeyedMsg("S2IP0001",nil)
["MDEF",lhs,nil,nil,postTran rhs]
lhs:= postTran lhs
[form,targetType]:=
diff --git a/src/interp/preparse.lisp b/src/interp/preparse.lisp
index 059caf40..dcab95f1 100644
--- a/src/interp/preparse.lisp
+++ b/src/interp/preparse.lisp
@@ -98,7 +98,7 @@
(defun PREPARSE (Strm &aux (stack ()))
(SETQ $COMBLOCKLIST NIL $skipme NIL)
(when $preparse-last-line
- (if (pairp $preparse-last-line)
+ (if (consp $preparse-last-line)
(setq stack $preparse-last-line)
(push $preparse-last-line stack))
(setq $INDEX (- $INDEX (length stack))))
@@ -123,8 +123,8 @@
(COND ((NULL LINES) (RETURN NIL))
(NCOMBLOCK
(FINCOMBLOCK NIL NUMS LOCS NCOMBLOCK NIL)))
- (RETURN (PAIR (|reverse!| NUMS)
- (PARSEPILES (|reverse!| LOCS) (|reverse!| LINES))))))
+ (RETURN (|pairList| (|reverse!| NUMS)
+ (PARSEPILES (|reverse!| LOCS) (|reverse!| LINES))))))
(cond ((and (NULL LINES) (> (LENGTH A) 0) (EQ (CHAR A 0) #\) ))
; this is a command line, don't parse it
(PREPARSE-ECHO LineList)
@@ -185,7 +185,7 @@
(IF (NOT (IS-CONSOLE in-stream))
(setq $preparse-last-line
(|reverse!| $echolinestack)))
- (RETURN (PAIR (|reverse!| NUMS)
+ (RETURN (|pairList| (|reverse!| NUMS)
(PARSEPILES (|reverse!| LOCS) (|reverse!| LINES)))))
(cond ((> PARENLEV 0) (PUSH NIL LOCS) (setq SLOC PSLOC) (GO REREAD)))
(COND (NCOMBLOCK
@@ -198,7 +198,7 @@
(setq PARENLEV (+ PARENLEV PCOUNT))
(when (and (is-console in-stream) (not continue))
(setq $preparse-last-line nil)
- (RETURN (PAIR (|reverse!| NUMS)
+ (RETURN (|pairList| (|reverse!| NUMS)
(PARSEPILES (|reverse!| LOCS) (|reverse!| LINES)))))
(GO READLOOP)))
diff --git a/src/interp/scan.boot b/src/interp/scan.boot
index 8dcfc387..64b8c4af 100644
--- a/src/interp/scan.boot
+++ b/src/interp/scan.boot
@@ -479,7 +479,7 @@ scanTransform x ==
--scanLetter x==
-- if not char? x
-- then false
--- else STRPOSL(scanTrTable,x,0,NIL)
+-- else STRPOSL(scanTrTable,x,0,nil)
posend(line,n)==
while n<#line and idChar? line.n repeat
diff --git a/src/interp/server.boot b/src/interp/server.boot
index dff51876..6e73a06a 100644
--- a/src/interp/server.boot
+++ b/src/interp/server.boot
@@ -52,7 +52,7 @@ serverReadLine(stream) ==
not $SpadServer or not IS_-CONSOLE stream =>
read_-line(stream)
IN_-STREAM: fluid := stream
- _*EOF_*: fluid := NIL
+ _*EOF_*: fluid := nil
line :=
while not $EndServerSession and not _*EOF_* repeat
if $NeedToSignalSessionManager then
@@ -153,11 +153,11 @@ parseAndEvalStr string ==
parseAndEvalStr1 string ==
string.0 = char ")" =>
doSystemCommand subSequence(string, 1)
- processInteractive(ncParseFromString string, NIL)
+ processInteractive(ncParseFromString string, nil)
protectedEVAL x ==
error := true
- val := NIL
+ val := nil
try
val := eval x
error := false
diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot
index c2c2f563..11268652 100644
--- a/src/interp/setvars.boot
+++ b/src/interp/setvars.boot
@@ -138,22 +138,22 @@ resetWorkspaceVariables() ==
-- this replaces def in DEBUG LISP
-- this function resets many workspace variables to their default
-- values. Some things are reset by start and not reset by restart.
- SETQ(_/COUNTLIST , NIL)
- SETQ(_/EDITFILE , NIL)
- SETQ(_/SOURCEFILES , NIL)
- SETQ($sourceFiles , NIL)
- SETQ(_/PRETTY , NIL)
- SETQ(_/SPACELIST , NIL)
- SETQ(_/TIMERLIST , NIL)
+ SETQ(_/COUNTLIST , nil)
+ SETQ(_/EDITFILE , nil)
+ SETQ(_/SOURCEFILES , nil)
+ SETQ($sourceFiles , nil)
+ SETQ(_/PRETTY , nil)
+ SETQ(_/SPACELIST , nil)
+ SETQ(_/TIMERLIST , nil)
SETQ($existingFiles , hashTable 'EQUAL)
- SETQ($functionTable , NIL)
- SETQ($echoLineStack , NIL)
- SETQ($slamFlag , NIL)
+ SETQ($functionTable , nil)
+ SETQ($echoLineStack , nil)
+ SETQ($slamFlag , nil)
SETQ($CommandSynonymAlist , COPY($InitialCommandSynonymAlist))
- SETQ($UserAbbreviationsAlist , NIL)
- SETQ($msgAlist , NIL)
- SETQ($msgDatabase , NIL)
- SETQ($msgDatabaseName , NIL)
+ SETQ($UserAbbreviationsAlist , nil)
+ SETQ($msgAlist , nil)
+ SETQ($msgDatabase , nil)
+ SETQ($msgDatabaseName , nil)
SETQ($IOindex , 1 )
SETQ($e , $EmptyEnvironment)
SETQ($env , [[nil]])
@@ -211,7 +211,7 @@ set1(l,setTree) ==
else sayMSG '" Function not implemented."
-- if so set, then show option information
if $displaySetValue then displaySetOptionInformation(arg,setData)
- NIL
+ nil
st = 'STRING =>
arg2 := l.1
@@ -221,7 +221,7 @@ set1(l,setTree) ==
-- if so set or not a valid choice, then show option information
if $displaySetValue or (null arg2) then
displaySetOptionInformation(arg,setData)
- NIL
+ nil
st = 'INTEGER =>
-- validate the option, allowing the user to set the default
@@ -238,7 +238,7 @@ set1(l,setTree) ==
displaySetOptionInformation(arg,setData)
null arg2 => sayMessage ['" Your value",:bright object2String l.1,
'"is not among the valid choices."]
- NIL
+ nil
st = 'LITERALS =>
-- validate the option, allowing the user to set the default
@@ -257,14 +257,14 @@ set1(l,setTree) ==
displaySetOptionInformation(arg,setData)
null arg2 => sayMessage ['" Your value",:bright object2String l.1,
'"is not among the valid choices."]
- NIL
+ nil
-- for a sub-tree, we must recurse
st = 'TREE =>
set1(KDR l,setData.setLeaf)
- NIL
+ nil
sayMessage ['"Cannot handle set tree node type",:bright st,"yet"]
- NIL
+ nil
displaySetOptionInformation(arg,setData) ==
@@ -401,7 +401,7 @@ setInputLibrary arg ==
arg is [act, filename] and (act := selectOptionLC(act,'(add drop),nil)) =>
act = 'add => addInputLibrary TRUENAME STRINGIMAGE filename
act = 'drop => dropInputLibrary TRUENAME STRINGIMAGE filename
- setInputLibrary NIL
+ setInputLibrary nil
setOutputLibrary arg ==
@@ -486,12 +486,12 @@ setExpose arg ==
sayKeyedMsg("S2IZ0049D",[namestring pathname ["INTERP","EXPOSED"]])
arg is [fn,:fnargs] and (fn := selectOptionLC(fn,
- '(add drop initialize),NIL)) =>
+ '(add drop initialize),nil)) =>
fn = 'add => setExposeAdd fnargs
fn = 'drop => setExposeDrop fnargs
fn = 'initialize => setExpose "%initialize%"
- NIL
- setExpose NIL
+ nil
+ setExpose nil
setExposeAdd arg ==
@@ -503,13 +503,13 @@ setExposeAdd arg ==
sayMSG '" "
displayExposedConstructors()
sayMSG '" "
- sayKeyedMsg("S2IZ0049E",NIL)
+ sayKeyedMsg("S2IZ0049E",nil)
arg is [fn,:fnargs] and (fn := selectOptionLC(fn,
- '(group constructor),NIL)) =>
+ '(group constructor),nil)) =>
fn = 'group => setExposeAddGroup fnargs
fn = 'constructor => setExposeAddConstr fnargs
- NIL
- setExposeAdd NIL
+ nil
+ setExposeAdd nil
setExposeAddGroup arg ==
@@ -526,8 +526,8 @@ setExposeAddGroup arg ==
if cons? x then x := first x
x = 'all =>
$localExposureData.0 :=[first x for x in $globalExposureGroupAlist]
- $localExposureData.1 :=NIL
- $localExposureData.2 :=NIL
+ $localExposureData.1 :=nil
+ $localExposureData.2 :=nil
displayExposedGroups()
sayMSG '" "
displayExposedConstructors()
@@ -571,27 +571,27 @@ setExposeDrop arg ==
-- give msg about explicitly hidden constructors
displayHiddenConstructors()
sayMSG '" "
- sayKeyedMsg("S2IZ0049F",NIL)
+ sayKeyedMsg("S2IZ0049F",nil)
arg is [fn,:fnargs] and (fn := selectOptionLC(fn,
- '(group constructor),NIL)) =>
+ '(group constructor),nil)) =>
fn = 'group => setExposeDropGroup fnargs
fn = 'constructor => setExposeDropConstr fnargs
- NIL
- setExposeDrop NIL
+ nil
+ setExposeDrop nil
setExposeDropGroup arg ==
(null arg) =>
centerAndHighlight ("The group Option",$LINELENGTH,specialChar 'hbar)
- sayKeyedMsg("S2IZ0049L",NIL)
+ sayKeyedMsg("S2IZ0049L",nil)
sayMSG '" "
displayExposedGroups()
for x in arg repeat
if cons? x then x := first x
x = 'all =>
- $localExposureData.0 := NIL
- $localExposureData.1 := NIL
- $localExposureData.2 := NIL
+ $localExposureData.0 := nil
+ $localExposureData.1 := nil
+ $localExposureData.2 := nil
displayExposedGroups()
sayMSG '" "
displayExposedConstructors()
@@ -611,7 +611,7 @@ setExposeDropConstr arg ==
(null arg) =>
centerAndHighlight ("The constructor Option",$LINELENGTH,
specialChar 'hbar)
- sayKeyedMsg("S2IZ0049N",NIL)
+ sayKeyedMsg("S2IZ0049N",nil)
sayMSG '" "
displayExposedConstructors()
sayMSG '" "
@@ -666,7 +666,7 @@ setFortTmpDir arg ==
validateOutputDirectory x ==
AND(PATHNAME_-DIRECTORY(PROBE_-FILE(first(x))), NOT PATHNAME_-NAME (PROBE_-FILE(first(x)))) =>
first(x)
- NIL
+ nil
describeSetFortTmpDir() ==
@@ -751,10 +751,10 @@ describeSetLinkerArgs() ==
setFunctionsCache arg ==
- $options : local := NIL
+ $options : local := nil
arg = "%initialize%" =>
$cacheCount := 0
- $cacheAlist := NIL
+ $cacheAlist := nil
arg = "%display%" =>
null $cacheAlist => object2String $cacheCount
'"..."
@@ -867,7 +867,7 @@ setHistory arg ==
(fn := DOWNCASE(fn)) in '(y n ye yes no on of off) =>
$options := [[fn]]
historySpad2Cmd()
- setHistory NIL
+ setHistory nil
--
-- See the section kernel in setvart.boot
@@ -996,7 +996,7 @@ setOutputAlgebra arg ==
arg is [fn] =>
UPCASE(fn) in '(Y N YE O OF) =>
sayKeyedMsg("S2IV0002",'(algebra algebra))
- UPCASE(fn) in '(NO OFF) => $algebraFormat := NIL
+ UPCASE(fn) in '(NO OFF) => $algebraFormat := nil
UPCASE(fn) in '(YES ON) => $algebraFormat := true
UPCASE(fn) = 'CONSOLE =>
SHUT $algebraOutputStream
@@ -1020,7 +1020,7 @@ setOutputAlgebra arg ==
$verbose and sayKeyedMsg("S2IV0004",['"Algebra",$algebraOutputFile])
sayKeyedMsg("S2IV0003",[fn,ft,fm])
- sayKeyedMsg("S2IV0005",NIL)
+ sayKeyedMsg("S2IV0005",nil)
describeSetOutputAlgebra()
@@ -1107,7 +1107,7 @@ setOutputCharacters arg ==
sayBrightly '" The current setting is indicated within the list. This option determines "
sayBrightly '" the special characters used for algebraic output. This is what the"
sayBrightly '" current choice of special characters looks like:"
- l := NIL
+ l := nil
for [char,:.] in $specialCharacterAlist repeat
s := strconc('" ",PNAME char,'" is shown as ",
PNAME specialChar(char))
@@ -1117,8 +1117,8 @@ setOutputCharacters arg ==
arg is [fn] and (fn := DOWNCASE(fn)) =>
fn = 'default => $specialCharacters := $RTspecialCharacters
fn = 'plain => $specialCharacters := $plainRTspecialCharacters
- setOutputCharacters NIL
- setOutputCharacters NIL
+ setOutputCharacters nil
+ setOutputCharacters nil
-- See the subsection output fortran in setvart.boot
--
@@ -1166,7 +1166,7 @@ setOutputFortran arg ==
$fortranOutputStream :=
DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
$fortranOutputFile := '"CONSOLE"
- $fortranFormat := NIL
+ $fortranFormat := nil
arg = "%display%" =>
if $fortranFormat then label := '"On:" else label := '"Off:"
@@ -1177,8 +1177,8 @@ setOutputFortran arg ==
-- try to figure out what the argument is
- append := NIL
- quiet := NIL
+ append := nil
+ quiet := nil
while LISTP arg and UPCASE(first arg) in '(APPEND QUIET) repeat
if UPCASE first(arg) = 'APPEND then append := true
else if UPCASE first(arg) = 'QUIET then quiet := true
@@ -1192,7 +1192,7 @@ setOutputFortran arg ==
arg is [fn] =>
UPCASE(fn) in '(Y N YE O OF) =>
sayKeyedMsg("S2IV0002",'(FORTRAN fortran))
- UPCASE(fn) in '(NO OFF) => $fortranFormat := NIL
+ UPCASE(fn) in '(NO OFF) => $fortranFormat := nil
UPCASE(fn) in '(YES ON) => $fortranFormat := true
UPCASE(fn) = 'CONSOLE =>
SHUT $fortranOutputStream
@@ -1214,7 +1214,7 @@ setOutputFortran arg ==
$fortranOutputFile := object2String filename
if null quiet then sayKeyedMsg("S2IV0004",['FORTRAN,$fortranOutputFile])
if null quiet then sayKeyedMsg("S2IV0003",[fn,ft,fm])
- if null quiet then sayKeyedMsg("S2IV0005",NIL)
+ if null quiet then sayKeyedMsg("S2IV0005",nil)
describeSetOutputFortran()
@@ -1284,7 +1284,7 @@ setOutputMathml arg ==
$mathmlOutputStream :=
DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
$mathmlOutputFile := '"CONSOLE"
- $mathmlFormat := NIL
+ $mathmlFormat := nil
arg = "%display%" =>
if $mathmlFormat then label := '"On:" else label := '"Off:"
@@ -1303,7 +1303,7 @@ setOutputMathml arg ==
arg is [fn] =>
UPCASE(fn) in '(Y N YE O OF) =>
sayKeyedMsg("S2IV0002",'(MathML mathml))
- UPCASE(fn) in '(NO OFF) => $mathmlFormat := NIL
+ UPCASE(fn) in '(NO OFF) => $mathmlFormat := nil
UPCASE(fn) in '(YES ON) => $mathmlFormat := true
UPCASE(fn) = 'CONSOLE =>
SHUT $mathmlOutputStream
@@ -1326,7 +1326,7 @@ setOutputMathml arg ==
sayKeyedMsg("S2IV0004",['"MathML",$mathmlOutputFile])
sayKeyedMsg("S2IV0003",[fn,ft,fm])
- sayKeyedMsg("S2IV0005",NIL)
+ sayKeyedMsg("S2IV0005",nil)
describeSetOutputMathml()
describeSetOutputMathml() ==
@@ -1393,7 +1393,7 @@ setOutputOpenMath arg ==
$openMathOutputStream :=
DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
$openMathOutputFile := '"CONSOLE"
- $openMathFormat := NIL
+ $openMathFormat := nil
arg = "%display%" =>
if $openMathFormat then label := '"On:" else label := '"Off:"
@@ -1412,7 +1412,7 @@ setOutputOpenMath arg ==
arg is [fn] =>
UPCASE(fn) in '(Y N YE O OF) =>
sayKeyedMsg("S2IV0002",'(OpenMath openmath))
- UPCASE(fn) in '(NO OFF) => $openMathFormat := NIL
+ UPCASE(fn) in '(NO OFF) => $openMathFormat := nil
UPCASE(fn) in '(YES ON) => $openMathFormat := true
UPCASE(fn) = 'CONSOLE =>
SHUT $openMathOutputStream
@@ -1435,7 +1435,7 @@ setOutputOpenMath arg ==
sayKeyedMsg("S2IV0004",['"OpenMath",$openMathOutputFile])
sayKeyedMsg("S2IV0003",[fn,ft,fm])
- sayKeyedMsg("S2IV0005",NIL)
+ sayKeyedMsg("S2IV0005",nil)
describeSetOutputOpenMath()
@@ -1505,7 +1505,7 @@ setOutputFormula arg ==
$formulaOutputStream :=
DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
$formulaOutputFile := '"CONSOLE"
- $formulaFormat := NIL
+ $formulaFormat := nil
arg = "%display%" =>
if $formulaFormat then label := '"On:" else label := '"Off:"
@@ -1524,7 +1524,7 @@ setOutputFormula arg ==
arg is [fn] =>
UPCASE(fn) in '(Y N YE O OF) =>
sayKeyedMsg("S2IV0002",'(script script))
- UPCASE(fn) in '(NO OFF) => $formulaFormat := NIL
+ UPCASE(fn) in '(NO OFF) => $formulaFormat := nil
UPCASE(fn) in '(YES ON) => $formulaFormat := true
UPCASE(fn) = 'CONSOLE =>
SHUT $formulaOutputStream
@@ -1547,7 +1547,7 @@ setOutputFormula arg ==
sayKeyedMsg("S2IV0004",['"IBM Script formula",$formulaOutputFile])
sayKeyedMsg("S2IV0003",[fn,ft,fm])
- sayKeyedMsg("S2IV0005",NIL)
+ sayKeyedMsg("S2IV0005",nil)
describeSetOutputFormula()
@@ -1616,7 +1616,7 @@ setOutputTex arg ==
$texOutputStream :=
DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
$texOutputFile := '"CONSOLE"
- $texFormat := NIL
+ $texFormat := nil
arg = "%display%" =>
if $texFormat then label := '"On:" else label := '"Off:"
@@ -1635,7 +1635,7 @@ setOutputTex arg ==
arg is [fn] =>
UPCASE(fn) in '(Y N YE O OF) =>
sayKeyedMsg("S2IV0002",'(TeX tex))
- UPCASE(fn) in '(NO OFF) => $texFormat := NIL
+ UPCASE(fn) in '(NO OFF) => $texFormat := nil
UPCASE(fn) in '(YES ON) => $texFormat := true
UPCASE(fn) = 'CONSOLE =>
SHUT $texOutputStream
@@ -1658,7 +1658,7 @@ setOutputTex arg ==
sayKeyedMsg("S2IV0004",['"TeX",$texOutputFile])
sayKeyedMsg("S2IV0003",[fn,ft,fm])
- sayKeyedMsg("S2IV0005",NIL)
+ sayKeyedMsg("S2IV0005",nil)
describeSetOutputTex()
diff --git a/src/interp/setvart.boot b/src/interp/setvart.boot
index 27e06408..0b1ff0d0 100644
--- a/src/interp/setvart.boot
+++ b/src/interp/setvart.boot
@@ -1735,7 +1735,7 @@ $setOptions := '(
)
--%
-$reportCoerceIfTrue := NIL
+$reportCoerceIfTrue := nil
--%
printLoadMessages u ==
diff --git a/src/interp/simpbool.boot b/src/interp/simpbool.boot
index 6c3295c1..9c088079 100644
--- a/src/interp/simpbool.boot
+++ b/src/interp/simpbool.boot
@@ -84,7 +84,7 @@ dnf2pf(x) ==
be x == b2dnf x
b2dnf x ==
x = 'T => 'true
- x = NIL => 'false
+ x = nil => 'false
atom x => bassert x
[op,:argl] := x
op in '(AND and) => band argl
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index 90c733c4..0fe99878 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -51,7 +51,7 @@ isRecurrenceRelation(op,body,minivectorName) ==
-- gives k boundary values, one general term plus possibly an
-- "out of domain" condition
--pcl is [:.,[ ''T,:mess]] and not (CONTAINED('throwMessage,mess) or
- -- CONTAINED('throwKeyedMsg,mess)) => NIL
+ -- CONTAINED('throwKeyedMsg,mess)) => nil
pcl := [x for x in pcl | not (x is ['%otherwise,:mess] and
(CONTAINED('throwMessage,mess) or
CONTAINED('throwKeyedMsg,mess)))]
@@ -398,7 +398,7 @@ reallyClearLocalModemaps x ==
clearCache x ==
get(x,'localModemap,$e) or get(x,'mapBody,$e) =>
for [map,:sub] in $mapSubNameAlist repeat
- map=x => _/UNTRACE_,2(sub,NIL)
+ map=x => _/UNTRACE_,2(sub,nil)
$e := reallyClearLocalModemaps x
$e:= putHist(x,'mapBody,nil,$e)
$e:= putHist(x,'localVars,nil,$e)
@@ -407,14 +407,14 @@ clearCache x ==
clearLocalModemaps x ==
u := get(x,"localModemap",$e) =>
for sub in ASSOCRIGHT $mapSubNameAlist repeat
- _/UNTRACE_,2(sub,NIL)
+ _/UNTRACE_,2(sub,nil)
$e:= reallyClearLocalModemaps x
for mm in u repeat
[.,fn,:.] := mm
if def:= get(fn,'definition,$e) then
$e:= putHist(x,'value,objNew(def,$EmptyMode),$e)
if cacheVec:= get(fn,'cacheInfo,$e) then
- setDynamicBinding(cacheVec.cacheName,NIL)
+ setDynamicBinding(cacheVec.cacheName,nil)
-- now clear the property list of the identifier
$e := addIntSymTabBinding(x,nil,$e)
sayKeyedMsg("S2IX0007",[x])
diff --git a/src/interp/sys-macros.lisp b/src/interp/sys-macros.lisp
index ae42eeb2..511872c3 100644
--- a/src/interp/sys-macros.lisp
+++ b/src/interp/sys-macros.lisp
@@ -1090,21 +1090,21 @@
((ATOM VL)
(GO BADO)))
G180
- (AND (NOT (PAIRP (SETQ V (CAR VL))))
+ (AND (NOT (CONSP (SETQ V (CAR VL))))
(SETQ V (LIST V)))
(AND (NOT (IDENTP (CAR V)))
(GO BADO))
(PUSH (CAR V) VARS)
- (PUSH (COND ((PAIRP (CDR V)) (CADR V))) INITS)
- (AND (PAIRP (CDR V))
- (PAIRP (CDDR V))
+ (PUSH (COND ((CONSP (CDR V)) (CADR V))) INITS)
+ (AND (CONSP (CDR V))
+ (CONSP (CDDR V))
(SEQ (PUSH (CAR V) U-VARS)
(PUSH (CADDR V) U-VALS)))
- (AND (PAIRP (progn (POP VL) VL))
+ (AND (CONSP (progn (POP VL) VL))
(GO G180))
TG5
(setq exitforms (POP L))
- (and (PAIRP EXITFORMS)
+ (and (CONSP EXITFORMS)
(progn
(setq endtest (POP EXITFORMS))
exitforms)))))
diff --git a/src/interp/termrw.boot b/src/interp/termrw.boot
index cc1a4493..235bbd88 100644
--- a/src/interp/termrw.boot
+++ b/src/interp/termrw.boot
@@ -56,7 +56,7 @@ term1RW(t,R) ==
-- tries to reduce t at the top node
[vars,:varRules]:= R
for r in varRules until not (SL='failed) repeat
- SL:= termMatch(first r,t,NIL,vars)
+ SL:= termMatch(first r,t,nil,vars)
not (SL='failed) =>
t:= subCopy(copy rest r,SL)
t
@@ -65,7 +65,7 @@ term1RWall(t,R) ==
-- same as term1RW, but returns a list
[vars,:varRules]:= R
[not (SL='failed) and subCopy(copy rest r,SL) for r in varRules |
- not sameObject?(SL:= termMatch(first r,t,NIL,vars),'failed)]
+ not sameObject?(SL:= termMatch(first r,t,nil,vars),'failed)]
termMatch(tp,t,SL,vars) ==
-- t is a term pattern, t a term
@@ -90,9 +90,9 @@ termMatch(tp,t,SL,vars) ==
-- isContained(v,t) ==
-- -- tests (by EQ), whether v occurs in term t
--- -- v must not be NIL
+-- -- v must not be nil
-- sameObject?(v,t) => 'T
--- atom t => NIL
+-- atom t => nil
-- isContained(v,first t) or isContained(v,rest t)
augmentSub(v,t,SL) ==
@@ -115,7 +115,7 @@ mergeSubs(S1,S2) ==
subCopy(t,SL) ==
-- t is any LISP structure, SL a substitution list for sharp variables
-- then t is substituted and copied if necessary
- SL=NIL => t
+ SL=nil => t
subCopy0(t,SL)
subCopy0(t, SL) ==
@@ -123,21 +123,21 @@ subCopy0(t, SL) ==
t
subCopyOrNil(t,SL) ==
- -- the same as subCopy, but the result is NIL if nothing was copied
+ -- the same as subCopy, but the result is nil if nothing was copied
p:= ASSOC(t,SL) => p
- atom t => NIL
+ atom t => nil
[t1,:t2]:= t
t0:= subCopyOrNil(t1,SL) =>
t2 => [t, :[rest t0,:subCopy0(t2,SL)]]
[t,:[rest t0,:t2]]
t2 and ( t0:= subCopyOrNil(t2,SL) ) => [t, :[t1,:rest t0]]
- NIL
+ nil
deepSubCopy(t,SL) ==
-- t is any LISP structure, SL a substitution list for sharp variables
-- then t is substituted and copied if necessary
- SL=NIL => t
+ SL=nil => t
deepSubCopy0(t,SL)
deepSubCopy0(t, SL) ==
@@ -145,9 +145,9 @@ deepSubCopy0(t, SL) ==
t
deepSubCopyOrNil(t,SL) ==
- -- the same as subCopy, but the result is NIL if nothing was copied
+ -- the same as subCopy, but the result is nil if nothing was copied
p:= ASSOC(t,SL) => [t,:deepSubCopy0(rest p, SL)]
- atom t => NIL
+ atom t => nil
[t1,:t2]:= t
t0:= deepSubCopyOrNil(t1,SL) =>
t2 => [t, :[rest t0,:deepSubCopy0(t2,SL)]]
diff --git a/src/interp/trace.boot b/src/interp/trace.boot
index 8ab48789..8228a432 100644
--- a/src/interp/trace.boot
+++ b/src/interp/trace.boot
@@ -40,13 +40,13 @@ namespace BOOT
-- This code supports the )trace system command and allows the
-- tracing of LISP, BOOT and SPAD functions and interpreter maps.
-$traceNoisely := NIL -- give trace and untrace messages
+$traceNoisely := nil -- give trace and untrace messages
-$reportSpadTrace := NIL -- reports traced funs
+$reportSpadTrace := nil -- reports traced funs
-$optionAlist := NIL
+$optionAlist := nil
-$tracedMapSignatures := NIL
+$tracedMapSignatures := nil
$traceOptionList == '(
after _
@@ -70,7 +70,7 @@ $traceOptionList == '(
)
-$lastUntraced := NIL
+$lastUntraced := nil
SETLETPRINTFLAG x == x
@@ -83,27 +83,27 @@ traceSpad2Cmd l ==
traceReply()
trace1 l ==
- $traceNoisely: local := NIL
+ $traceNoisely: local := nil
if hasOption($options,'nonquietly) then $traceNoisely := true
hasOption($options,'off) =>
(ops := hasOption($options,'ops)) or
(lops := hasOption($options,'local)) =>
- null l => throwKeyedMsg("S2IT0019",NIL)
+ null l => throwKeyedMsg("S2IT0019",nil)
constructor := unabbrev
atom l => l
null rest l =>
atom first l => first l
first first l
- NIL
- not(isFunctor constructor) => throwKeyedMsg("S2IT0020",NIL)
+ nil
+ not(isFunctor constructor) => throwKeyedMsg("S2IT0020",nil)
if ops then
ops := getTraceOption ops
- NIL
+ nil
if lops then
lops := rest getTraceOption lops
untraceDomainLocalOps(constructor,lops)
(1 < # $options) and not hasOption($options,'nonquietly) =>
- throwKeyedMsg("S2IT0021",NIL)
+ throwKeyedMsg("S2IT0021",nil)
untrace l
hasOption($options,'stats) =>
(1 < # $options) =>
@@ -121,7 +121,7 @@ trace1 l ==
resetSpacers()
resetTimers()
resetCounters()
- throwKeyedMsg("S2IT0002",NIL)
+ throwKeyedMsg("S2IT0002",nil)
a:= hasOption($options,'restore) =>
null(oldL:= $lastUntraced) => nil
newOptions:= remove($options,a)
@@ -140,7 +140,7 @@ trace1 l ==
argument:=
domainList := symbolLassoc("of",optionList) =>
symbolLAssoc("ops",optionList) =>
- throwKeyedMsg("S2IT0004",NIL)
+ throwKeyedMsg("S2IT0004",nil)
opList:=
traceList => [["ops",:traceList]]
nil
@@ -182,9 +182,9 @@ getTraceOption (x is [key,:l]) ==
key in '(nonquietly timer nt) => x
key='break =>
null l => ['break,'before]
- opts := [selectOptionLC(y,'(before after),NIL) for y in l]
+ opts := [selectOptionLC(y,'(before after),nil) for y in l]
and/[IDENTP y for y in opts] => ['break,:opts]
- stackTraceOptionError ["S2IT0008",NIL]
+ stackTraceOptionError ["S2IT0008",nil]
key='restore =>
null l => x
stackTraceOptionError ["S2IT0009",[strconc('")",object2String key)]]
@@ -317,7 +317,7 @@ transTraceItem x ==
removeTracedMapSigs untraceList ==
for name in untraceList repeat
- REMPROP(name,$tracedMapSignatures)
+ property(name,$tracedMapSignatures) := nil
coerceTraceArgs2E(traceName,subName,args) ==
symbolMember?(name:= subName,$mathTraceList) =>
@@ -488,14 +488,14 @@ spadTrace(domain,options) ==
traceDomainLocalOps(dom,lops,options) ==
sayMSG ['" ",'"The )local option has been withdrawn"]
sayMSG ['" ",'"Use )ltr to trace local functions."]
- NIL
+ nil
-- abb := abbreviate dom
-- loadLibIfNotLoaded abb
-- actualLops := getLocalOpsFromLisplib abb
-- null actualLops =>
-- sayMSG ['" ",:bright abb,'"has no local functions to trace."]
-- lops = 'all => _/TRACE_,1(actualLops,options)
--- l := NIL
+-- l := nil
-- for lop in lops repeat
-- internalName := makeSymbol strconc(PNAME abb,'";",PNAME lop)
-- not symbolMember?(internalName,actualLops) =>
@@ -508,14 +508,14 @@ traceDomainLocalOps(dom,lops,options) ==
untraceDomainLocalOps(dom,lops) ==
abb := abbreviate dom
sayMSG ['" ",:bright abb,'"has no local functions to untrace."]
- NIL
+ nil
-- lops = "all" => untraceAllDomainLocalOps(dom)
-- abb := abbreviate dom
-- loadLibIfNotLoaded abb
-- actualLops := getLocalOpsFromLisplib abb
-- null actualLops =>
-- sayMSG ['" ",:bright abb,'"has no local functions to untrace."]
--- l := NIL
+-- l := nil
-- for lop in lops repeat
-- internalName := makeSymbol strconc(PNAME abb,'";",PNAME lop)
-- not symbolMember?(internalName,actualLops) =>
@@ -525,12 +525,12 @@ untraceDomainLocalOps(dom,lops) ==
-- l => untrace l
-- nil
-untraceAllDomainLocalOps(dom) == NIL
+untraceAllDomainLocalOps(dom) == nil
-- abb := abbreviate dom
-- actualLops := getLocalOpsFromLisplib abb
--- null (l := intersection(actualLops,_/TRACENAMES)) => NIL
--- _/UNTRACE_,1(l,NIL)
--- NIL
+-- null (l := intersection(actualLops,_/TRACENAMES)) => nil
+-- _/UNTRACE_,1(l,nil)
+-- nil
traceDomainConstructor(domainConstructor,options) ==
-- Trace all domains built with the given domain constructor,
@@ -541,7 +541,7 @@ traceDomainConstructor(domainConstructor,options) ==
if listOfLocalOps then
traceDomainLocalOps(domainConstructor,listOfLocalOps,
[opt for opt in options | opt isnt ['LOCAL,:.]])
- listOfLocalOps and not getOption("OPS",options) => NIL
+ listOfLocalOps and not getOption("OPS",options) => nil
for [argl,.,:domain] in HGET($ConstructorCache,domainConstructor)
repeat spadTrace(domain,options)
SETQ(_/TRACENAMES,[domainConstructor,:_/TRACENAMES])
@@ -641,7 +641,7 @@ letPrint3(x,xval,printfn,currentFunction) ==
getAliasIfTracedMapParameter(x,currentFunction) ==
isSharpVarWithNum x =>
aliasList:= get(currentFunction,'alias,$InteractiveFrame) =>
- aliasList.(STRING2PINT_-N(subString(PNAME x,1,NIL),1)-1)
+ aliasList.(STRING2PINT_-N(subString(PNAME x,1,nil),1)-1)
x
getBpiNameIfTracedMap(name) ==
@@ -667,11 +667,11 @@ getOption(opt,l) ==
reportSpadTrace(header,[op,sig,n,:t]) ==
null $traceNoisely => nil
msg:= [header,'"%b",op,":",'"%d",rest sig," -> ",first sig," in slot ",n]
- namePart:= nil --(t is (.,.,name,:.) => (" named ",name); NIL)
+ namePart:= nil --(t is (.,.,name,:.) => (" named ",name); nil)
tracePart:=
t is [y,:.] and not null y =>
(y="all" => ['"%b","all",'"%d","vars"]; [" vars: ",y])
- NIL
+ nil
sayBrightly [:msg,:namePart,:tracePart]
orderBySlotNumber l ==
@@ -823,7 +823,7 @@ breaklet(fn,vars) ==
stupidIsSpadFunction fn ==
-- returns true if the function pname has a semi-colon in it
-- eventually, this will use isSpadFunction from luke boot
- STRPOS('"_;",PNAME fn,0,NIL)
+ STRPOS('"_;",PNAME fn,0,nil)
break msg ==
condition:= MONITOR_,EVALTRAN(_/BREAKCONDITION,nil)
diff --git a/src/interp/union.lisp b/src/interp/union.lisp
index 311ffff0..955cd4c4 100644
--- a/src/interp/union.lisp
+++ b/src/interp/union.lisp
@@ -46,7 +46,7 @@
( (NOT (LISTP LIST-OF-ITEMS-2))
(SETQ LIST-OF-ITEMS-2 (LIST LIST-OF-ITEMS-2)) ) )
LP (COND
- ( (NOT (PAIRP LIST-OF-ITEMS-1))
+ ( (NOT (CONSP LIST-OF-ITEMS-1))
(RETURN (QCDR H)) )
( (|member|
(SETQ I (QCAR (RESETQ LIST-OF-ITEMS-1 (QCDR LIST-OF-ITEMS-1))))
@@ -65,12 +65,12 @@
( (NOT (LISTP LIST-OF-ITEMS-2))
(SETQ LIST-OF-ITEMS-2 (LIST LIST-OF-ITEMS-2)) ) )
LP (COND
- ( (NOT (PAIRP LIST-OF-ITEMS-1))
+ ( (NOT (CONSP LIST-OF-ITEMS-1))
(RETURN (QCDR H)) )
- ( (MEMQ
+ ( (|symbolMember?|
(SETQ I (QCAR (RESETQ LIST-OF-ITEMS-1 (QCDR LIST-OF-ITEMS-1))))
(QCDR H)) )
- ( (MEMQ I LIST-OF-ITEMS-2)
+ ( (|symbolMember?| I LIST-OF-ITEMS-2)
(QRPLACD V (SETQ V (CONS I NIL))) ) )
(GO LP) ) )
@@ -84,9 +84,9 @@
( (NOT (LISTP LIST-OF-ITEMS-2))
(SETQ LIST-OF-ITEMS-2 (LIST LIST-OF-ITEMS-2)) ) )
LP1 (COND
- ( (NOT (PAIRP LIST-OF-ITEMS-1))
+ ( (NOT (CONSP LIST-OF-ITEMS-1))
(COND
- ( (PAIRP LIST-OF-ITEMS-2)
+ ( (CONSP LIST-OF-ITEMS-2)
(SETQ LIST-OF-ITEMS-1 (RESETQ LIST-OF-ITEMS-2 NIL)) )
( 'T
(RETURN (QCDR H)) ) ) )
@@ -107,14 +107,14 @@
( (NOT (LISTP LIST-OF-ITEMS-2))
(SETQ LIST-OF-ITEMS-2 (LIST LIST-OF-ITEMS-2)) ) )
LP1 (COND
- ( (NOT (PAIRP LIST-OF-ITEMS-1))
+ ( (NOT (CONSP LIST-OF-ITEMS-1))
(COND
- ( (PAIRP LIST-OF-ITEMS-2)
+ ( (CONSP LIST-OF-ITEMS-2)
(SETQ LIST-OF-ITEMS-1 (RESETQ LIST-OF-ITEMS-2 NIL)) )
( 'T
(RETURN (QCDR H)) ) ) )
( (NOT
- (MEMQ
+ (|symbolMember?|
(SETQ I (QCAR (RESETQ LIST-OF-ITEMS-1 (QCDR LIST-OF-ITEMS-1))))
(QCDR H)))
(QRPLACD V (SETQ V (CONS I NIL))) ) )
@@ -130,7 +130,7 @@
( (NOT (LISTP LIST-OF-ITEMS-2))
(SETQ LIST-OF-ITEMS-2 (LIST LIST-OF-ITEMS-2)) ) )
LP1 (COND
- ( (NOT (PAIRP LIST-OF-ITEMS-1))
+ ( (NOT (CONSP LIST-OF-ITEMS-1))
(RETURN (QCDR H)) )
( (|member|
(SETQ I (QCAR (RESETQ LIST-OF-ITEMS-1 (QCDR LIST-OF-ITEMS-1))))
@@ -149,11 +149,11 @@
( (NOT (LISTP LIST-OF-ITEMS-2))
(SETQ LIST-OF-ITEMS-2 (LIST LIST-OF-ITEMS-2)) ) )
LP1 (COND
- ( (NOT (PAIRP LIST-OF-ITEMS-1))
+ ( (NOT (CONSP LIST-OF-ITEMS-1))
(RETURN (QCDR H)) )
- ( (MEMQ
+ ( (|symbolMember?|
(SETQ I (QCAR (RESETQ LIST-OF-ITEMS-1 (QCDR LIST-OF-ITEMS-1))))
(QCDR H)) )
- ( (NOT (MEMQ I LIST-OF-ITEMS-2))
+ ( (NOT (|symbolMember?| I LIST-OF-ITEMS-2))
(QRPLACD V (SETQ V (CONS I NIL))) ) )
(GO LP1) ) )
diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp
index 9c0de8f7..1ba8da59 100644
--- a/src/interp/vmlisp.lisp
+++ b/src/interp/vmlisp.lisp
@@ -222,9 +222,6 @@
#-:common-lisp (compile)
(load ,filearg)))
-(defmacro pairp (x)
- `(consp ,x))
-
(defmacro plus (&rest args)
`(+ ,@ args))
@@ -467,7 +464,7 @@
(defun WRAP (LIST-OF-ITEMS WRAPPER)
(prog nil
- (COND ((OR (NOT (PAIRP LIST-OF-ITEMS)) (not WRAPPER))
+ (COND ((OR (NOT (CONSP LIST-OF-ITEMS)) (not WRAPPER))
(RETURN LIST-OF-ITEMS))
((NOT (consp WRAPPER))
(SETQ WRAPPER (LOTSOF WRAPPER))))
@@ -1363,7 +1360,7 @@
(DCQ (OP BV . BODY) NEW-DEFINITION)
(OR (EQ OP 'LAMBDA) (EQ OP 'MLAMBDA)))
(COND
- ( (NOT (MEMQ CURRENT-BINDING (FLAT-BV-LIST BV)))
+ ( (NOT (|symbolMember?| CURRENT-BINDING (FLAT-BV-LIST BV)))
(eval `(,OP ,BV ((LAMBDA (,CURRENT-BINDING) . ,BODY)
',OLD-DEF)))
)
diff --git a/src/interp/word.boot b/src/interp/word.boot
index 84a8014d..249ccda2 100644
--- a/src/interp/word.boot
+++ b/src/interp/word.boot
@@ -36,7 +36,7 @@
-- Build Directories
--=======================================================================
buildFunctionTable(dicts) ==
- sayKeyedMsg("S2GL0011",NIL)
+ sayKeyedMsg("S2GL0011",nil)
buildWordTable getListOfFunctionNames dicts
buildWordTable u ==
@@ -52,13 +52,13 @@ buildWordTable u ==
table
writeFunctionTables(filemode) ==
- $functionTable := NIL
+ $functionTable := nil
writeFunctionTable(filemode,'SPADU,'(SPAD))
- $functionTable := NIL
+ $functionTable := nil
writeFunctionTable(filemode,'SPADD,'(SPADSYS))
- $functionTable := NIL
+ $functionTable := nil
writeFunctionTable(filemode,'SPADC,'(SPADSYS SCRATCHPAD_-COMPILER))
- $functionTable := NIL
+ $functionTable := nil
'done
writeFunctionTable(filemode,name,dicts) ==
@@ -72,7 +72,7 @@ writeFunctionTable(filemode,name,dicts) ==
'done
readFunctionTable() ==
- sayKeyedMsg("S2GL0011",NIL)
+ sayKeyedMsg("S2GL0011",nil)
name :=
$wordDictionary = 'user => 'SPADU
$wordDictionary = 'development => 'SPADD
@@ -143,7 +143,7 @@ guess word ==
nil
bootFind word ==
- not $useWordFacility => NIL
+ not $useWordFacility => nil
list:= bootSearch word
PNAME word in list => nil --mismatch of directories: pretend it was not found
null list => centerAndHighlight('"no match found",80,'" ")