/throwAway

33 views
Skip to first unread message

Grégory Vanuxem

unread,
Jan 27, 2024, 10:09:12 AM1/27/24
to fricas...@googlegroups.com
Hello,

I could not give some code, it's too complicated but maybe that could
help in some way to improve FriCAS. I just encountered that:

>> System error:
The variable |/throwAway| is unbound.

I absolutely do not know where/what it means.

Regards,

- Greg

Grégory Vanuxem

unread,
Jan 27, 2024, 10:10:31 AM1/27/24
to fricas...@googlegroups.com
I forgot, I am pretty sure my Spad code is buggy.

Waldek Hebisch

unread,
Jan 27, 2024, 10:32:06 AM1/27/24
to fricas...@googlegroups.com
Typical reason is an 'if' expression where one of branches
produces no real value. Spad typechecker should catch
such things, but sometimes they propagate to runtime.

This may also happen in Boot code (probably majority of cases).

--
Waldek Hebisch

Grégory Vanuxem

unread,
Jan 27, 2024, 11:06:34 AM1/27/24
to fricas...@googlegroups.com
I don't think so here. I think, but not tested, that this can
reproduce this issue. It's an extremely simple domain with a Rep being
an SExpression and apparently the offending code is:

Rep := SExpression

0 == convert 0
1 == convert 1

And yes, I know that it is not good to use SExpression, like Any is
also not Axiom/FriCAS-ish
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZbUh817txzIGYUrx%40fricas.org.

Waldek Hebisch

unread,
Feb 6, 2024, 8:40:30 PM2/6/24
to fricas...@googlegroups.com
On Sat, Jan 27, 2024 at 05:05:55PM +0100, Grégory Vanuxem wrote:
> I don't think so here. I think, but not tested, that this can
> reproduce this issue. It's an extremely simple domain with a Rep being
> an SExpression and apparently the offending code is:
>
> Rep := SExpression
>
> 0 == convert 0
> 1 == convert 1
>
> And yes, I know that it is not good to use SExpression, like Any is
> also not Axiom/FriCAS-ish

The following:

-----------<cut here>-----------------------------------


)abbrev domain FOO FOO
FOO : with
0 : constant -> %
1 : constant -> %
== add

Rep := SExpression

0 == convert 0
1 == convert 1

-----------<cut here>-----------------------------------

for me works as expected (no error).

--
Waldek Hebisch

Grégory Vanuxem

unread,
Feb 18, 2024, 3:09:22 PM2/18/24
to fricas...@googlegroups.com
Yes, ok. I understand now, thanks!
You enlightened me.

In fact, I played a little with code switching between '==' and '==>'
at several places to define operations. I am used to using the
'Exports == Implementations where etc...' so I guess this was the root
of this. Bad code. Apologize.

In your example you use the:

"FOO : with" construct so it is totally normal after declarations to
define the different operations using the "== add".

It is a pity I no longer remember the piece of code it was. In any
case, if I encounter again this I will give it for information.

- Greg
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZcLfi2j87Cm94TCz%40fricas.org.
Reply all
Reply to author
Forward
0 new messages