diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/any.spad.pamphlet | 22 | ||||
-rw-r--r-- | src/algebra/asp.spad.pamphlet | 40 | ||||
-rw-r--r-- | src/algebra/d01routine.spad.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/functions.spad.pamphlet | 10 | ||||
-rw-r--r-- | src/algebra/groebsol.spad.pamphlet | 1 | ||||
-rw-r--r-- | src/algebra/lodop.spad.pamphlet | 12 |
6 files changed, 41 insertions, 46 deletions
diff --git a/src/algebra/any.spad.pamphlet b/src/algebra/any.spad.pamphlet index d4c44f11..a887307c 100644 --- a/src/algebra/any.spad.pamphlet +++ b/src/algebra/any.spad.pamphlet @@ -268,7 +268,7 @@ import SExpression ++ Date Last Modified: January 18, 2008. ++ An `Property' is a pair of name and value. Property(): Public == Private where - Public ==> CoercibleTo(OutputForm) with + Public == CoercibleTo(OutputForm) with name: % -> Symbol ++ name(p) returns the name of property p value: % -> SExpression @@ -277,12 +277,9 @@ Property(): Public == Private where ++ property(n,val) constructs a property with name `n' and ++ value `val'. - Private ==> add - rep(x: %): SExpression == - x pretend SExpression - - per(x: SExpression): % == - x pretend % + Private == add + import Boolean + Rep == SExpression name x == -- Note: It is always well defined to take the `car' here @@ -298,11 +295,10 @@ Property(): Public == Private where coerce x == v := value x - val: OutputForm - if null? v then val := false::OutputForm - else if EQ(v, true)$Lisp : Boolean - then val := true::OutputForm - else val := v::OutputForm + val := + null? v => false::OutputForm + EQ(v,'T)$Lisp => true::OutputForm + v::OutputForm bracket(infix(outputForm '_=_>, outputForm name x, val)$OutputForm)$OutputForm @@ -523,7 +519,7 @@ Environment(): Public == Private where <<license>>= --Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. --All rights reserved. ---Copyright (C) 2007-2008, Gabriel Dos Reis. +--Copyright (C) 2007-2009, Gabriel Dos Reis. --All rights reserved. -- --Redistribution and use in source and binary forms, with or without diff --git a/src/algebra/asp.spad.pamphlet b/src/algebra/asp.spad.pamphlet index e5f2b900..e2706808 100644 --- a/src/algebra/asp.spad.pamphlet +++ b/src/algebra/asp.spad.pamphlet @@ -1635,19 +1635,19 @@ Asp34(name): Exports == Implementation where real : UFST := ["real"::FST]$UFST integer : UFST := ["integer"::FST]$UFST syms : SYMTAB := empty()$SYMTAB - declare!(IFLAG,fortranInteger(),syms)$SYMTAB - declare!(N,fortranInteger(),syms)$SYMTAB - xType : FT := construct(real,[N],false)$FT - declare!(X,xType,syms)$SYMTAB - declare!(Y,xType,syms)$SYMTAB - declare!(LRWORK,fortranInteger(),syms)$SYMTAB - declare!(LIWORK,fortranInteger(),syms)$SYMTAB - rType : FT := construct(real,[LRWORK],false)$FT - declare!(RWORK,rType,syms)$SYMTAB - iType : FT := construct(integer,[LIWORK],false)$FT - declare!(IWORK,iType,syms)$SYMTAB + declare!('IFLAG,fortranInteger(),syms)$SYMTAB + declare!('N,fortranInteger(),syms)$SYMTAB + xType : FT := construct(real,['N],false)$FT + declare!('X,xType,syms)$SYMTAB + declare!('Y,xType,syms)$SYMTAB + declare!('LRWORK,fortranInteger(),syms)$SYMTAB + declare!('LIWORK,fortranInteger(),syms)$SYMTAB + rType : FT := construct(real,['LRWORK],false)$FT + declare!('RWORK,rType,syms)$SYMTAB + iType : FT := construct(integer,['LIWORK],false)$FT + declare!('IWORK,iType,syms)$SYMTAB Rep := FortranProgram(name,["void"]$UFST, - [IFLAG,N,X,Y,RWORK,LRWORK,IWORK,LIWORK],syms) + ['IFLAG,'N,'X,'Y,'RWORK,'LRWORK,'IWORK,'LIWORK],syms) -- To help the poor old compiler localAssign(s:Symbol,u:EXI):FC == assign(s,u)$FC @@ -1655,15 +1655,15 @@ Asp34(name): Exports == Implementation where coerce(u:Matrix MachineFloat):$ == dimension := nrows(u) ::Polynomial Integer locals : SYMTAB := empty()$SYMTAB - declare!(I,fortranInteger(),syms)$SYMTAB - declare!(J,fortranInteger(),syms)$SYMTAB - declare!(W1,[real,[dimension],false]$FT,locals)$SYMTAB - declare!(W2,[real,[dimension],false]$FT,locals)$SYMTAB - declare!(MS,[real,[dimension,dimension],false]$FT,locals)$SYMTAB - assign1 : FC := localAssign(IFLAG@Symbol,(-1)@EXI) + declare!('I,fortranInteger(),syms)$SYMTAB + declare!('J,fortranInteger(),syms)$SYMTAB + declare!('W1,[real,[dimension],false]$FT,locals)$SYMTAB + declare!('W2,[real,[dimension],false]$FT,locals)$SYMTAB + declare!('MS,[real,[dimension,dimension],false]$FT,locals)$SYMTAB + assign1 : FC := localAssign('IFLAG,(-1)@EXI) call : FC := call("F04ASF(MS,N,X,N,Y,W1,W2,IFLAG)")$FC - assign2 : FC := localAssign(IFLAG::Symbol,-(IFLAG@Symbol::EXI)) - assign3 : FC := assign(MS,u)$FC + assign2 : FC := localAssign('IFLAG,-('IFLAG::EXI)) + assign3 : FC := assign('MS,u)$FC code' : List FC := [assign1,assign3,call,assign2,returns()]$List(FC) ([locals,code']$RSFC)::$ diff --git a/src/algebra/d01routine.spad.pamphlet b/src/algebra/d01routine.spad.pamphlet index c3b04127..9733ea0a 100644 --- a/src/algebra/d01routine.spad.pamphlet +++ b/src/algebra/d01routine.spad.pamphlet @@ -607,7 +607,7 @@ d01gbfAnnaType(): NumericalIntegrationCategory == Result add nia:NIA := [vars.i,args.fn,segs.i,args.abserr,rel] not rangeIsFinite(nia) case finite => return [0.0,"d01gbf is not a suitable routine for infinite integrals",ext] - [getMeasure(R,d01gbf@S)$RT, "Recommended is d01gbf", ext] + [getMeasure(R,'d01gbf)$RT, "Recommended is d01gbf", ext] numericalIntegration(args:MDNIA,hints:Result) == import Integer diff --git a/src/algebra/functions.spad.pamphlet b/src/algebra/functions.spad.pamphlet index 5dff2a13..f48391f2 100644 --- a/src/algebra/functions.spad.pamphlet +++ b/src/algebra/functions.spad.pamphlet @@ -63,11 +63,11 @@ BasicFunctions(): E == I where cotEntry:RS := [n1dpi, n3dpi, ndpi] logEntry:RS := [construct([1$DF])$SDF,esdf, construct([0$DF])$SDF] entryList:List(Record(key:Symbol,entry:RS)) := - [[sin@Symbol, sinEntry], [cos@Symbol, cosEntry], - [tan@Symbol, tanEntry], [sec@Symbol, secEntry], - [csc@Symbol, cscEntry], [cot@Symbol, cotEntry], - [asin@Symbol, asinEntry], [acos@Symbol, acosEntry], - [atan@Symbol, atanEntry], [log@Symbol, logEntry]] + [['sin, sinEntry], ['cos, cosEntry], + ['tan, tanEntry], ['sec, secEntry], + ['csc, cscEntry], ['cot, cotEntry], + ['asin, asinEntry], ['acos, acosEntry], + ['atan, atanEntry], ['log, logEntry]] construct(entryList)$Rep bfKeys():List Symbol == keys(bf())$Rep diff --git a/src/algebra/groebsol.spad.pamphlet b/src/algebra/groebsol.spad.pamphlet index b689d991..33ebeff5 100644 --- a/src/algebra/groebsol.spad.pamphlet +++ b/src/algebra/groebsol.spad.pamphlet @@ -57,6 +57,7 @@ GroebnerSolve(lv,F,R) : C == T ++ in general position, for system lp in variables lv. T == add + import Boolean import PolToPol(lv,F) import GroebnerPackage(F,DP,OV,DPoly) import GroebnerInternalPackage(F,DP,OV,DPoly) diff --git a/src/algebra/lodop.spad.pamphlet b/src/algebra/lodop.spad.pamphlet index a2a8d35a..6f23a155 100644 --- a/src/algebra/lodop.spad.pamphlet +++ b/src/algebra/lodop.spad.pamphlet @@ -91,13 +91,11 @@ OppositeMonogenicLinearOperator(P, R): OPRcat == OPRdef where po: $ -> P ++ po(q) creates a value in P equal to q in $. OPRdef == P add - Rep := P - x, y: $ - a: P - op a == a: $ - po x == x: P - x*y == (y:P) *$P (x:P) - coerce(x): OutputForm == prefix(op::OutputForm, [coerce(x:P)$P]) + Rep == P + op a == per a + po x == rep x + (x: %) * (y: %) == per(rep(y) * rep(x)) + coerce(x): OutputForm == prefix(op::OutputForm, [coerce rep x]) @ \section{package NCODIV NonCommutativeOperatorDivision} |