Aldor and FOAM-USER::|fiRaiseException|

20 views
Skip to first unread message

Grégory Vanuxem

unread,
Jun 3, 2023, 1:35:11 PM6/3/23
to fricas...@googlegroups.com
Hello here,

I have just built the Git Aldor version and rebuilt FriCAS with Aldor support. Aldor from:

But I encounter difficulties to run samples given (fib.as and sieve.as). For example, the sieve.as file (attached). With a FriCAS with Aldor built on top of SBCL I have always this message and the sieve example from Peter Broadbery proposed in a pull request can not be executed:
===========================
)read test

)set bre resume
)co sieve.as

   Compiling FriCAS source code from file /home/greg/Tmp/sieve.as using
      Aldor compiler and options
-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra
      Use the system command )set compiler args to change these
      options.
   Compiling Lisp source code from file ./sieve.lsp
   Issuing )library command for sieve
   Reading /home/greg/Tmp/sieve.asy

)expose UnittestCount UnittestAux Unittest

   UnittestCount is now explicitly exposed in frame initial
   UnittestAux is now explicitly exposed in frame initial
   Unittest is now explicitly exposed in frame initial
testsuite "AldorSmoke"
   All user variables and function definitions have been cleared.

testcase "AldorSmoke1"

   All user variables and function definitions have been cleared.

ee := 8
   (2)  8
ss := sieve 22
   >> System error:
   The function FOAM-USER::|fiRaiseException| is undefined.

   Continuing to read the file...

testEquals(8, sieve 22)
   >> System error:
   The function FOAM-USER::|fiRaiseException| is undefined.

   Continuing to read the file...
====================================

Any ideas what is going on, and how to fix this issue? Or maybe, I should have used the Ralf's Aldor version?

BTW, the ')compile' system command uses the environment variable $ALDOR_COMPILER for .as files. This variable is set in the fricas script that starts FriCAS. I was not aware of this, and I usually use a script $HOME/.local/jlfricas which basically sets the $FRICAS environment variable and starts 'FRICASsys' with 'rlwrap'. I had to look at source code to know the existence of the $ALDOR_COMPILER variable. What about modifying  i-sycmd.boot to directly use the 'aldor' executable if it's in the PATH and $ALDOR_COMPILER is not defined i.e. start FriCAS without the 'fricas' script?
I have attached a patch in case of interest:
================================
@@ -526,9 +526,8 @@
 
     if not beQuiet then sayKeyedMsg("S2IZ0038A", [path, asharpArgs])
 
-    command :=
-       STRCONC(getEnv('"ALDOR_COMPILER"),_
-                     '" ", asharpArgs, '" ", path)
+    acomp := getEnv('"ALDOR_COMPILER") or '"aldor"
+    command := STRCONC(acomp, '" ", asharpArgs, '" ", path)
     rc := OBEY command
 
     if (rc = 0) and doCompileLisp then
==================================

Regards,
__
Greg

PS: If you want to do some quick checks, Aldor X86_64 .deb file produced at 7:00 am today (aldor_1.2.0+20131001_amd64.deb):
https://drive.google.com/file/d/1JA2gVqbBMxNta44H23mSx4LnLgZ2c3pN/view?usp=sharing
You'll probably need to install openjdk-17-jdk since it's what I used to build and produce this Aldor package.
i-syscmd.boot.patch
sieve.as
test.input

Waldek Hebisch

unread,
Jun 3, 2023, 4:38:47 PM6/3/23
to fricas...@googlegroups.com
sieve.as is supposed to work also without Aldor interface. But
after recent changes from '$' to '%' few things get broken. One
fix is commited, but there is second one which still is not
commited.

--
Waldek Hebisch

Grégory Vanuxem

unread,
Jun 3, 2023, 7:39:28 PM6/3/23
to fricas...@googlegroups.com
Go on!

--
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/20230603212113.fgy3p2pgxcudotan%40fricas.math.uni.wroc.pl.

Waldek Hebisch

unread,
Jun 6, 2023, 5:18:19 PM6/6/23
to fricas...@googlegroups.com
On Sun, Jun 04, 2023 at 01:38:43AM +0200, Grégory Vanuxem wrote:
> Go on!

There is branch with proposed changes prepared by Ralf Hemmecke:

https://github.com/hemmecke/fricas/tree/dollar-percent
https://github.com/hemmecke/fricas/commit/e7c4cca1aaa3e24951a9b826ffc0fdf9ab18586b.patch

but it is changing too much (see my message from 15 May 2023 commenting
the changes). Ralf wrote that he will prepare better patch, but there
are no messages from him in last days.

And I still can not build Aldor, so have no way to test changes
involving Aldor interface.

--
Waldek Hebisch

Waldek Hebisch

unread,
Jun 9, 2023, 8:36:10 AM6/9/23
to fricas...@googlegroups.com
On Tue, Jun 06, 2023 at 10:00:45PM +0000, Waldek Hebisch wrote:
> On Sun, Jun 04, 2023 at 01:38:43AM +0200, Grégory Vanuxem wrote:
> > Go on!
>
> There is branch with proposed changes prepared by Ralf Hemmecke:

I have now commited changes from that branch which looked good.
As I wrote, ATM I still can not test Aldor, but Peter and Ralf
say that with the changes one can use at least 'sieve.as'

--
Waldek Hebisch

Ralf Hemmecke

unread,
Jun 10, 2023, 11:08:54 AM6/10/23
to fricas...@googlegroups.com, Peter Broadbery
(with CC to Peter Broadbery)

>> There is branch with proposed changes prepared by Ralf Hemmecke:
>
> I have now commited changes from that branch which looked good.
> As I wrote, ATM I still can not test Aldor, but Peter and Ralf
> say that with the changes one can use at least 'sieve.as'

Sorry, I had to focus on other business.
Thank you, Waldek, for committing the remaining changes.

Unfortunately, one of my testfiles does not compile (attached).

I get the stuff below.

No idea what the problem here is.

Ralf

(8) -> )co funny.as
Compiling FriCAS source code from file
/home/hemmecke/backup/git/fricas-bisect/aldortest/funny.as using
Aldor compiler and options
-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y
$FRICAS/algebra -I $FRICAS/algebra
Use the system command )set compiler args to change these
options.
"/dev/shm/hemmecke/fricas/install/lib/fricas/target/x86_64-linux-gnu/algebra/fricas.as",
line 8:
rep x == x @ % pretend Rep;
.......................^
[L8 C24] #1 (Error) (After Macro Expansion) Argument 2 of `hashUpdate!'
did not match any possible parameter type. The rejected type is Rep.
Expected one of:
-- %
-- Symbol
Expanded expression was: x @ % pretend Rep

The )library system command was not called after compilation.



funny.as

hebisch

unread,
Jun 15, 2023, 4:03:22 PM6/15/23
to fricas...@googlegroups.com
On Sat, Jun 10, 2023 at 05:08:51PM +0200, Ralf Hemmecke wrote:
> Unfortunately, one of my testfiles does not compile (attached).
>
> I get the stuff below.
>
> No idea what the problem here is.
>
> Ralf
>
> (8) -> )co funny.as
> Compiling FriCAS source code from file
> /home/hemmecke/backup/git/fricas-bisect/aldortest/funny.as using
> Aldor compiler and options
> -O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y
> $FRICAS/algebra -I $FRICAS/algebra
> Use the system command )set compiler args to change these
> options.
> "/dev/shm/hemmecke/fricas/install/lib/fricas/target/x86_64-linux-gnu/algebra/fricas.as",
> line 8:
> rep x == x @ % pretend Rep;
> .......................^
> [L8 C24] #1 (Error) (After Macro Expansion) Argument 2 of `hashUpdate!' did
> not match any possible parameter type. The rejected type is Rep.
> Expected one of:
> -- %
> -- Symbol
> Expanded expression was: x @ % pretend Rep

This has nothing to do with Aldor interface. You want 'hashUpdate!'
for Laurent series, but:

L := UnivariateLaurentSeries(FRAC(INT), x, 0)

(1) UnivariateLaurentSeries(Fraction(Integer),x,0)
Type: Type
(2) -> L has Hashable

(2) false
Type: Boolean

'hashUpdate!' is present only in domains having Hashable and since
for series we do not have real equality, they can not be Hashable.

--
Waldek Hebisch

Grégory Vanuxem

unread,
Jun 23, 2023, 11:05:23 AM6/23/23
to fricas...@googlegroups.com
Just tried with FriCAS built on top of SBCL, that worked nicely. Many thanks.

--
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.
Reply all
Reply to author
Forward
0 new messages