The coersion to InputForm produces a lispy representation for most types. E.g. fricas (1) -> )set output tex off fricas )set output algebra on fricas p:POLY INT:=x^2+1 Type: Polynomial(Integer)
fricas pSex:=p::InputForm Type: InputForm
fricas p1:=interpret(pSex) Type: Polynomial(Integer)
But this fails for functions fricas f:INT->INT Type: Void
fricas f(x) == x^2+1 Type: Void
fricas -- force compile f(2) fricas Compiling function f with type Integer -> Integer Type: PositiveInteger?
fricas fSex:=f::InputForm Type: InputForm
So far so good, but fricas f1:=interpret(fSex) ... --kratt6, Fri, 28 Dec 2007 15:10:20 -0800 reply Category: Aldor Library Compiler => Axiom Library
This is a problem with AXIOMs? not making their minds about whether
a map should be treated as a value in its own, or whether it is an expression
that needs further evaluation to yield a value.
The proper fix is to have all user defined maps treated as
values in their owns -- e.g. their representation in the
interpreter environment should be wrapped. However, that requires a
more extensive patch to implement. But, that is the right thing to do.
Severity: normal => minor
|