On 04/04/14 00:48, Ralf Hemmecke wrote:
That still has some parts that need "pretend". Suggestions are welcome
how to remove them.

In fact, I would be happy to separate the "algebraic" transformation
from the one that is connected to type and language. I somehow believe
that the language stuff doesn't need translation boot->spad. Am I wrong?

Ralf

I think it would be really good if the whole interpreter were converted to SPAD. The reason that I say that is that I would like changes to it such as the ability to specify operator precedence per domain. The lack of this is a serious problem which makes Clifford algebra unusable for my purposes. Also both compiler and interpreter need improvements to type system.

I get the impression that the interpreter, as it stands now, is hard to change because small changes are likely to break things in unexpected ways. I'm not just talking about the unpredictable nature of the Pratt compiler but more about the loosely typed and poorly documented code.

I get the impression this might be improved if the interpreter used higher level, better typed structures.

I don't think a line-by-line translation from boot to spad would be good enough, on its own, because the loose typing still remains, its just hidden in SExpression. I think these SExpressions need to be replaced by higher level structures which are properly typed.

For example, in something relatively simple like this:

(1) -> parseFromString("2*3.4")$Lisp

   (1)  (* 2 (($elt (Float) float) 34 - 1 10))
                                                Type: SExpression

we might just get away without high level structures, but when we get to something more complicated like the following, then high level structures would provide proper compile level type checking and avoid a lot of runtime errors. It would also make the whole thing easier to understand.

(2) -> a := mkAtreeWithSrcPos(parseFromString("2*3.4")$Lisp,nil)$Lisp

   (2)
([*,NIL,NIL,NIL,NIL] [--immediateData--,NIL,PositiveInteger()(),NIL,NIL]

     ([Dollar,NIL,NIL,NIL,NIL]  (Float)

       ([float,NIL,NIL,NIL,NIL]
        [--immediateData--,NIL,PositiveInteger()(),NIL,NIL]
        [--immediateData--,NIL,Integer()(),NIL,NIL]
        [--immediateData--,NIL,PositiveInteger()(),NIL,NIL])
       )
     )
                                                 Type: SExpression

Martin

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to