aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-04-19 18:14:50 +0000
committerdos-reis <gdr@axiomatics.org>2011-04-19 18:14:50 +0000
commitfaaf19e1912ba48e9fbd195d2b90c4e205c87538 (patch)
tree18a81dba1f12285383ba73beaeb8febb6606ea37 /src
parent9430f000bbcedcd6f0edbe1c4852cb2b51c50ccc (diff)
downloadopen-axiom-faaf19e1912ba48e9fbd195d2b90c4e205c87538.tar.gz
cleanup
Diffstat (limited to 'src')
-rw-r--r--src/interp/as.boot6
-rw-r--r--src/interp/ax.boot4
-rw-r--r--src/interp/br-con.boot4
-rw-r--r--src/interp/br-op1.boot8
-rw-r--r--src/interp/br-op2.boot4
-rw-r--r--src/interp/br-saturn.boot4
-rw-r--r--src/interp/br-search.boot3
-rw-r--r--src/interp/br-util.boot12
-rw-r--r--src/interp/c-doc.boot16
-rw-r--r--src/interp/c-util.boot4
-rw-r--r--src/interp/category.boot10
-rw-r--r--src/interp/cattable.boot8
-rw-r--r--src/interp/compiler.boot18
-rw-r--r--src/interp/cparse.boot4
-rw-r--r--src/interp/database.boot14
-rw-r--r--src/interp/define.boot22
-rw-r--r--src/interp/fortcall.boot8
-rw-r--r--src/interp/functor.boot2
-rw-r--r--src/interp/g-cndata.boot4
-rw-r--r--src/interp/g-opt.boot12
-rw-r--r--src/interp/ht-root.boot2
-rw-r--r--src/interp/i-analy.boot8
-rw-r--r--src/interp/i-coerce.boot28
-rw-r--r--src/interp/i-eval.boot2
-rw-r--r--src/interp/i-funsel.boot6
-rw-r--r--src/interp/i-resolv.boot2
-rw-r--r--src/interp/i-special.boot4
-rw-r--r--src/interp/i-syscmd.boot6
-rw-r--r--src/interp/lisplib.boot8
-rw-r--r--src/interp/macex.boot2
-rw-r--r--src/interp/modemap.boot4
-rw-r--r--src/interp/msg.boot2
-rw-r--r--src/interp/nruncomp.boot6
-rw-r--r--src/interp/pf2sex.boot2
-rw-r--r--src/interp/profile.boot2
-rw-r--r--src/interp/scan.boot2
-rw-r--r--src/interp/showimp.boot5
-rw-r--r--src/interp/slam.boot2
-rw-r--r--src/interp/termrw.boot2
-rw-r--r--src/interp/trace.boot42
40 files changed, 154 insertions, 150 deletions
diff --git a/src/interp/as.boot b/src/interp/as.boot
index cef308e2..6652448e 100644
--- a/src/interp/as.boot
+++ b/src/interp/as.boot
@@ -156,7 +156,7 @@ asMakeAlist con ==
SUBLISLIS($FormalMapVariableList,KDR form,LASSOC(con,$docAlist))
filestring := strconc(PATHNAME_-NAME STRINGIMAGE filename,'".as")
constantPart := HGET($constantHash,con) and [['constant,:true]]
- niladicPart := MEMQ(con,$niladics) and [['NILADIC,:true]]
+ niladicPart := symbolMember?(con,$niladics) and [['NILADIC,:true]]
falist := TAKE(#KDR form,$FormalMapVariableList)
constructorCategory :=
kind = 'category =>
@@ -391,7 +391,7 @@ asyAncestors x ==
x is [op,y,:.] and op in '(PretendTo RestrictTo) => asyAncestors y
atom x =>
x = '_% => '_$
- MEMQ(x, $niladics) => [x]
+ symbolMember?(x, $niladics) => [x]
niladicConstructorFromDB x => [x]
x
asyAncestorList x
@@ -975,7 +975,7 @@ asyFindAttrs l ==
for x in l repeat
x0 := x
while cons? x repeat x := first x
- if MEMQ(x, $BuiltinAttributes) then attrs := [:attrs, x]
+ if symbolMember?(x, $BuiltinAttributes) then attrs := [:attrs, x]
else notattrs := [:notattrs, x0]
[attrs, notattrs]
diff --git a/src/interp/ax.boot b/src/interp/ax.boot
index 64364130..13c24611 100644
--- a/src/interp/ax.boot
+++ b/src/interp/ax.boot
@@ -173,9 +173,9 @@ axFormatType(typeform) ==
axAddLiteral('integer, 'PositiveInteger, 'Literal)
['RestrictTo, ['LitInteger, STRINGIMAGE typeform ], 'PositiveInteger]
FLOATP typeform => ['LitFloat, STRINGIMAGE typeform]
- MEMQ(typeform,$TriangleVariableList) =>
+ symbolMember?(typeform,$TriangleVariableList) =>
SUBLISLIS($FormalMapVariableList, $TriangleVariableList, typeform)
- MEMQ(typeform, $FormalMapVariableList) => typeform
+ symbolMember?(typeform, $FormalMapVariableList) => typeform
axAddLiteral('string, 'Symbol, 'Literal)
['RestrictTo, ['LitString, symbolName typeform], 'Symbol]
typeform is ['construct,: args] =>
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot
index ca273976..a7afc084 100644
--- a/src/interp/br-con.boot
+++ b/src/interp/br-con.boot
@@ -741,7 +741,7 @@ conOpPage1(conform,:options) ==
--constructors Cname\#\E\sig \args \abb \comments (C is C, D, P, X)
bindingsAlist := IFCAR options
conname := opOf conform
- MEMQ(conname,$DomainNames) =>
+ symbolMember?(conname,$DomainNames) =>
dbSpecialOperations conname
domname := --> !!note!! <--
cons? conform => conform
@@ -1058,7 +1058,7 @@ dbShowConsDoc(htPage,conlist) ==
dbShowConsDoc1(htPage,conform,indexOrNil) ==
[conname,:conargs] := conform
- MEMQ(conname,$DomainNames) =>
+ symbolMember?(conname,$DomainNames) =>
conname := htpProperty(htPage,'conname)
[["constructor",["NIL",doc]],:.] := GETL(conname,'documentation)
sig := '((CATEGORY domain) (SetCategory) (SetCategory))
diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot
index 47252747..c8dd0098 100644
--- a/src/interp/br-op1.boot
+++ b/src/interp/br-op1.boot
@@ -447,7 +447,7 @@ dbReduceByOpSignature(opAlist,datalist) ==
-- (((op,sig,:implementor),:stuff),...)
ops := [CAAR x for x in datalist] --x is [[op,sig,:implementor],:.]
acc := nil
- for [op,:alist] in opAlist | MEMQ(op,ops) repeat
+ for [op,:alist] in opAlist | symbolMember?(op,ops) repeat
entryList := [entry for (entry := [sig,:.]) in alist | test] where test() ==
or/[x for x in datalist | x is [[=op,=sig,:.],:.]]
entryList => acc := [[op,:nreverse entryList],:acc]
@@ -941,9 +941,9 @@ getDomainOpTable(dom,fromIfTrue,:options) ==
| key ~= 'Subsumed and ((null ops and (op1 := op)) or (op1 := memq(op,ops)))]
for [op,:u] in opAlist] where
memq(op,ops) == --dirty trick to get 0 and 1 instead of Zero and One
- MEMQ(op,ops) => op
- op = 'One => MEMQ(1,ops) and 1
- op = 'Zero => MEMQ(0,ops) and 0
+ symbolMember?(op,ops) => op
+ op = 'One => symbolMember?("1",ops) and "1"
+ op = 'Zero => symbolMember?("0",ops) and "0"
false
fn() ==
sig1 := sublisFormal(rest domname,sig)
diff --git a/src/interp/br-op2.boot b/src/interp/br-op2.boot
index 399c58fd..3862174b 100644
--- a/src/interp/br-op2.boot
+++ b/src/interp/br-op2.boot
@@ -304,7 +304,7 @@ whoUses(opSigList,conform) ==
$conname : local := first conform
domList := getUsersOfConstructor $conname
hash := MAKE_-HASH_-TABLE()
- for name in allConstructors() | MEMQ(name,domList) repeat
+ for name in allConstructors() | symbolMember?(name,domList) repeat
$infovec : local := dbInfovec name
null $infovec => 'skip --category
template := $infovec . 0
@@ -312,7 +312,7 @@ whoUses(opSigList,conform) ==
opacc := nil
for i in 7..maxIndex template repeat
item := template . i
- item isnt [n,:op] or not MEMQ(op,opList) => 'skip
+ item isnt [n,:op] or not symbolMember?(op,opList) => 'skip
index := n
numvec := getCodeVector()
numOfArgs := numvec . index
diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot
index 721893cc..0b627a34 100644
--- a/src/interp/br-saturn.boot
+++ b/src/interp/br-saturn.boot
@@ -1245,7 +1245,7 @@ displayDomainOp(htPage,which,origin,op,sig,predicate,
$conargs : local := rest conform
if which = '"operation" then
$signature : local :=
- MEMQ(conname,$DomainNames) => nil
+ symbolMember?(conname,$DomainNames) => nil
CDAR getConstructorModemapFromDB conname
--RDJ: this next line is necessary until compiler bug is fixed
--that forgets to substitute #variables for t#variables;
@@ -1723,7 +1723,7 @@ screenLocalLine(line, conlist) ==
k := charPosition(char "(",s,1)
subString(s,1,k - 1)
dbName line
- MEMQ(con, conlist)
+ symbolMember?(con, conlist)
purgeLocalLibdb() == --called by the user through a clear command?
$newConstructorList := nil
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index df0a920f..bce8723a 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -205,7 +205,8 @@ firstNonDelim(s,n) ==
firstDelim(s,n) ==
or/[k for k in n..maxIndex s | isFilterDelimiter? stringChar(s,k)]
-isFilterDelimiter? c == MEMQ(c,$pmFilterDelimiters)
+isFilterDelimiter? c ==
+ charMember?(c,$pmFilterDelimiters)
grepSplit(lines,doc?) ==
if doc? then
diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot
index 52ec5376..79ef2ef4 100644
--- a/src/interp/br-util.boot
+++ b/src/interp/br-util.boot
@@ -150,7 +150,8 @@ htPred2English(x,:options) ==
gn(x,op,l,prec)
if prec < 5 then htSay '")"
x = 'etc => htSay '"..."
- IDENTP x and not MEMQ(x,$emList) => htSay escapeSpecialIds symbolName x
+ IDENTP x and not symbolMember?(x,$emList) =>
+ htSay escapeSpecialIds symbolName x
htSay form2HtString(x,$emList)
gn(x,op,l,prec) ==
op in '(NOT not) =>
@@ -202,9 +203,10 @@ form2HtString(x,:options) ==
fn(x) where
fn x ==
atom x =>
- MEMQ(x,$FormalMapVariableList) => strconc('"\",STRINGIMAGE x)
+ symbolMember?(x,$FormalMapVariableList) =>
+ strconc('"\",symbolName x)
u := escapeSpecialChars STRINGIMAGE x
- MEMQ(x,$emList) => strconc('"{\em ",u,'"}")
+ symbolMember?(x,$emList) => strconc('"{\em ",u,'"}")
string? x => strconc('"_"",u,'"_"")
u
first x = 'QUOTE => strconc('"'",sexpr2HtString second x)
@@ -236,8 +238,8 @@ sexpr2HtString x ==
form2LispString(x) ==
atom x =>
x = '_$ => '"__$"
- MEMQ(x,$FormalMapVariableList) => strconc(STRINGIMAGE '__, STRINGIMAGE x)
- string? x => strconc('"_"",STRINGIMAGE x,'"_"")
+ symbolMember?(x,$FormalMapVariableList) => strconc('"__", symbolName x)
+ string? x => strconc('"_"",x,'"_"")
STRINGIMAGE x
x is ['QUOTE,a] => strconc('"'",sexpr2LispString a)
x is [":",a,b] => strconc(form2LispString a,'":",form2LispString b)
diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot
index 036a7111..129161a2 100644
--- a/src/interp/c-doc.boot
+++ b/src/interp/c-doc.boot
@@ -702,7 +702,7 @@ checkTrim($x,lines) == main where
s := [wherePP first lines]
for x in rest lines repeat
j := wherePP x
- if not MEMQ(j,s) then
+ if not scalarMember?(j,s) then
checkDocError [$x,'" has varying indentation levels"]
s := [j,:s]
[trim y for y in lines]
@@ -816,7 +816,7 @@ checkDecorate u ==
x is '"\spad" => ['"\spad",:acc]
string? x and digit? stringChar(x,0) => [x,:acc]
not spadflag and
- (CHARP x and alphabetic? x and not MEMQ(x,$charExclusions) or
+ (char? x and alphabetic? x and not charMember?(x,$charExclusions) or
member(x,$argl)) => [$charRbrace,x,$charLbrace,'"\spad",:acc]
not spadflag and string? x and ((x.0 ~= $charBack and digit?(x.(maxIndex x))) or x in '("true" "false")) =>
[$charRbrace,x,$charLbrace,'"\spad",:acc] --wrap x1, alpha3, etc
@@ -844,17 +844,17 @@ isVowel c ==
checkAddBackSlashes s ==
- (CHARP s and (c := s)) or (#s = 1 and (c := s.0)) =>
- MEMQ(s,$charEscapeList) => strconc($charBack,c)
+ (char? s and (c := s)) or (#s = 1 and (c := stringChar(s,0))) =>
+ charMember?(s,$charEscapeList) => strconc($charBack,charString c)
s
k := 0
m := maxIndex s
insertIndex := nil
while k <= m repeat
do
- char := stringChar(s,k)
- char = $charBack => k := k + 2
- MEMQ(char,$charEscapeList) => return (insertIndex := k)
+ c := stringChar(s,k)
+ c = $charBack => k := k + 2
+ charMember?(c,$charEscapeList) => return (insertIndex := k)
k := k + 1
insertIndex => checkAddBackSlashes strconc(subString(s,0,insertIndex),$charBack,s.k,subString(s,insertIndex + 1))
s
@@ -1218,7 +1218,7 @@ checkSkipIdentifierToken(u,i,m) ==
++ returns true if character `c' is alphabetic.
checkAlphabetic c ==
- alphabetic? c or digit? c or MEMQ(c,$charIdentifierEndings)
+ alphabetic? c or digit? c or charMember?(c,$charIdentifierEndings)
--=======================================================================
-- Code for creating a personalized report for ++ comments
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 250eb63e..8b94b4e9 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -603,7 +603,7 @@ diagnoseUnknownType(t,e) ==
stackSemanticError(['"Enumerators must be symbols."], nil)
-- Make sure we don't have repeated symbolic values
for [sym,:syms] in tails args repeat
- MEMQ(sym,syms) =>
+ symbolMember?(sym,syms) =>
stackSemanticError(['"Symbolic value ", :bright sym,
'"is listed twice"], nil)
t
@@ -679,7 +679,7 @@ isSubset(x,y,e) ==
isDomainInScope(domain,e) ==
domainList:= getDomainsInScope e
atom domain =>
- MEMQ(domain,domainList) => true
+ symbolMember?(domain,domainList) => true
not IDENTP domain or isSomeDomainVariable domain => true
false
(name:= first domain)="Category" => true
diff --git a/src/interp/category.boot b/src/interp/category.boot
index cf18d703..79640445 100644
--- a/src/interp/category.boot
+++ b/src/interp/category.boot
@@ -404,7 +404,7 @@ JoinInner(l,$e) ==
if atom at2 then at2:=[at2]
-- the variable $Attributes is built globally, so that true
-- attributes can be detected without calling isCategoryForm
- MEMQ(first at2,$Attributes) => nil
+ symbolMember?(first at2,$Attributes) => nil
null isCategoryForm(at2,$e) =>
$Attributes:=[first at2,:$Attributes]
nil
@@ -482,8 +482,8 @@ JoinInner(l,$e) ==
FundamentalAncestors:= [[bname],:second $NewCatVec.4]
--bname is Principal, so comes first
reallynew:= nil
- MEMQ(b,l) =>
- --MEMQ since category vectors are guaranteed unique
+ objectMember?(b,l) =>
+ --objectMember? since category vectors are guaranteed unique
(sigl:= $NewCatVec.1; attl:= $NewCatVec.2; l:= delete(b,l))
-- SAY("domain ",bname," subsumes")
-- SAY("adding a conditional domain ",
@@ -526,8 +526,8 @@ JoinInner(l,$e) ==
sigl:= SigListUnion([DropImplementations u for u in b.1],sigl)
attl:=
-- next two lines are merely performance improvements
- MEMQ(attl,b.2) => b.2
- MEMQ(b.2,attl) => attl
+ symbolMember?(attl,b.2) => b.2
+ symbolMember?(b.2,attl) => attl
S_+(b.2,attl)
globalDomains:= [:globalDomains,:S_-(b.5,globalDomains)]
for b in CondList repeat
diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot
index 6104ef51..31671f2e 100644
--- a/src/interp/cattable.boot
+++ b/src/interp/cattable.boot
@@ -49,7 +49,7 @@ displayCategoryTable(:options) ==
SETQ($ct,hashTable 'EQ)
for (key:=[a,:b]) in HKEYS _*HASCATEGORY_-HASH_* repeat
HPUT($ct,a,[[b,:HGET(_*HASCATEGORY_-HASH_*,key)],:HGET($ct,a)])
- for id in HKEYS $ct | null conList or MEMQ(id,conList) repeat
+ for id in HKEYS $ct | null conList or symbolMember?(id,conList) repeat
sayMSG [:bright id,'"extends:"]
PRINT HGET($ct,id)
@@ -279,7 +279,7 @@ isFormalArgumentList argl ==
mkCategoryExtensionAlist cform ==
not cons? cform => nil
cop := first cform
- MEMQ(cop, $CategoryNames) => mkCategoryExtensionAlistBasic cform
+ symbolMember?(cop, $CategoryNames) => mkCategoryExtensionAlistBasic cform
catlist := formalSubstitute(cform, first getConstructorExports(cform, true))
extendsList:= nil
for [cat,:pred] in catlist repeat
@@ -488,11 +488,11 @@ clearCategoryTable1(key,val) ==
clearTempCategoryTable(catNames) ==
for key in HKEYS(_*ANCESTORS_-HASH_*) repeat
- MEMQ(key,catNames) => nil
+ symbolMember?(key,catNames) => nil
extensions:= nil
for (extension:= [catForm,:.]) in getConstructorAncestorsFromDB key
repeat
- MEMQ(first catForm,catNames) => nil
+ symbolMember?(first catForm,catNames) => nil
extensions:= [extension,:extensions]
HPUT(_*ANCESTORS_-HASH_*,key,extensions)
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 67dd361c..1e214111 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -256,7 +256,7 @@ applyMapping([op,:argl],m,e,ml) ==
-- if argl'="failed" then return nil
-- mappingHasCategoryTarget => convert([form,first ml,e],m)
-- form:=
--- not MEMQ(op,$formalArgList) and atom op =>
+-- not symbolMember?(op,$formalArgList) and atom op =>
-- [op',:argl',"$"] where
-- op':= makeSymbol strconc(STRINGIMAGE $prefix,";",STRINGIMAGE op)
-- ['%call,["applyFun",op],:argl']
@@ -267,7 +267,7 @@ hasFormalMapVariable(x, vl) ==
$formalMapVariables: local := vl
null vl => false
ScanOrPairVec(function hasone?,x) where
- hasone? x == MEMQ(x,$formalMapVariables)
+ hasone? x == symbolMember?(x,$formalMapVariables)
++ Return the usage list of free variables in a lambda expresion.
@@ -277,7 +277,7 @@ freeVarUsage([.,vars,body],env) ==
freeList(u,bound,free,e) ==
atom u =>
not IDENTP u => free
- MEMQ(u,bound) => free
+ symbolMember?(u,bound) => free
v := ASSQ(u,free) =>
v.rest := 1 + rest v
free
@@ -417,16 +417,16 @@ compSymbol(s,m,e) ==
isFluid s => [s,getmode(s,e) or return nil,e]
sameObject?(s,m) or isLiteral(s,e) => [["QUOTE",s],s,e]
v := get(s,"value",e) =>
- MEMQ(s,$functorLocalParameters) =>
+ symbolMember?(s,$functorLocalParameters) =>
NRTgetLocalIndex s
[s,v.mode,e] --s will be replaced by an ELT form in beforeCompile
[s,v.mode,e] --s has been SETQd
m' := getmode(s,e) =>
- if not MEMQ(s,$formalArgList) and not MEMQ(s,$FormalMapVariableList) and
+ if not symbolMember?(s,$formalArgList) and not symbolMember?(s,$FormalMapVariableList) and
not isFunction(s,e) and null ($compForModeIfTrue=true) then errorRef s
[s,m',e] --s is a declared argument
- MEMQ(s,$FormalMapVariableList) =>
+ symbolMember?(s,$FormalMapVariableList) =>
stackMessage('"no mode found for %1b",[s])
member(m,$IOFormDomains) or member(m,[$Identifier,$Symbol]) =>
[['QUOTE,s],m,e]
@@ -529,8 +529,8 @@ compForm2(form is [op,:argl],m,e,modemapList) ==
if not PredImplies(ncond,cond) then
newList := [[first u,[cond,['ELT,dc,nil]]],:newList]
if deleteList ~= nil then
- modemapList := [u for u in modemapList | not MEMQ(u,deleteList)]
- -- We can use MEMQ since deleteList was built out of members of modemapList
+ modemapList := [u for u in modemapList | not objectMember?(u,deleteList)]
+ -- We can use objectMember? since deleteList was built out of members of modemapList
-- its important that subsumed ops (newList) be considered last
if newList then
modemapList := append(modemapList,newList)
@@ -695,7 +695,7 @@ compApplication(op,argl,m,T) ==
argTl = "failed" => nil
form:=
atom T.expr and
- not (MEMQ(op,$formalArgList) or MEMQ(T.expr,$formalArgList)) and
+ not (symbolMember?(op,$formalArgList) or symbolMember?(T.expr,$formalArgList)) and
null get(T.expr,"value",e) =>
emitLocalCallInsn(T.expr,[a.expr for a in argTl],e)
['%call, ['applyFun, T.expr], :[a.expr for a in argTl]]
diff --git a/src/interp/cparse.boot b/src/interp/cparse.boot
index 1ae46824..55990bed 100644
--- a/src/interp/cparse.boot
+++ b/src/interp/cparse.boot
@@ -315,7 +315,7 @@ npInfixOperator() ==
++ Parse any infix keyword in the list `s'.
npInfKey s ==
- $stok.first.first = "key" and MEMQ($ttok,s) and npPushId()
+ $stok.first.first = "key" and symbolMember?($ttok,s) and npPushId()
++ Parse any infix keyword in the list `s', either in plain syntax
++ or quoted form.
@@ -393,7 +393,7 @@ npId() ==
$stok.first.first = "id" =>
npPush $stok
npNext()
- $stok.first.first = "key" and MEMQ($ttok,$npTokToNames) =>
+ $stok.first.first = "key" and symbolMember?($ttok,$npTokToNames) =>
npPush tokConstruct("id",$ttok,tokPosn $stok)
npNext()
false
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 3e4077a9..2f5d862c 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -194,7 +194,7 @@ augmentLisplibModemapsFromFunctor(form,opAlist,signature) ==
opAlist:= formal2Pattern opAlist
signature:= formal2Pattern signature
for u in form for v in signature repeat
- if MEMQ(u,$PatternVariableList) then
+ if symbolMember?(u,$PatternVariableList) then
-- we are going to be EVALing categories containing these
-- pattern variables
$e:=put(u,'mode,v,$e)
@@ -211,11 +211,11 @@ augmentLisplibModemapsFromFunctor(form,opAlist,signature) ==
--get relevant predicates
predList:=
[[a,m] for a in argl for m in rest signature
- | MEMQ(a,$PatternVariableList)]
+ | symbolMember?(a,$PatternVariableList)]
sig:= substitute(form,"$",sig)
pred':= MKPF([pred,:[mkDatabasePred y for y in predList]],'AND)
l:=listOfPatternIds predList
- if "OR"/[null MEMQ(u,l) for u in argl] then
+ if "OR"/[null symbolMember?(u,l) for u in argl] then
sayMSG ['"cannot handle modemap for",:bright op,
'"by pattern match" ]
skip:= 'SKIP
@@ -384,7 +384,7 @@ isDomainSubst u == main where
u
fn(x,alist) ==
atom x =>
- IDENTP x and MEMQ(x,$PatternVariableList) and (s := findSub(x,alist)) => s
+ IDENTP x and symbolMember?(x,$PatternVariableList) and (s := findSub(x,alist)) => s
x
[first x,:[fn(y,alist) for y in rest x]]
findSub(x,alist) ==
@@ -448,7 +448,7 @@ substVars(pred,patternAlist,patternVarList) ==
pred := MSUBST(patVar,value,pred)
patternAlist := nsubst(patVar,value,patternAlist)
domainPredicates := MSUBST(patVar,value,domainPredicates)
- if not MEMQ(value,$FormalMapVariableList) then
+ if not symbolMember?(value,$FormalMapVariableList) then
domainPredicates := [["isDomain",patVar,value],:domainPredicates]
everything := [pred,patternAlist,domainPredicates]
for var in $FormalMapVariableList repeat
@@ -744,9 +744,9 @@ isExposedConstructor name ==
-- slot 2: list of constructors explicitly hidden
-- check if it is explicitly hidden
name in '(Union Record Mapping) => true
- MEMQ(name,$localExposureData.2) => false
+ symbolMember?(name,$localExposureData.2) => false
-- check if it is explicitly exposed
- MEMQ(name,$localExposureData.1) => true
+ symbolMember?(name,$localExposureData.1) => true
-- check if it is in an exposed group
found := NIL
for g in $localExposureData.0 while not found repeat
diff --git a/src/interp/define.boot b/src/interp/define.boot
index c1e34171..db663018 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -357,7 +357,7 @@ catExtendsCat?(u,v,uvec) ==
substSlotNumbers(form,template,domain) ==
form is [op,:.] and
- MEMQ(op,allConstructors()) => expandType(form,template,domain)
+ symbolMember?(op,allConstructors()) => expandType(form,template,domain)
form is ['SIGNATURE,op,sig] =>
['SIGNATURE,op,[substSlotNumbers(x,template,domain) for x in sig]]
form is ['CATEGORY,k,:u] =>
@@ -455,7 +455,7 @@ $reservedNames == '(per rep _$)
++ Check that `var' (a variable of parameter name) is not a reversed name.
checkVariableName var ==
- MEMQ(var,$reservedNames) =>
+ symbolMember?(var,$reservedNames) =>
stackAndThrow('"You cannot use reserved name %1b as variable",[var])
var
@@ -546,7 +546,7 @@ compDefine1(form,m,e) ==
$insideWhereIfTrue and isMacro(form,e) and (m=$EmptyMode or m=$NoValueMode)
=> [lhs,m,putMacro(lhs.op,rhs,e)]
checkParameterNames lhs.args
- null signature.target and not MEMQ(KAR rhs,$BuiltinConstructorNames) and
+ null signature.target and not symbolMember?(KAR rhs,$BuiltinConstructorNames) and
(sig:= getSignatureFromMode(lhs,e)) =>
-- here signature of lhs is determined by a previous declaration
compDefine1(['DEF,lhs,[sig.target,:signature.source],specialCases,rhs],m,e)
@@ -592,7 +592,7 @@ hasFullSignature(argl,[target,:ml],e) ==
addEmptyCapsuleIfNecessary: (%Form,%Form) -> %Form
addEmptyCapsuleIfNecessary(target,rhs) ==
- MEMQ(KAR rhs,$SpecialDomainNames) => rhs
+ symbolMember?(KAR rhs,$SpecialDomainNames) => rhs
['add,rhs,['CAPSULE]]
getTargetFromRhs: (%Form, %Form, %Env) -> %Form
@@ -657,7 +657,7 @@ mkEvalableCategoryForm c ==
op="Join" => ["Join",:[mkEvalableCategoryForm x for x in argl]]
op is "DomainSubstitutionMacro" => mkEvalableCategoryForm second argl
op is "mkCategory" => c
- MEMQ(op,$CategoryNames) =>
+ symbolMember?(op,$CategoryNames) =>
([x,m,$e]:= compOrCroak(c,$EmptyMode,$e); m=$Category => x)
--loadIfNecessary op
getConstructorKindFromDB op = 'category or
@@ -912,7 +912,7 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body],
$pairlis: local := pairList(argl,$FormalMapVariableList)
$mutableDomain: local :=
-- all defaulting packages should have caching turned off
- isCategoryPackageName $op or MEMQ($op,$mutableDomains)
+ isCategoryPackageName $op or symbolMember?($op,$mutableDomains)
--true if domain has mutable state
signature':=
[signature.target,:[getArgumentModeOrMoan(a,form,$e) for a in argl]]
@@ -1241,8 +1241,8 @@ compDefWhereClause(['DEF,form,signature,specialCases,body],m,e) ==
orderByDependency(vl,dl) ==
-- vl is list of variables, dl is list of dependency-lists
- selfDependents:= [v for v in vl for d in dl | MEMQ(v,d)]
- for v in vl for d in dl | MEMQ(v,d) repeat
+ selfDependents:= [v for v in vl for d in dl | symbolMember?(v,d)]
+ for v in vl for d in dl | symbolMember?(v,d) repeat
(SAY(v," depends on itself"); fatalError:= true)
fatalError => userError '"Parameter specification error"
until (null vl) repeat
@@ -1766,7 +1766,7 @@ doIt(item,$predl) ==
item.rest := rest code
lhs:= lhs'
if not member(KAR rhs,$NonMentionableDomainNames) and
- not MEMQ(lhs, $functorLocalParameters) then
+ not symbolMember?(lhs, $functorLocalParameters) then
$functorLocalParameters:= [:$functorLocalParameters,lhs]
if code is ["%LET",.,rhs',:.] and isDomainForm(rhs',$e) then
if lhs="Rep" then
@@ -1925,7 +1925,7 @@ makeCategoryForm(c,e) ==
mustInstantiate: %Form -> %Thing
mustInstantiate D ==
D is [fn,:.] and
- not (MEMQ(fn,$DummyFunctorNames) or GET(fn,"makeFunctionList"))
+ not (symbolMember?(fn,$DummyFunctorNames) or GET(fn,"makeFunctionList"))
wrapDomainSub: (%List, %Form) -> %Form
wrapDomainSub(parameters,x) ==
@@ -1951,7 +1951,7 @@ DomainSubstitutionFunction(parameters,body) ==
(body:= Subst(parameters,body)) where
Subst(parameters,body) ==
atom body =>
- MEMQ(body,parameters) => MKQ body
+ symbolMember?(body,parameters) => MKQ body
body
member(body,parameters) =>
g:=gensym()
diff --git a/src/interp/fortcall.boot b/src/interp/fortcall.boot
index 7f47e5a5..17e99819 100644
--- a/src/interp/fortcall.boot
+++ b/src/interp/fortcall.boot
@@ -120,7 +120,7 @@ writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) ==
writeLine('" xdrstdio__create(&xdrs, stdin, XDR__DECODE);",fp)
for a in argList repeat
if LISTP second a then writeMalloc(first a,first second a,rest second a,fp)
- not MEMQ(first a,[:dummies,:asps]) => writeXDR(a,'"&xdrs",fp)
+ not symbolMember?(first a,[:dummies,:asps]) => writeXDR(a,'"&xdrs",fp)
-- now call the Library routine. FORTRAN names may have an underscore
-- appended.
if returnType then
@@ -309,7 +309,7 @@ makeSpadFun(name,userArgs,args,dummies,decls,results,returnType,asps,aspInfo,
nilLst := MAKE_-LIST(#args+1)
decPar := [["$elt","Lisp","construct"],:makeLispList decls]
fargNames := [makeSymbol strconc(STRINGIMAGE(u),'"__arg") for u in args |
- not (MEMQ(u,dummies) or MEMQ(u,asps)) ]
+ not (symbolMember?(u,dummies) or symbolMember?(u,asps)) ]
for u in asps repeat
fargNames := delete(makeSymbol strconc(STRINGIMAGE(u),'"__arg"),fargNames)
resPar := ["construct",["@",["construct",:fargNames],_
@@ -489,7 +489,7 @@ spadify(l,results,decls,names,actual) ==
dims := [getVal(u,names,actual) for u in rest ty]
els := nil
-- Check to see whether we are dealing with a dummy (0-dimensional) array.
- if MEMQ(0,dims) then
+ if scalarMember?(0,dims) then
els := [[]]
else if #dims=1 then
els := [makeVector([fort.i for i in 0..(first(dims)-1)],nil)]
@@ -514,7 +514,7 @@ spadify(l,results,decls,names,actual) ==
els := [makeVector(nreverse middleEls,nil),:els]
else
error ['"Can't cope with output dimensions higher than 3"]
- if not MEMQ(0,dims) then els := makeVector(nreverse els,nil)
+ if not scalarMember?(0,dims) then els := makeVector(nreverse els,nil)
spadForms := [makeResultRecord(name,ty,els), :spadForms]
-- Result is a Boolean Scalar
atom fort and ty="logical" =>
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index fea465c8..cc576cbb 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -323,7 +323,7 @@ setVector12 args ==
freeof($domainShell.4,args1) => nil
[['SetDomainSlots124,'$,['QUOTE,args1],['%list,:args2]]]
where freeof(a,b) ==
- atom a => null MEMQ(a,b)
+ atom a => null symbolMember?(a,b)
freeof(first a,b) => freeof(rest a,b)
false
diff --git a/src/interp/g-cndata.boot b/src/interp/g-cndata.boot
index 96060aef..52d2040a 100644
--- a/src/interp/g-cndata.boot
+++ b/src/interp/g-cndata.boot
@@ -69,7 +69,7 @@ putConstructorProperty(name,prop,val) ==
true
attribute? name ==
- MEMQ(name, $BuiltinAttributes)
+ symbolMember?(name, $BuiltinAttributes)
abbreviation? abb ==
-- if it is an abbreviation, return the corresponding name
@@ -90,7 +90,7 @@ packageForm? d ==
categoryFrom?: %Form -> %Boolean
categoryForm? c ==
op := opOf c
- MEMQ(op, $CategoryNames) => true
+ symbolMember?(op, $CategoryNames) => true
getConstructorKindFromDB op = "category" => true
false
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 2c529ec3..c62882ba 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -464,7 +464,7 @@ $simpleVMoperators ==
++ to the list of operators `ops'.
semiSimpleRelativeTo?(form,ops) ==
atomic? form => true
- not symbol?(form.op) or not MEMQ(form.op,ops) => false
+ not symbol?(form.op) or not symbolMember?(form.op,ops) => false
form.op is '%when =>
and/[sideEffectFree? p and semiSimpleRelativeTo?(c,ops)
for [p,c] in form.args]
@@ -485,7 +485,7 @@ isFloatableVMForm: %Code -> %Boolean
isFloatableVMForm form ==
atom form => form ~= "$"
form is ["QUOTE",:.] => true
- MEMQ(form.op, $simpleVMoperators) and
+ symbolMember?(form.op, $simpleVMoperators) and
"and"/[isFloatableVMForm arg for arg in form.args]
@@ -497,7 +497,7 @@ isVMConstantForm form ==
integer? form or string? form => true
form isnt [op,:args] => false
op in '(%list %pair %vector) => false
- MEMQ(op,$VMsideEffectFreeOperators) and
+ symbolMember?(op,$VMsideEffectFreeOperators) and
"and"/[isVMConstantForm arg for arg in args]
++ Return the set of free variables in the VM form `form'.
@@ -523,7 +523,7 @@ varIsAssigned(var,form) ==
dependentVars expr == main(expr,nil) where
main(x,vars) ==
IDENTP x =>
- MEMQ(x,vars) => vars
+ symbolMember?(x,vars) => vars
[x,:vars]
atomic? x => vars
x' :=
@@ -601,10 +601,10 @@ optLET u ==
continue := false
continue => body
u
- not MEMQ(op,$simpleVMoperators) => u
+ not symbolMember?(op,$simpleVMoperators) => u
not(and/[atomic? arg for arg in args]) => u
-- Inline only if all parameters are used. Get cute later.
- not(and/[MEMQ(x,args) for [x,.] in inits]) => u
+ not(and/[symbolMember?(x,args) for [x,.] in inits]) => u
-- Munge inits into list of dotted-pairs. Lovely Lisp.
for defs in tails inits repeat
def := first defs
diff --git a/src/interp/ht-root.boot b/src/interp/ht-root.boot
index e7ac3df1..563326d9 100644
--- a/src/interp/ht-root.boot
+++ b/src/interp/ht-root.boot
@@ -105,7 +105,7 @@ htSystemVariables() == main where
fn(rest t,gn(first t,al),firstTime)
gn(t,al) ==
[.,.,class,key,.,options,:.] := t
- not MEMQ(class,$levels) => al
+ not symbolMember?(class,$levels) => al
key = 'LITERALS or key = 'INTEGER or key = 'STRING => [[$heading,:t],:al]
key = 'TREE => fn(options,al,false)
key = 'FUNCTION => [[$heading,:t],:al]
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot
index fb0848b7..f9c9d84c 100644
--- a/src/interp/i-analy.boot
+++ b/src/interp/i-analy.boot
@@ -69,14 +69,14 @@ getMinimalVariableTower(var,t) ==
NIL
t is ['Polynomial,.] => t
t is ['RationalFunction,D] => ['Polynomial,D]
- t is [up,t',u,.] and MEMQ(up,$univariateDomains) =>
+ t is [up,t',u,.] and symbolMember?(up,$univariateDomains) =>
-- power series have one more arg and different ordering
u = var => t
getMinimalVariableTower(var,t')
- t is [up,u,t'] and MEMQ(up,$univariateDomains) =>
+ t is [up,u,t'] and symbolMember?(up,$univariateDomains) =>
u = var => t
getMinimalVariableTower(var,t')
- t is [mp,u,t'] and MEMQ(mp,$multivariateDomains) =>
+ t is [mp,u,t'] and symbolMember?(mp,$multivariateDomains) =>
var in u => t
getMinimalVariableTower(var,t')
null (t' := underDomainOf t) => NIL
@@ -167,7 +167,7 @@ pushDownOnArithmeticVariables(op,target,arglist) ==
-- tries to push appropriate target information onto variable
-- occurring in arithmetic expressions
cons?(target) and first(target) = 'Variable => NIL
- not MEMQ(op,'(_+ _- _* _*_* _/)) => NIL
+ not symbolMember?(op,'(_+ _- _* _*_* _/)) => NIL
not containsPolynomial(target) => NIL
for x in arglist for i in 1.. repeat
vector?(x) => -- leaf
diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot
index e179fae8..910613d3 100644
--- a/src/interp/i-coerce.boot
+++ b/src/interp/i-coerce.boot
@@ -491,8 +491,8 @@ canCoerceTopMatching(t1,t2,tt1,tt2) ==
-- canCoerce will only be true if D1 = D2
not sameObject?(tt1,tt2) => 'maybe
doms := '(Polynomial List Matrix FiniteSet Vector Stream Gaussian)
- MEMQ(tt1,doms) => canCoerce(second t1, second t2)
- not (MEMQ(tt1,$univariateDomains) or MEMQ(tt2,$multivariateDomains)) =>
+ symbolMember?(tt1,doms) => canCoerce(second t1, second t2)
+ not (symbolMember?(tt1,$univariateDomains) or symbolMember?(tt2,$multivariateDomains)) =>
'maybe
u2 := deconstructT t2
1 = #u2 => NIL
@@ -692,35 +692,35 @@ absolutelyCannotCoerce(t1,t2) ==
int2 := isEqualOrSubDomain(t2,$Integer)
scalars := '(BigFloat NewFloat Float DoubleFloat RationalNumber)
- MEMQ(n1,scalars) and int2 => true
+ symbolMember?(n1,scalars) and int2 => true
(t1 = QFI) and int2 => true
- num2 := int2 or MEMQ(n2,scalars) or (t2 = QFI)
+ num2 := int2 or symbolMember?(n2,scalars) or (t2 = QFI)
isVar1 := n1 in '(Variable Symbol)
num2 and isVar1 => true
- num2 and MEMQ(n1,$univariateDomains) => true
- num2 and MEMQ(n1,$multivariateDomains) => true
+ num2 and symbolMember?(n1,$univariateDomains) => true
+ num2 and symbolMember?(n1,$multivariateDomains) => true
miscpols := '(Polynomial ElementaryFunction SimpleAlgebraicExtension)
- num2 and MEMQ(n1,miscpols) => true
+ num2 and symbolMember?(n1,miscpols) => true
aggs := '(
Matrix List Vector Stream Array RectangularMatrix FiniteSet
)
u1 := underDomainOf t1
u2 := underDomainOf t2
- MEMQ(n1,aggs) and (u1 = t2) => true
- MEMQ(n2,aggs) and (u2 = t1) => true
+ symbolMember?(n1,aggs) and (u1 = t2) => true
+ symbolMember?(n2,aggs) and (u2 = t1) => true
algs := '(
SquareMatrix Gaussian RectangularMatrix Quaternion
)
nonpols := append(aggs,algs)
- num2 and MEMQ(n1,nonpols) => true
- isVar1 and MEMQ(n2,nonpols) and
+ num2 and symbolMember?(n1,nonpols) => true
+ isVar1 and symbolMember?(n2,nonpols) and
absolutelyCannotCoerce(t1,u2) => true
- (MEMQ(n1,scalars) or (t1 = QFI)) and (t2 = '(Polynomial (Integer))) =>
+ (symbolMember?(n1,scalars) or (t1 = QFI)) and (t2 = '(Polynomial (Integer))) =>
true
v2 := deconstructT t2
@@ -904,7 +904,7 @@ coerceInt1(triple,t2) ==
sameObject?(first(t1),'Variable) and cons?(t2) and
(isEqualOrSubDomain(t2,$Integer) or
- (t2 = [$QuotientField, $Integer]) or MEMQ(first(t2),
+ (t2 = [$QuotientField, $Integer]) or symbolMember?(first(t2),
'(RationalNumber BigFloat NewFloat Float DoubleFloat))) => NIL
ans := coerceRetract(triple,t2) or coerceIntTower(triple,t2) or
@@ -1071,7 +1071,7 @@ valueArgsEqual?(t1, t2) ==
constrSig := rest getConstructorSignature first t1
tl1 := replaceSharps(constrSig, t1)
tl2 := replaceSharps(constrSig, t2)
- not MEMQ(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
diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot
index adbcf313..509b58f9 100644
--- a/src/interp/i-eval.boot
+++ b/src/interp/i-eval.boot
@@ -153,7 +153,7 @@ evaluateType form ==
IDENTP arg => nil
throwKeyedMsg("S2IL0031",nil)
for [arg,:args] in tails argl repeat
- MEMQ(arg,args) => throwKeyedMsg("S2IL0032",[arg])
+ symbolMember?(arg,args) => throwKeyedMsg("S2IL0032",[arg])
form
evaluateFormAsType form
IDENTP form and niladicConstructorFromDB form => evaluateType [form]
diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot
index 1ccb97c0..5b5ed3da 100644
--- a/src/interp/i-funsel.boot
+++ b/src/interp/i-funsel.boot
@@ -443,7 +443,7 @@ defaultTarget(opNode,op,nargs,args) ==
mkRationalFunction D == ['Fraction, ['Polynomial, D]]
defaultTargetFE(a,:options) ==
- a is ['Variable,.] or a = $RationalNumber or MEMQ(a.op,
+ a is ['Variable,.] or a = $RationalNumber or symbolMember?(a.op,
[$Symbol.op, 'RationalRadicals,
'Pi]) or typeIsASmallInteger(a) or isEqualOrSubDomain(a, $Integer) or
a = $AlgebraicNumber =>
@@ -1289,7 +1289,7 @@ evalMmDom(st) ==
string? d => SL:= 'failed
p:= ASSQ(v,SL) and not (d=rest p) => SL:= 'failed
d1:= subCopy(d,SL)
- cons?(d1) and MEMQ(v,d1) => SL:= 'failed
+ cons?(d1) and symbolMember?(v,d1) => SL:= 'failed
SL:= augmentSub(v,d1,SL)
mmC is ['isFreeFunction,v,fun] =>
SL:= augmentSub(v,subCopy(fun,SL),SL)
@@ -1307,7 +1307,7 @@ orderMmCatStack st ==
cat := third s
mem := nil
for v in vars while not mem repeat
- if MEMQ(v,cat) then
+ if symbolMember?(v,cat) then
mem := true
havevars := [s,:havevars]
if not mem then haventvars := [s,:haventvars]
diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot
index dd974b3e..b181b769 100644
--- a/src/interp/i-resolv.boot
+++ b/src/interp/i-resolv.boot
@@ -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
- MEMQ(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 8e029a45..5a7a4607 100644
--- a/src/interp/i-special.boot
+++ b/src/interp/i-special.boot
@@ -808,10 +808,10 @@ checkForFreeVariables(v,locals) ==
null v => v
symbol? v =>
v="$$$" => v -- Placeholder for mini-vector
- MEMQ(v,$boundVariables) => v
+ symbolMember?(v,$boundVariables) => v
p := POSITION(v,$freeVariables) =>
["getSimpleArrayEntry","envArg",positionInVec(p,#($freeVariables))]
- (locals = "ALL") or MEMQ(v,locals) =>
+ (locals = "ALL") or symbolMember?(v,locals) =>
$freeVariables := [v,:$freeVariables]
["getSimpleArrayEntry","envArg",positionInVec(0,#($freeVariables))]
v
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index 4c6b618b..584eeac3 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -1139,7 +1139,7 @@ displayProperties(option,l) ==
displayMacro v
sayMSG '" none"
propsSeen:= nil
- for [prop,:val] in pl | not MEMQ(prop,propsSeen) and val repeat
+ for [prop,:val] in pl | not symbolMember?(prop,propsSeen) and val repeat
prop in '(alias generatedCode IS_-GENSYM mapBody localVars) =>
nil
prop = 'condition =>
@@ -1639,7 +1639,7 @@ writeInputLines(fn,initial) ==
null fn =>
throwKeyedMsg("S2IH0038", nil) -- missing file name
maxn := 72
- breakChars := [" ","+"]
+ breakChars := [char " ",char "+"]
for i in initial..$IOindex - 1 repeat
vecl := first readHiFi i
if string? vecl then vecl := [vecl]
@@ -1650,7 +1650,7 @@ writeInputLines(fn,initial) ==
done := nil
for j in 1..maxn while not done repeat
k := 1 + maxn - j
- MEMQ(vec.k,breakChars) =>
+ charMember?(stringChar(vec,k),breakChars) =>
svec := strconc(subString(vec,0,k+1),UNDERBAR)
lineList := [svec,:lineList]
done := true
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 2bd63c11..67378673 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -49,7 +49,7 @@ $functionLocations := []
NRTgenInitialAttributeAlist attributeList ==
--alist has form ((item pred)...) where some items are constructor forms
alist := [x for x in attributeList | -- throw out constructors
- not MEMQ(opOf first x,allConstructors())]
+ not symbolMember?(opOf first x,allConstructors())]
$lisplibAttributes := simplifyAttributeAlist
[[a,:b] for [a,b] in SUBLIS($pairlis,alist) | a ~= 'nothing]
@@ -637,7 +637,7 @@ Operators u ==
atom u => []
atom first u =>
answer:="union"/[Operators v for v in rest u]
- MEMQ(first u,answer) => answer
+ symbolMember?(first u,answer) => answer
[first u,:answer]
"union"/[Operators v for v in u]
@@ -778,7 +778,7 @@ getSlotFromCategoryForm ([op,:argl],index) ==
isDomainForm(D,e) ==
--added for MPOLY 3/83 by RDJ
- MEMQ(KAR D,$SpecialDomainNames) or isFunctor D or
+ symbolMember?(KAR D,$SpecialDomainNames) or isFunctor D or
-- ((D is ['Mapping,target,:.]) and isCategoryForm(target,e)) or
((getmode(D,e) is ['Mapping,target,:.]) and isCategoryForm(target,e)) or
isCategoryForm(getmode(D,e),e) or isDomainConstructorForm(D,e)
@@ -792,7 +792,7 @@ isFunctor x ==
op:= opOf x
not IDENTP op => false
$InteractiveMode =>
- MEMQ(op,$DomainNames) => true
+ symbolMember?(op,$DomainNames) => true
getConstructorKindFromDB op in '(domain package)
u:= get(op,'isFunctor,$CategoryFrame)
or op in '(SubDomain Union Record Enumeration) => u
diff --git a/src/interp/macex.boot b/src/interp/macex.boot
index 2e8c764d..d25074f6 100644
--- a/src/interp/macex.boot
+++ b/src/interp/macex.boot
@@ -167,7 +167,7 @@ mac0MLambdaApply(mlambda, args, opf, $pfMacros) ==
mac0ExpandBody( body , opf, $macActive, $posActive)
mac0ExpandBody(body, opf, $macActive, $posActive) ==
- MEMQ(body,$macActive) =>
+ symbolMember?(body,$macActive) =>
[.,pf] := $posActive
posn := pfSourcePosition pf
mac0InfiniteExpansion(posn, body, $macActive)
diff --git a/src/interp/modemap.boot b/src/interp/modemap.boot
index 26032507..f6e9b10f 100644
--- a/src/interp/modemap.boot
+++ b/src/interp/modemap.boot
@@ -50,7 +50,7 @@ addDomain(domain,e) ==
domain="$NoValueMode" => e
not IDENTP domain or 2 < #(s:= STRINGIMAGE domain) and
char "#" = stringChar(s,0) and char "#" = stringChar(s,1) => e
- MEMQ(domain,getDomainsInScope e) => e
+ symbolMember?(domain,getDomainsInScope e) => e
isLiteral(domain,e) => e
addNewDomain(domain,e)
(name:= first domain)='Category => e
@@ -604,7 +604,7 @@ actOnInfo(u,$e) ==
genDomainView(name,name,cat,"HasCategory")
-- a domain upgrade at function level is local to that function.
if not $insideCapsuleFunctionIfTrue and
- not MEMQ(name,$functorLocalParameters) then
+ not symbolMember?(name,$functorLocalParameters) then
$functorLocalParameters:=[:$functorLocalParameters,name]
compilerMessage('"augmenting %1: %2p", [name,cat])
$e:= put(name,"value",[vval,mkJoin(cat,vmode),nil],$e)
diff --git a/src/interp/msg.boot b/src/interp/msg.boot
index 95407c1b..1cf335fd 100644
--- a/src/interp/msg.boot
+++ b/src/interp/msg.boot
@@ -450,7 +450,7 @@ isKeyQualityP (key,qual) ==
--% these functions handle the attributes
initImPr msg ==
- $erMsgToss or MEMQ (getMsgTag msg,$imPrTagGuys) =>
+ $erMsgToss or symbolMember? (getMsgTag msg,$imPrTagGuys) =>
setMsgUnforcedAttr (msg,'$imPrGuys,'imPr)
initToWhere msg ==
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 85e471b6..ab55f37d 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -129,7 +129,7 @@ NRTencode(x,y) == encode(x,y,true) where encode(x,compForm,firstTime) ==
-- to be encoded.
op = "Enumeration" => x
["NRTEVAL",NRTreplaceAllLocalReferences COPY_-TREE simplifyVMForm compForm]
- MEMQ(x,$formalArgList) =>
+ symbolMember?(x,$formalArgList) =>
v := $FormalMapVariableList.(POSN1(x,$formalArgList))
firstTime => ["local",v]
v
@@ -248,7 +248,7 @@ NRTgetLocalIndex item ==
k := NRTassocIndex item => k
item = "$" => 0
item = "$$" => 2
- atom item and not MEMQ(item,$formalArgList) => --give slots to atoms
+ atom item and not symbolMember?(item,$formalArgList) => --give slots to atoms
$NRTdeltaList:= [["%domain",NRTaddInner item],:$NRTdeltaList]
$NRTdeltaListComp:=[item,:$NRTdeltaListComp]
index := $NRTbase + $NRTdeltaLength -- slot number to return
@@ -529,7 +529,7 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) ==
argStuffCode :=
[['%store,['%tref,'$,i],v] for i in $NRTbase.. for v in $FormalMapVariableList
for arg in args]
- if MEMQ($NRTaddForm,$locals) then
+ if symbolMember?($NRTaddForm,$locals) then
addargname := $FormalMapVariableList.(POSN1($NRTaddForm,$locals))
argStuffCode := [['%store,['%tref,'$,5],addargname],:argStuffCode]
[['stuffDomainSlots,'$],:argStuffCode,
diff --git a/src/interp/pf2sex.boot b/src/interp/pf2sex.boot
index acc5275a..8629a746 100644
--- a/src/interp/pf2sex.boot
+++ b/src/interp/pf2sex.boot
@@ -202,7 +202,7 @@ pfLiteral2Sex pf ==
symEqual(sym, sym2) == sameObject?(sym, sym2)
-SymMemQ(sy, l) == MEMQ(sy, l)
+SymMemQ(sy, l) == symbolMember?(sy, l)
pmDontQuote? sy ==
SymMemQ(sy, '(_+ _- _* _*_* _^ _/ log exp pi sqrt ei li erf ci si dilog _
diff --git a/src/interp/profile.boot b/src/interp/profile.boot
index e7511eda..2998c438 100644
--- a/src/interp/profile.boot
+++ b/src/interp/profile.boot
@@ -64,7 +64,7 @@ profileRecord(label,name,info) == --name: info is var: type or op: sig
op := 'constructor
argl := nil
opSig := [op]
- if label = 'locals and MEMQ(name,argl) then label := 'arguments
+ if label = 'locals and symbolMember?(name,argl) then label := 'arguments
alist1 := LASSOC(opSig,$profileAlist)
alist2 := LASSOC(label,alist1)
newAlist2 := insertAlist(name,info,alist2)
diff --git a/src/interp/scan.boot b/src/interp/scan.boot
index 7034d2a9..91b7d275 100644
--- a/src/interp/scan.boot
+++ b/src/interp/scan.boot
@@ -430,7 +430,7 @@ scanPossFloat (w)==
scanCloser == [")","}","]","|)","|}","|]"]
-scanCloser? w== MEMQ(keyword w,scanCloser)
+scanCloser? w== symbolMember?(keyword w,scanCloser)
scanSpace()==
n := $n
diff --git a/src/interp/showimp.boot b/src/interp/showimp.boot
index dca66b20..1adb4179 100644
--- a/src/interp/showimp.boot
+++ b/src/interp/showimp.boot
@@ -124,7 +124,8 @@ getDomainSigs(D,:option) ==
getDomainSigs1(D,first option)
getDomainSigs1(D,ops) == listSort(function GLESSEQP,u) where
- u() == [x for x in getDomainOpTable(D,nil) | null ops or MEMQ(first x,ops)]
+ u() == [x for x in getDomainOpTable(D,nil)
+ | null ops or symbolMember?(first x,ops)]
getDomainDocs(D,:option) ==
domname := D.0
@@ -260,7 +261,7 @@ formatLazyDomainForm(dom,x) ==
dc(:r) ==
con := KAR r
options := KDR r
- ok := MEMQ(con,allConstructors()) or (con := abbreviation? con)
+ ok := symbolMember?(con,allConstructors()) or (con := abbreviation? con)
null ok =>
sayBrightly '"Format is: dc(<constructor name or abbreviation>,option)"
sayBrightly
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index 545c7b4d..10754df6 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -438,7 +438,7 @@ compileInteractive fn ==
clearAllSlams x ==
fn(x,nil) where
fn(thoseToClear,thoseCleared) ==
- for x in thoseToClear | not MEMQ(x,thoseCleared) repeat
+ for x in thoseToClear | not symbolMember?(x,thoseCleared) repeat
slamListName:= mkCacheName x
setDynamicBinding(slamListName,nil)
thoseCleared:= ADJOIN(x,thoseCleared)
diff --git a/src/interp/termrw.boot b/src/interp/termrw.boot
index d4f3f0a0..c10eda3a 100644
--- a/src/interp/termrw.boot
+++ b/src/interp/termrw.boot
@@ -72,7 +72,7 @@ termMatch(tp,t,SL,vars) ==
-- then the result is the augmented substitution SL or 'failed
tp=t => SL
atom tp =>
- MEMQ(tp,vars) =>
+ symbolMember?(tp,vars) =>
p:= ASSOC(tp,SL) => ( rest p=t )
[[tp,:t],:SL]
'failed
diff --git a/src/interp/trace.boot b/src/interp/trace.boot
index 7533cbe8..24c59122 100644
--- a/src/interp/trace.boot
+++ b/src/interp/trace.boot
@@ -262,7 +262,7 @@ pcounters() ==
transOnlyOption l ==
l is [n,:y] =>
integer? n => [n,:transOnlyOption y]
- MEMQ(n:= UPCASE n,'(V A C)) => [n,:transOnlyOption y]
+ symbolMember?(n:= UPCASE n,'(V A C)) => [n,:transOnlyOption y]
stackTraceOptionError ["S2IT0006",[n]]
transOnlyOption y
nil
@@ -320,7 +320,7 @@ removeTracedMapSigs untraceList ==
REMPROP(name,$tracedMapSignatures)
coerceTraceArgs2E(traceName,subName,args) ==
- MEMQ(name:= subName,$mathTraceList) =>
+ symbolMember?(name:= subName,$mathTraceList) =>
SPADSYSNAMEP PNAME name => coerceSpadArgs2E(reverse rest reverse args)
[["=",name,objValUnwrap coerceInteractive(objNewWrap(arg,type),$OutputForm)]
for name in '(arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18 arg19 )
@@ -343,7 +343,7 @@ subTypes(mm,sublist) ==
[subTypes(m,sublist) for m in mm]
coerceTraceFunValue2E(traceName,subName,value) ==
- MEMQ(name:= subName,$mathTraceList) =>
+ symbolMember?(name:= subName,$mathTraceList) =>
SPADSYSNAMEP PNAME traceName => coerceSpadFunValue2E(value)
(u:=LASSOC(subName,$tracedMapSignatures)) =>
objValUnwrap coerceInteractive(objNewWrap(value,first u),$OutputForm)
@@ -372,7 +372,7 @@ getPreviousMapSubNames(traceNames) ==
subs:= nil
for mapName in ASSOCLEFT CAAR $InteractiveFrame repeat
lmm:= get(mapName,'localModemap,$InteractiveFrame) =>
- MEMQ(CADAR lmm,traceNames) =>
+ symbolMember?(CADAR lmm,traceNames) =>
for mm in lmm repeat
subs:= [[mapName,:second mm],:subs]
subs
@@ -404,12 +404,12 @@ augmentTraceNames(l,mapSubNames) ==
isSubForRedundantMapName(subName) ==
mapName:= rassocSub(subName,$mapSubNameAlist) =>
tail:=member([mapName,:subName],$mapSubNameAlist) =>
- MEMQ(mapName,rest ASSOCLEFT tail)
+ symbolMember?(mapName,rest ASSOCLEFT tail)
untraceMapSubNames traceNames ==
null($mapSubNameAlist:local:= getPreviousMapSubNames traceNames) => nil
for name in (subs:= ASSOCRIGHT $mapSubNameAlist)
- | MEMQ(name,_/TRACENAMES) repeat
+ | symbolMember?(name,_/TRACENAMES) repeat
_/UNTRACE_,2(name,nil)
$lastUntraced:= SETDIFFERENCE($lastUntraced,subs)
@@ -447,7 +447,7 @@ spadTrace(domain,options) ==
[triple
--new form is (<op> <signature> <slotNumber> <condition> <kind>)
for [op,sig,n,.,kind] in opStructureList | kind = 'ELT
- and (anyifTrue or MEMQ(op,listOfOperations)) and
+ and (anyifTrue or symbolMember?(op,listOfOperations)) and
integer? n and
isTraceable(triple:= [op,sig,n],domain)] where
isTraceable(x is [.,.,n,:.],domain) ==
@@ -498,7 +498,7 @@ traceDomainLocalOps(dom,lops,options) ==
-- l := NIL
-- for lop in lops repeat
-- internalName := makeSymbol strconc(PNAME abb,'";",PNAME lop)
--- not MEMQ(internalName,actualLops) =>
+-- not symbolMember?(internalName,actualLops) =>
-- sayMSG ['" ",:bright abb,'"does not have a local",
-- '" function called",:bright lop]
-- l := [internalName,:l]
@@ -518,7 +518,7 @@ untraceDomainLocalOps(dom,lops) ==
-- l := NIL
-- for lop in lops repeat
-- internalName := makeSymbol strconc(PNAME abb,'";",PNAME lop)
--- not MEMQ(internalName,actualLops) =>
+-- not symbolMember?(internalName,actualLops) =>
-- sayMSG ['" ",:bright abb,'"does not have a local",
-- '" function called",:bright lop]
-- l := [internalName,:l]
@@ -587,14 +587,14 @@ mapLetPrint(x,val,currentFunction) ==
letPrint(x,val,currentFunction) ==
if $letAssoc and
((y:= LASSOC(currentFunction,$letAssoc)) or (y:= LASSOC("all",$letAssoc))) then
- if (y="all" or MEMQ(x,y)) and
+ if (y="all" or symbolMember?(x,y)) and
not (IS__GENVAR(x) or isSharpVarWithNum(x) or GENSYMP x) then
sayBrightlyNT [:bright x,": "]
PRIN1 shortenForPrinting val
TERPRI()
if (y:= hasPair("BREAK",y)) and
- (y="all" or MEMQ(x,y) and
- (not MEMQ(PNAME(x).0,'($ _#)) and not GENSYMP x)) then
+ (y="all" or symbolMember?(x,y) and
+ (not symbolMember?(PNAME(x).0,'($ _#)) and not GENSYMP x)) then
break [:bright currentFunction,'"breaks after",:bright x,'":= ",
shortenForPrinting val]
val
@@ -605,15 +605,15 @@ letPrint2(x,printform,currentFunction) ==
$BreakMode:local := nil
if $letAssoc and
((y:= LASSOC(currentFunction,$letAssoc)) or (y:= LASSOC("all",$letAssoc))) then
- if (y="all" or MEMQ(x,y)) and
+ if (y="all" or symbolMember?(x,y)) and
not (IS__GENVAR(x) or isSharpVarWithNum(x) or GENSYMP x) then
$BreakMode:='letPrint2
flag:=nil
CATCH('letPrint2,mathprint ["=",x,printform],flag)
if flag='letPrint2 then print printform
if (y:= hasPair("BREAK",y)) and
- (y="all" or MEMQ(x,y) and
- (not MEMQ(PNAME(x).0,'($ _#)) and not GENSYMP x)) then
+ (y="all" or symbolMember?(x,y) and
+ (not symbolMember?(PNAME(x).0,'($ _#)) and not GENSYMP x)) then
break [:bright currentFunction,'"breaks after",:bright x,":= ",
printform]
x
@@ -625,14 +625,14 @@ letPrint3(x,xval,printfn,currentFunction) ==
$BreakMode:local := nil
if $letAssoc and
((y:= LASSOC(currentFunction,$letAssoc)) or (y:= LASSOC("all",$letAssoc))) then
- if (y="all" or MEMQ(x,y)) and
+ if (y="all" or symbolMember?(x,y)) and
not (IS__GENVAR(x) or isSharpVarWithNum(x) or GENSYMP x) then
$BreakMode:='letPrint2
flag:=nil
CATCH('letPrint2,mathprint ["=",x,SPADCALL(xval,printfn)],flag)
if flag='letPrint2 then print xval
if (y:= hasPair("BREAK",y)) and
- (y="all" or MEMQ(x,y) and
+ (y="all" or symbolMember?(x,y) and
(not (PNAME(x).0 in '($ _#)) and not GENSYMP x)) then
break [:bright currentFunction,'"breaks after",:bright x,'":= ",
xval]
@@ -646,7 +646,7 @@ getAliasIfTracedMapParameter(x,currentFunction) ==
getBpiNameIfTracedMap(name) ==
lmm:= get(name,'localModemap,$InteractiveFrame) =>
- MEMQ(bpiName:= CADAR lmm,_/TRACENAMES) => bpiName
+ symbolMember?(bpiName:= CADAR lmm,_/TRACENAMES) => bpiName
name
hasPair(key,l) ==
@@ -701,7 +701,7 @@ spadUntrace(domain,options) ==
:bright prefix2String domainId,'"are now traced."]
sigSlotNumberAlist:= rest pair
for (pair:= [op,sig,n,lv,bpiPointer,traceName,alias]) in sigSlotNumberAlist |
- anyifTrue or MEMQ(op,listOfOperations) repeat
+ anyifTrue or symbolMember?(op,listOfOperations) repeat
BPIUNTRACE(traceName,alias)
domain.n.first := bpiPointer
pair.rest.rest.rest := nil
@@ -793,7 +793,7 @@ tracelet(fn,vars) ==
if $letAssoc then SETLETPRINTFLAG true
$TRACELETFLAG : local := true
$QuickLet : local := false
- not MEMQ(fn,$traceletFunctions) and not IS__GENVAR fn and COMPILED_-FUNCTION_-P symbolFunction fn
+ not symbolMember?(fn,$traceletFunctions) and not IS__GENVAR fn and COMPILED_-FUNCTION_-P symbolFunction fn
and not stupidIsSpadFunction fn and not GENSYMP fn =>
($traceletFunctions:= [fn,:$traceletFunctions]; compileBoot fn ;
$traceletFunctions:= delete(fn,$traceletFunctions) )
@@ -814,7 +814,7 @@ breaklet(fn,vars) ==
pair => (pair.rest := vars; $letAssoc)
if $letAssoc then SETLETPRINTFLAG true
$QuickLet:local := false
- not MEMQ(fn,$traceletFunctions) and not stupidIsSpadFunction fn
+ not symbolMember?(fn,$traceletFunctions) and not stupidIsSpadFunction fn
and not GENSYMP fn =>
$traceletFunctions:= [fn,:$traceletFunctions]
compileBoot fn