Discussion:
[fricas-devel] There are questions one should not ask...
Riccardo GUIDA
2018-06-26 14:35:19 UTC
Permalink
(18) -> typeOf(())
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
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.

PROCEED WITH CAUTION.

(18) -> typeOf ()
INFO: Control stack guard page reprotected
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
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.

PROCEED WITH CAUTION.

(18) ->
--
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 fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
oldk1331
2018-07-12 03:02:53 UTC
Permalink
Clearly "typeOf" can only handle 1 argument, following patch should
fix this bug, but I wonder if there are better ways of error handling
than "error".

diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot
index b82cae83..15249526 100644
--- a/src/interp/i-spec2.boot
+++ b/src/interp/i-spec2.boot
@@ -1057,7 +1057,7 @@
--% Handler for typeOf

uptypeOf form ==
- form isnt [op, arg] => NIL
+ form isnt [op, arg] => error "typeOf: 1 argument required"
if VECP arg then transferPropsToNode(getUnname arg,arg)
if m := isType(arg) then
m :=

Also the unrelated "typeOf" in fortran.spad can be deleted:

diff --git a/src/algebra/fortran.spad b/src/algebra/fortran.spad
index f055b260..e9e04235 100644
--- a/src/algebra/fortran.spad
+++ b/src/algebra/fortran.spad
@@ -1228,8 +1228,6 @@ SimpleFortranProgram(R, FS) : Exports ==
Implementation where

nameOf(u : %) : Symbol == u . name

- typeOf(u:%):Union(FST,"void") == u . type
-
bodyOf(u : %) : FS == u . body

argumentsOf(u : %) : List Symbol == variables(bodyOf u)$FS


On Tue, Jun 26, 2018 at 10:35 PM, Riccardo GUIDA
Post by Riccardo GUIDA
(18) -> typeOf(())
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
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.
PROCEED WITH CAUTION.
(18) -> typeOf ()
INFO: Control stack guard page reprotected
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
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.
PROCEED WITH CAUTION.
(18) ->
--
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
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
--
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 fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...