diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 12 | ||||
-rw-r--r-- | src/algebra/asp.spad.pamphlet | 24 | ||||
-rw-r--r-- | src/algebra/fortran.spad.pamphlet | 12 | ||||
-rw-r--r-- | src/algebra/moebius.spad.pamphlet | 10 |
4 files changed, 35 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a09aa479..ee195a34 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2008-05-12 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * algebra/asp.spad.pamphlet (Asp30): Don't name local variable as + record field. + (Asp31): Likewise. + (asp34): Likewise. + (Asp77): Likewise. + (Asp8): Likewise. + (Asp9): Likewise. + * algebra/fortran.spad.pamphlet (FortranCode): Likewise. + * algebra/moebius.spad.pamphlet (MoebiusTransform): Likewise. + 2008-05-11 Gabriel Dos Reis <gdr@cs.tamu.edu> Restrict loop variable scopes, take 2. diff --git a/src/algebra/asp.spad.pamphlet b/src/algebra/asp.spad.pamphlet index 7eb29854..b83fcbf5 100644 --- a/src/algebra/asp.spad.pamphlet +++ b/src/algebra/asp.spad.pamphlet @@ -1359,8 +1359,8 @@ Asp30(name): Exports == Implementation where callOne := call("F06PAF('N',M,N,1.0D0,A,M,X,1,1.0D0,Y,1)") callTwo := call("F06PAF('T',M,N,1.0D0,A,M,Y,1,1.0D0,X,1)") c : FC := cond(sw1,callOne,cond(sw2,callTwo)) - code : List FC := [assign(A,a),c,returns()] - ([locals,code]$RSFC)::$ + code' : List FC := [assign(A,a),c,returns()] + ([locals,code']$RSFC)::$ coerce(c:List FortranCode):$ == coerce(c)$Rep @@ -1466,8 +1466,8 @@ Asp31(name): Exports == Implementation where p:List(Symbol) := makeXList(n) jac: MAT FEXPR := jacobian(u,p)$MultiVariableCalculusFunctions(_ Symbol,FEXPR ,VEC FEXPR,List(Symbol)) - code : List FC := [localAssign(PW,jac),returns()$FC]$List(FC) - ([locals,code]$RSFC)::$ + code' : List FC := [localAssign(PW,jac),returns()$FC]$List(FC) + ([locals,code']$RSFC)::$ retract(u:VEC FRAC POLY INT):$ == v : VEC FEXPR := map(retract,u)$VF2(FRAC POLY INT,FEXPR) @@ -1668,8 +1668,8 @@ Asp34(name): Exports == Implementation where 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 - code : List FC := [assign1,assign3,call,assign2,returns()]$List(FC) - ([locals,code]$RSFC)::$ + code' : List FC := [assign1,assign3,call,assign2,returns()]$List(FC) + ([locals,code']$RSFC)::$ coerce(c:List FortranCode):$ == coerce(c)$Rep @@ -3623,8 +3623,8 @@ Asp77(name): Exports == Implementation where dimension := nrows(u)::POLY(INT) locals : SYMTAB := empty() declare!(F,[real,[dimension,dimension]$List(POLY(INT)),false]$FT,locals) - code : List FC := [localAssign(F,u),returns()$FC] - ([locals,code]$RSFC)::$ + code' : List FC := [localAssign(F,u),returns()$FC] + ([locals,code']$RSFC)::$ coerce(c:List FC):$ == coerce(c)$Rep @@ -3943,8 +3943,8 @@ Asp8(name): Exports == Implementation where innerCond : FC := cond("FORWRD"::Symbol::Switch,assign4,assign5) mExp : EX := M@S::EX endCase : FC := cond(EQ([countExp]$EXU,[mExp]$EXU)$Switch,innerCond,assign3) - code := [assign1, assign2, loop, endCase]$List(FC) - ([locals,code]$RSFC)::% + code' := [assign1, assign2, loop, endCase]$List(FC) + ([locals,code']$RSFC)::% @ \section{domain ASP80 Asp80} @@ -4205,8 +4205,8 @@ Asp9(name): Exports == Implementation where assign1 := assign(GOPT1,"NOGOPT")$FC assign2 := assign(GOPT2,"NOGOPT")$FC result := assign(name,expr)$FC - code : List FC := [common1,common2,assign1,assign2,result] - ([locals,code]$RSFC)::Rep + code' : List FC := [common1,common2,assign1,assign2,result] + ([locals,code']$RSFC)::Rep coerce(c:List FortranCode):% == coerce(c)$Rep diff --git a/src/algebra/fortran.spad.pamphlet b/src/algebra/fortran.spad.pamphlet index cf46d763..e4012eeb 100644 --- a/src/algebra/fortran.spad.pamphlet +++ b/src/algebra/fortran.spad.pamphlet @@ -502,8 +502,8 @@ FortranCode(): public == private where operation (f:$):OP == elt(f,op)$Rep - common(name:Symbol,contents:List Symbol):$ == - [["common"]$OP,[[name,contents]$COMMON]$OPREC]$Rep + common(name':Symbol,contents':List Symbol):$ == + [["common"]$OP,[[name',contents']$COMMON]$OPREC]$Rep stop():$ == [["stop"]$OP,["null"]$OPREC]$Rep @@ -520,11 +520,11 @@ FortranCode(): public == private where comment(s:String):$ == [["comment"]$OP,[list s]$OPREC]$Rep - forLoop(r:SegmentBinding PIN,body:$):$ == - [["for"]$OP,[[r,(incr segment r)::PIN,body]$FOR]$OPREC]$Rep + forLoop(r:SegmentBinding PIN,body':$):$ == + [["for"]$OP,[[r,(incr segment r)::PIN,body']$FOR]$OPREC]$Rep - forLoop(r:SegmentBinding PIN,increment:PIN,body:$):$ == - [["for"]$OP,[[r,increment,body]$FOR]$OPREC]$Rep + forLoop(r:SegmentBinding PIN,increment:PIN,body':$):$ == + [["for"]$OP,[[r,increment,body']$FOR]$OPREC]$Rep goto(l:SingleInteger):$ == [["goto"]$OP,[l]$OPREC]$Rep diff --git a/src/algebra/moebius.spad.pamphlet b/src/algebra/moebius.spad.pamphlet index 2185b426..a6b10b66 100644 --- a/src/algebra/moebius.spad.pamphlet +++ b/src/algebra/moebius.spad.pamphlet @@ -58,14 +58,14 @@ MoebiusTransform(F): Exports == Implementation where Implementation ==> add - Rep := Record(a: F,b: F,c: F,d: F) + Rep := Record(a': F,b': F,c': F,d': F) moebius(aa,bb,cc,dd) == [aa,bb,cc,dd] - a(t:%):F == t.a - b(t:%):F == t.b - c(t:%):F == t.c - d(t:%):F == t.d + a(t:%):F == t.a' + b(t:%):F == t.b' + c(t:%):F == t.c' + d(t:%):F == t.d' 1 == moebius(1,0,0,1) t * s == |