aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-05-09 13:10:13 +0000
committerdos-reis <gdr@axiomatics.org>2013-05-09 13:10:13 +0000
commit78a10a3795011b28c3f143512a9b935edbb4e9c9 (patch)
treec6e71c2ec6e607868243a94f478103844fb49aa7
parente688a0421303fb51afe31bb4b36774011bfac76d (diff)
downloadopen-axiom-78a10a3795011b28c3f143512a9b935edbb4e9c9.tar.gz
* interp/i-special.boot (evalIF): Generate OIL intermediate
instruction %otherwise, not Lisp expression T. * interp/slam.boot (isRecurrenceRelation): Likewise.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/i-map.boot6
-rw-r--r--src/interp/i-special.boot6
-rw-r--r--src/interp/slam.boot8
4 files changed, 15 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fd3781d3..73058d5e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * interp/i-special.boot (evalIF): Generate OIL intermediate
+ instruction %otherwise, not Lisp expression T.
+ * interp/slam.boot (isRecurrenceRelation): Likewise.
+
2013-05-08 Gabriel Dos Reis <gdr@integrable-solutions.net>
* algebra/list.spad.pamphlet (List) [copy]: Simplify.
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index 233c41ae..6470fd76 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -86,10 +86,10 @@ addDefMap(['DEF,lhs,mapsig,.,rhs],pred) ==
-- next check is for bad forms on the lhs of the ==, such as
-- numbers, constants.
- -- FIXME: this function miguidedly characterizes constant definitions
+ -- FIXME: this function misguidedly characterizes constant definitions
-- as rules definitions. In particular, typed constant definitions
- -- are characterized are rules in one part, and announced to user
- -- a niladic functions. We try to limit the damage as much as we can.
+ -- are characterized as rules in one part, and announced to user
+ -- as niladic functions. We try to limit the damage as much as we can.
defineeIsConstant := false
if lhs isnt [.,:.] then
diff --git a/src/interp/i-special.boot b/src/interp/i-special.boot
index d8c1abe4..f8d224ed 100644
--- a/src/interp/i-special.boot
+++ b/src/interp/i-special.boot
@@ -1535,12 +1535,12 @@ evalIF(op,[cond,a,b],m) ==
-- generate code form compiled IF
elseCode:=
b="%noMapVal" =>
- [[MKQ true, ["throwKeyedMsg",MKQ "S2IM0018",
+ [['%otherwise, ["throwKeyedMsg",MKQ "S2IM0018",
["CONS",MKQ object2Identifier $mapName,nil]]]]
b='%noBranch =>
- $lastLineInSEQ => [[MKQ true,["voidValue"]]]
+ $lastLineInSEQ => [['%otherwise,["voidValue"]]]
nil
- [[MKQ true,genIFvalCode(b,m)]]
+ [['%otherwise,genIFvalCode(b,m)]]
code:=['%when,[getArgValue(cond,$Boolean),
genIFvalCode(a,m)],:elseCode]
triple:= objNew(code,m)
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index df0384b7..f8c0e4b1 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -50,8 +50,6 @@ isRecurrenceRelation(op,body,minivectorName) ==
-- body should have a conditional expression which
-- gives k boundary values, one general term plus possibly an
-- "out of domain" condition
- --pcl is [:.,[ ''T,:mess]] and not (CONTAINED('throwMessage,mess) or
- -- CONTAINED('throwKeyedMsg,mess)) => nil
pcl := [x for x in pcl | not (x is ['%otherwise,:mess] and
(CONTAINED('throwMessage,mess) or
CONTAINED('throwKeyedMsg,mess)))]
@@ -86,7 +84,7 @@ isRecurrenceRelation(op,body,minivectorName) ==
n:= k+minIndex
--Check general predicate
predOk :=
- generalPred = '%true => true
+ generalPred = '%otherwise => true
generalPred is ['SPADCALL,m,=sharpArg,
["ELT",["%dynval",=MKQ minivectorName],slot]]
and sameObject?(lesspSlot,$minivector.slot)=> m+1
@@ -95,7 +93,7 @@ isRecurrenceRelation(op,body,minivectorName) ==
["ELT",["%dynval",=MKQ minivectorName],notSlot]]
and sameObject?(lesspSlot,$minivector.slot)
and sameObject?(notpSlot,$minivector.notSlot) => m
- generalPred is ['NOT,['SPADCALL,=sharpArg,m,
+ generalPred is ['%not,['SPADCALL,=sharpArg,m,
["ELT",["%dynval",=MKQ minivectorName], =lesspSlot]]]
and sameObject?(lesspSlot,$minivector.slot) => m
return nil
@@ -108,7 +106,7 @@ isRecurrenceRelation(op,body,minivectorName) ==
diffSlot := or/[i for i in 0.. for x in $minivector | sameObject?(x,diffCell)]
or return nil
--Check general term for references to just the k previous values
- sharpPosition := readInteger subString(sharpArg,1)
+ sharpPosition := readInteger subString(symbolName sharpArg,1)
al:= mkDiffAssoc(op,generalTerm,k,sharpPosition,sharpArg,diffSlot,minivectorName)
null al => false
"$failed" in al => false