Axiom/FriCAS Interpreter Evaluate

This is part of some experimental code that I am writing to implement the FriCAS interpreter using SPAD code. For an overview of this experiment see page here. For information about how this is done using the current boot/lisp code see the page here.

The last stage (the type matcher) has generated an typed tree of values. Here we need to evaluate where possible.

Not sure how to do this.

From i-eval.boot:

(1) -> evalDomain(Integer)$Lisp

INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
   >> System error:
   Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.


(1) -> evaluateType(Integer)$Lisp

   (1)  ()
                                                            Type: SExpression
(2) -> evaluateType(1)$Lisp      

   (2)  ()
                                                            Type: SExpression
(3) -> 


(1) -> a:SExpression := 1

   (1)  1
                                                            Type: SExpression
(2) -> b:SExpression := 2

   (2)  2
                                                            Type: SExpression
(3) -> FUNCALL(*,a)$Lisp

   (3)  1
                                                            Type: SExpression
(4) -> FUNCALL(*,a,b)$Lisp

   (4)  2
                                                            Type: SExpression
(6) -> FUNCALL(+,a,b)$Lisp

   (6)  3
                                                            Type: SExpression
(7) -> 


Next step

The output of this evaluater is passed to the formatter as discussed on the page here.


metadata block
see also:
Correspondence about this page

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.