aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-12-05 22:46:02 +0000
committerdos-reis <gdr@axiomatics.org>2011-12-05 22:46:02 +0000
commit5a91fcad2db8abc1e9825873034959b3ffe07b18 (patch)
treec322441ceeb5b5ea97aa2b173e36a5b0cbc4357a /src
parent8463a17556bf5cbc2911f4c880a6322d718c2f52 (diff)
downloadopen-axiom-5a91fcad2db8abc1e9825873034959b3ffe07b18.tar.gz
* interp/g-util.boot (splitAssignments): Rework.
(spliceSeqArgs): Tidy. * algebra/gdpoly.spad.pamphlet (GeneralDistributedMultivariatePolynomial): Fix thinko.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/algebra/gdpoly.spad.pamphlet2
-rw-r--r--src/interp/g-util.boot14
3 files changed, 18 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 166df8c5..6f538c3e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2011-12-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/g-util.boot (splitAssignments): Rework.
+ (spliceSeqArgs): Tidy.
+ * algebra/gdpoly.spad.pamphlet
+ (GeneralDistributedMultivariatePolynomial): Fix thinko.
+
+2011-12-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/g-opt.boot (changeVariableDefinitionToStore): Separately
handle %bind and LET forms.
* interp/g-util.boot (spliceSeqArgs): Recurse into %seq forms.
diff --git a/src/algebra/gdpoly.spad.pamphlet b/src/algebra/gdpoly.spad.pamphlet
index 23a6a1f4..64831cf0 100644
--- a/src/algebra/gdpoly.spad.pamphlet
+++ b/src/algebra/gdpoly.spad.pamphlet
@@ -194,7 +194,7 @@ GeneralDistributedMultivariatePolynomial(vl,R,E): public == private where
nlvar:List OV := sort(#1 > #2,Lvar)
nlpval :=
Lvar = nlvar => Lpval
- nlpval := [Lpval.position(mvar,Lvar) for mvar in nlvar]
+ [Lpval.position(mvar,Lvar) for mvar in nlvar]
evalSortedVarlist(p,nlvar,nlpval)
multivariate(p1:SUP(%),v: OV):% ==
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 437c0427..7e15d637 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -68,12 +68,18 @@ mkBind(inits,expr) ==
mkBind([:inits,:inits'],expr')
['%bind,inits,expr]
-splitAssignments u == main(u,nil) where
+++ Given a (possibly multiple) assignment expression `u', return
+++ the list of all assignment sub-expressions that must be evaluated before
+++ effecting the toplevel assignment indicated by `u'. In that case,
+++ modify `u' in place to reflect the new right-hand-side.
+splitAssignments! u == main(u,nil) where
main(u,l) ==
u is ['%LET,x,v] =>
- v is ['%LET,y,.] => main(v,[['%LET,x,y],:l])
- [u,:l]
- nil
+ v is ['%LET,y,.] =>
+ second(u.args) := y
+ [:main(v,l),v]
+ l
+ l
++ We have a list `l' of expressions to be executed sequentially.
++ Splice in any directly-embedded sequence of expressions.