diff options
author | dos-reis <gdr@axiomatics.org> | 2008-08-02 13:03:26 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-08-02 13:03:26 +0000 |
commit | 4ac600edddd39335715c053ded118a59c804778d (patch) | |
tree | d60f88eb9626a3a0de210246dcc36198478b5ad0 /src/interp | |
parent | c129ad817cd16aef92f5b433a509e15254b9ccd3 (diff) | |
download | open-axiom-4ac600edddd39335715c053ded118a59c804778d.tar.gz |
* interp/buildom.boot: Use constants by names.
* interp/i-analy.boot: Likewise.
* interp/i-coerfn.boot: Likewise.
* interp/i-funsel.boot: Likewise.
* interp/i-intern.boot: Likewise.
* interp/i-resolv.boot: Likewise.
* interp/i-spec1.boot: Likewise.
* interp/mark.boot: Likewise.
* interp/nrungo.boot: Likewise.
* interp/postpar.boot: Likewise.
* interp/wi1.boot: Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/buildom.boot | 4 | ||||
-rw-r--r-- | src/interp/i-analy.boot | 2 | ||||
-rw-r--r-- | src/interp/i-coerfn.boot | 6 | ||||
-rw-r--r-- | src/interp/i-funsel.boot | 10 | ||||
-rw-r--r-- | src/interp/i-intern.boot | 8 | ||||
-rw-r--r-- | src/interp/i-resolv.boot | 14 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 4 | ||||
-rw-r--r-- | src/interp/mark.boot | 4 | ||||
-rw-r--r-- | src/interp/nrungo.boot | 2 | ||||
-rw-r--r-- | src/interp/postpar.boot | 2 | ||||
-rw-r--r-- | src/interp/wi1.boot | 8 |
11 files changed, 34 insertions, 30 deletions
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot index 12b77b33..13a2de6d 100644 --- a/src/interp/buildom.boot +++ b/src/interp/buildom.boot @@ -342,7 +342,7 @@ mkNewUnionFunList(name,form is ["Union",:listOfEntries],e) == ("append"/ [[["construct",[name,type],["XLAM",["#1"],["CONS",i,"#1"]]], ["elt",[type,name,tag],cdownFun], - ["case",['(Boolean),name,tag], + ["case",[$Boolean,name,tag], ["XLAM",["#1"],["QEQCAR","#1",i]]]] for [.,tag,type] in listOfEntries for i in 0..])] where cdownFun() == @@ -382,7 +382,7 @@ mkUnionFunList(op,form is ["Union",:listOfEntries],e) == [[["autoCoerce",[g,t],upFun], ["coerce",[t,g],cdownFun], ["autoCoerce",[t,g],downFun], --this should be removed eventually - ["case",['(Boolean),g,t],typeFun]] + ["case",[$Boolean,g,t],typeFun]] for p in predList for t in listOfEntries])] where upFun() == p is ["EQCAR",x,n] => ["XLAM",["#1"],["CONS",n,"#1"]] diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index 8bf457d8..d288eb80 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -87,7 +87,7 @@ getMinimalVarMode(id,m) == $Symbol null m => defaultMode (vl := polyVarlist m) and ((id in vl) or 'all in vl) => - SUBSTQ('(Integer),$EmptyMode,m) + SUBSTQ($Integer,$EmptyMode,m) (um := underDomainOf m) => getMinimalVarMode(id,um) defaultMode diff --git a/src/interp/i-coerfn.boot b/src/interp/i-coerfn.boot index 35e60dac..e5d2da93 100644 --- a/src/interp/i-coerfn.boot +++ b/src/interp/i-coerfn.boot @@ -1,5 +1,7 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are @@ -1688,14 +1690,14 @@ P2Us(u, source is [.,S], target is [.,T,var,cen], type) == -- might be able to say yes canCoerce(S,T) T isnt ['Expression, :.] => coercionFailure() - if S ^= '(Float) then S := $Integer + if S ^= $Float then S := $Integer obj := objNewWrap(u, source) E := ['Expression, S] newU := coerceInt(obj, E) null newU => coercionFailure() EQtype := ['Equation, E] eqfun := getFunctionFromDomain('_=, EQtype, [E,E]) - varE := coerceInt(objNewWrap(var, '(Symbol)), E) + varE := coerceInt(objNewWrap(var, $Symbol), E) null varE => coercionFailure() cenE := coerceInt(objNewWrap(cen, T), E) null cenE => coercionFailure() diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot index 261f6d94..01137aca 100644 --- a/src/interp/i-funsel.boot +++ b/src/interp/i-funsel.boot @@ -782,8 +782,8 @@ findFunctionInDomain(op,dc,tar,args1,args2,$Coerce,$SubDom) == -- should go. op = '_= => #args1 ^= 2 or args1.0 ^= dc or args1.1 ^= dc => NIL - tar and tar ^= '(Boolean) => NIL - [[[dc, '(Boolean), dc, dc], ['(Boolean),'$,'$], [NIL, NIL]]] + tar and tar ^= $Boolean => NIL + [[[dc, $Boolean, dc, dc], [$Boolean,'$,'$], [NIL, NIL]]] op = 'coerce => #args1 ^= 1 dcName='Enumeration and (args1.0=$Symbol or tar=dc)=> @@ -944,7 +944,7 @@ matchMmSig(mm,tar,args1,args2) == (STRINGP(x) and (x1 is ['Variable,v]) and (x = PNAME v)) or $SubDom and isSubDomain(x,x1) => rtc:= 'T $Coerce => x2=x or canCoerceFrom(x1,x) - x1 is ['Variable,:.] and x = '(Symbol) + x1 is ['Variable,:.] and x = $Symbol $RTC:= CONS(rtc,$RTC) null args1 and null a and b and matchMmSigTar(tar,CAR sig) @@ -1755,9 +1755,9 @@ defaultTypeForCategory(cat, SL) == cat is [c] => c = 'Field => $RationalNumber c in '(Ring IntegralDomain EuclideanDomain GcdDomain - OrderedRing DifferentialRing) => '(Integer) + OrderedRing DifferentialRing) => $Integer c = 'OrderedSet => $Symbol - c = 'FloatingPointSystem => '(Float) + c = 'FloatingPointSystem => $Float NIL cat is [c,p1] => c = 'FiniteLinearAggregate => ['Vector, p1] diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot index fc2c8145..3116293f 100644 --- a/src/interp/i-intern.boot +++ b/src/interp/i-intern.boot @@ -148,13 +148,13 @@ mkAtree2(x,op,argl) == [mkAtreeNode "COERCE",mkAtree1 first argl,CADR argl] x is ["@", expr, type] => t := evaluateType unabbrev type - t = '(DoubleFloat) and expr is [['_$elt, '(Float), 'float], :args] => - mkAtree1 [['_$elt, '(DoubleFloat), 'float], :args] - t = '(DoubleFloat) and INTEGERP expr => + t = $DoubleFloat and expr is [['_$elt, =$Float, 'float], :args] => + mkAtree1 [['_$elt, $DoubleFloat, 'float], :args] + t = $DoubleFloat and INTEGERP expr => v := mkAtreeNode $immediateDataSymbol putValue(v,getBasicObject float expr) v - t = '(Float) and INTEGERP expr => + t = $Float and INTEGERP expr => mkAtree1 ["::", expr, t] typeIsASmallInteger(t) and INTEGERP expr => mkAtree1 ["::", expr, t] diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot index 1038901c..658ddcec 100644 --- a/src/interp/i-resolv.boot +++ b/src/interp/i-resolv.boot @@ -1,5 +1,7 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are @@ -162,10 +164,10 @@ resolveTTSpecial(t1,t2) == -- things. (RSS 1/-86) -- following is just an efficiency hack - (t1 = '(Symbol) or t1 is ['OrderedVariableList,.]) and PAIRP(t2) and + (t1 = $Symbol or t1 is ['OrderedVariableList,.]) and PAIRP(t2) and CAR(t2) in '(Polynomial RationalFunction) => t2 - (t1 = '(Symbol)) and ofCategory(t2, '(IntegerNumberSystem)) => + (t1 = $Symbol) and ofCategory(t2, '(IntegerNumberSystem)) => resolveTT1(['Polynomial, t2], t2) t1 = '(AlgebraicNumber) and (t2 = $Float or t2 = $DoubleFloat) => @@ -193,23 +195,23 @@ resolveTTSpecial(t1,t2) == resolveTT1($Integer,t2) t1 is ['OrderedVariableList,[x]] => resolveTTSpecial(['Variable, x], t2) t1 is ['OrderedVariableList,vl] => - ofCategory(t2,'(Ring)) => resolveTT(['Polynomial,'(Integer)],t2) + ofCategory(t2,'(Ring)) => resolveTT(['Polynomial,$Integer],t2) resolveTT($Symbol,t2) t1 is ['Variable,x] => EQCAR(t2,'SimpleAlgebraicExtension) => resolveTTSpecial(t2,t1) t2 is ['UnivariatePolynomial,y,S] => x = y => t2 - resolveTT1(['UnivariatePolynomial,x,'(Integer)],t2) + resolveTT1(['UnivariatePolynomial,x,$Integer],t2) t2 is ['Variable,y] => x = y => t1 -- ['OrderedVariableList, MSORT [x,y]] $Symbol - t2 = '(Symbol) => t2 + t2 = $Symbol => t2 t2 is ['Polynomial,.] => t2 t2 is ['OrderedVariableList, vl] and member(x,vl) => t2 isPolynomialMode t2 => nil ofCategory(t2, '(IntegerNumberSystem)) => resolveTT(['Polynomial, t2], t2) - resolveTT(['Polynomial,'(Integer)],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 diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 3679d1be..c0ab9bc5 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -423,8 +423,8 @@ evalCOERCE(op,tree,m) == t2 := if isPartialMode m then - $genValue and (t1 = '(Symbol)) and containsPolynomial m => - resolveTM(['UnivariatePolynomial,objValUnwrap(v),'(Integer)],m) + $genValue and (t1 = $Symbol) and containsPolynomial m => + resolveTM(['UnivariatePolynomial,objValUnwrap(v),$Integer],m) resolveTM(t1,m) else m null t2 => throwKeyedMsgCannotCoerceWithValue(e,t1,m) diff --git a/src/interp/mark.boot b/src/interp/mark.boot index a1266fb3..daba836e 100644 --- a/src/interp/mark.boot +++ b/src/interp/mark.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007, Gabriel Dos Reis. +-- Copyright (C) 2007-2008, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -689,7 +689,7 @@ markCons(i,s) == [[i,:x] for x in s] markPathsEqual(x,y) == x = y => true x is ["::",.,a] and y is ["::",.,b] and - a = '(Integer) and b = '(NonNegativeInteger) => true + a = $Integer and b = $NonNegativeInteger => true y is [fn,.,z] and MEMQ(fn,'(PART CATCH THROW)) and markPathsEqual(x,z) => true y is ['LET,a,b] and GENSYMP a and markPathsEqual(x,b) => true y is ['IF,a,b,:.] and GENSYMP a => markPathsEqual(x,b) -------> ??? diff --git a/src/interp/nrungo.boot b/src/interp/nrungo.boot index 99c302e2..cefb3dbd 100644 --- a/src/interp/nrungo.boot +++ b/src/interp/nrungo.boot @@ -348,7 +348,7 @@ NRTisRecurrenceRelation(op,body,minivectorName) == integer := EVALFUN $Integer iequalSlot:=compiledLookupCheck("=",'((Boolean) $ $),integer) lesspSlot:=compiledLookupCheck("<",'((Boolean) $ $),integer) - bf := '(Boolean) + bf := $Boolean notpSlot:= compiledLookupCheck("not",'((Boolean)(Boolean)),EVALFUN bf) for [p,c] in pcl repeat p is ['SPADCALL,sharpVar,n1,['ELT,=minivectorName,slot]] diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot index 02ca813c..32afc6b3 100644 --- a/src/interp/postpar.boot +++ b/src/interp/postpar.boot @@ -98,7 +98,7 @@ postBigFloat: %ParseTree -> %ParseTree postBigFloat x == [.,mant,:expon] := x eltword := if $InteractiveMode then "$elt" else "elt" - postTran [[eltword,'(Float),"float"],[",",[",",mant,expon],10]] + postTran [[eltword,$Float,"float"],[",",[",",mant,expon],10]] postAdd: %ParseTree -> %ParseForm postAdd x == diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot index bcbf2bda..c1b48904 100644 --- a/src/interp/wi1.boot +++ b/src/interp/wi1.boot @@ -348,8 +348,8 @@ compAtom(x,m,e) == compSymbol(x,m,e) or return nil m = $Expression and primitiveType x => [x,m,e] STRINGP x => - x ^= '"failed" and (member('(Symbol), $localImportStack) or - member('(Symbol), $globalImportStack)) => markAt [x, '(String), e] + x ^= '"failed" and (member($Symbol, $localImportStack) or + member($Symbol, $globalImportStack)) => markAt [x, '(String), e] [x, x, e] [x,primitiveType x or return nil,e] convert(t,m) @@ -791,8 +791,8 @@ resolve(min, mout) == dout := markKillAll mout din=$NoValueMode or dout=$NoValueMode => $NoValueMode dout=$EmptyMode => din - STRINGP din and dout = '(Symbol) => dout ------> hack 8/14/94 - STRINGP dout and din = '(Symbol) => din ------> hack 8/14/94 + STRINGP din and dout = $Symbol => dout ------> hack 8/14/94 + STRINGP dout and din = $Symbol => din ------> hack 8/14/94 din^=dout and (STRINGP din or STRINGP dout) => modeEqual(dout,$String) => dout modeEqual(din,$String) => nil |