diff options
author | dos-reis <gdr@axiomatics.org> | 2008-12-20 18:13:38 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-12-20 18:13:38 +0000 |
commit | 93853a12aba78b695405d9275f9ab56b01ec4269 (patch) | |
tree | a4bf53b6d33d0e96ad9eede28d94b14b6fda2f59 /src/interp | |
parent | 70962cd1ef47767d4cb623a129b5c955a5aec41e (diff) | |
download | open-axiom-93853a12aba78b695405d9275f9ab56b01ec4269.tar.gz |
* interp/i-analy.boot (elaborateForm): New.
* interp/i-spec2.boot (uphas): Use it. Evaluate first operand.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/i-analy.boot | 6 | ||||
-rw-r--r-- | src/interp/i-spec2.boot | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index 84518d51..1541fbc7 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -207,6 +207,12 @@ pushDownOp?(op,n) == -- Also see I-SPEC BOOT for special handlers and I-MAP BOOT for -- user function processing. +++ Take a parse form and return the VAT for its elaboration. +elaborateForm pf == + t := mkAtree1 pf + bottomUp t + t + bottomUp t == -- bottomUp takes an attributed tree, and returns the modeSet for it. -- As a side-effect it also evaluates the tree. diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot index 43be7dd2..5b3742ee 100644 --- a/src/interp/i-spec2.boot +++ b/src/interp/i-spec2.boot @@ -210,19 +210,19 @@ uphas t == t isnt [op,type,prop] => nil -- handler for category and attribute queries type := - isLocalVar(type) => - $genValue => ["evaluateType", ["unabbrev", type]] - -- At this point, type will have already been reduced to - -- its object representation. - ["devaluate", type] - MKQ unabbrev type + x := elaborateForm type + getModeSet x is [m] and (conceptualType m = $Type or categoryForm? m) => + val := objValUnwrap getValue x + $genValue => MKQ val + ["devaluate",val] + throwKeyedMsg("S2IE0021",[type]) catCode := -- FIXME: when we come to support category valued variable -- this code needs to be adapted. prop := unabbrev prop evaluateType0 prop => ["evaluateType", MKQ prop] MKQ prop - code:=["newHasTest",type, catCode] + code := ["NOT",["NULL",["newHasTest",type, catCode]]] if $genValue then code := wrap timedEVALFUN code putValue(op,objNew(code,$Boolean)) putModeSet(op,[$Boolean]) |