There are questions one should not ask...

24 views
Skip to first unread message

Riccardo GUIDA

unread,
Jun 26, 2018, 10:35:21 AM6/26/18
to fricas...@googlegroups.com
(18) -> typeOf(())
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.

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

>> 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.

PROCEED WITH CAUTION.

(18) ->

oldk1331

unread,
Jul 11, 2018, 11:02:55 PM7/11/18
to fricas-devel
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
> --
> 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.
Reply all
Reply to author
Forward
0 new messages