Re: [fricas/fricas] c1dd1e: Generalize ExpressionSpace and FunctionSpace

8 views
Skip to first unread message

Ralf Hemmecke

unread,
May 26, 2024, 2:50:17 AM5/26/24
to fricas-devel
The commit below causes the compilation of the FriCAS-Aldor interface to
fail.

The last lines of the log are...

ar: creating al/libfricas_ES.al
ar: ao/ESC2.ao: No such file or directory
make[1]: *** [cliques.mk:3978: al/libfricas_ES.al] Error 1
rm ao/.dir
make[1]: Leaving directory '/dev/shm/hemmecke/fricas/b/src/aldor'
make: *** [Makefile:440: al/libfricas.al] Error 2

In fact, when I saw this commit, I was a bit surprised that % is allowed
in the arguments of a category. I am not aware that I have seen this
before. Maybe this is not the cause of the problem, but at least it
looks suspicious.

Waldek, I would be more happy if before the commit becomes official, it
is checked locally, whether it breaks the Aldor interface.

Ralf



On 5/26/24 03:12, hebisch wrote:
> Branch: refs/heads/master
> Home: https://github.com/fricas/fricas
> Commit: c1dd1e76d9108a2f6215957e55b540c94a868031
> https://github.com/fricas/fricas/commit/c1dd1e76d9108a2f6215957e55b540c94a868031
> Author: Waldek Hebisch <c...@fricas.org>
> Date: 2024-05-26 (Sun, 26 May 2024)
>
> Changed paths:
> M ChangeLog
> M src/algebra/Makefile.in
> M src/algebra/constant.spad
> M src/algebra/exposed.lsp
> M src/algebra/expr.spad
> M src/algebra/fspace.spad
> M src/interp/i-funsel.boot
>
> Log Message:
> -----------
> Generalize ExpressionSpace and FunctionSpace
>
>
>
> To unsubscribe from these emails, change your notification settings at https://github.com/fricas/fricas/settings/notifications

Ralf Hemmecke

unread,
May 26, 2024, 3:09:42 AM5/26/24
to fricas...@googlegroups.com, Peter Broadbery
I've tried to compile the file directly. It seems that I am right that
Aldor cannot handle % in the arguments of a category. :-(

Peter, do you have any idea what can be done about it?

Ralf

/dev/shm/hemmecke/fricas/b/src/aldor$ make
make -f Makefile2 aldor_srcs="lang minimach boolean0 axextend axlit
subsetc"
GENAX="/home/hemmecke/HDD/ralhex/g/fricas-bisect/fricas/src/aldor/gendepap.lsp"
make[1]: Entering directory
'/home/hemmecke/backup/git/fricas-bisect/build/bug-for-aldor-interface/src/aldor'
mkdir -p ao
touch -t 199901010000 ao/.dir
aldor -Wname=fricas -Mno-abbrev -Mpreview -Y al -L FriCASLib=fricas_ESC2
-fao=ao/ESC2.ao ap/ESC2.ap 2>&1 | tee tmp/ESC2_ao.out
(Message Preview)
"ap/ESC2.ap", line 6:
(|Apply| -> (|Declare| |#1| (|Apply| |KernelCategory| %))
....................................................................^
[L6 C69] #1 (Error) No meaning for identifier `%'.

(Message Preview)
"ap/ESC2.ap", line 123:
|#1|)
........................................^
[L123 C41] #2 (Error) There are 0 meanings for `#1' in this context.
The possible types were:
#1: KernelCategory(%), a local
The context requires an expression of type Tuple(Type).

(Message Preview)
"ap/ESC2.ap", line 123:
|#1|)
........................................^
[L123 C41] #3 (Error) Argument 2 of `->' did not match any possible
parameter type. The rejected type is KernelCategory(%).
Expected type Tuple(Type).

(Message Preview)

#4 (Error) Have determined 1 possible types for the expression.
Meaning 1: KernelCategory(%)
The context requires an expression of type Tuple(Type).

(Message Preview)

#5 (Error) Argument 1 of `->' did not match any possible parameter type.
The rejected type is KernelCategory(%).
Expected type Tuple(Type).

(Message Preview)
"ap/ESC2.ap", line 123:
|#1|)
........................................^
[L123 C41] #6 (Error) There are 0 meanings for `#1' in this context.
The possible types were:
#1: KernelCategory(%), a local
The context requires an expression of type Tuple(Type).

(Message Preview)

#7 (Error) Have determined 1 possible types for the expression.
Meaning 1:
with
== add ()
, KernelCategory(%)
The context requires an expression of type Tuple(Type).

(Message Preview)

#8 (Error) Argument 1 of `->' did not match any possible parameter type.
The rejected type is
with
== add ()
, KernelCategory(%).
Expected type Tuple(Type).

(Message Preview)
"ap/ESC2.ap", line 65:
(|Comma| % (|Apply| |List| |#1|)
..................................................................^
[L65 C67] #9 (Error) Argument 1 of `List' did not match any possible
parameter type. The rejected type is KernelCategory(%).
Expected type Type.

(Message Preview)
"ap/ESC2.ap", line 65:
(|Comma| % (|Apply| |List| |#1|)
..................................................................^
[L65 C67] #10 (Error) Argument 1 of `List' did not match any possible
parameter type. The rejected type is KernelCategory(%).
Expected type Type.

(Message Preview)
"ap/ESC2.ap", line 123:
|#1|)
........................................^
[L123 C41] #11 (Fatal Error) Too many errors (use `-M emax=n' or `-M
no-emax' to change the limit).


#4 (Error) Have determined 1 possible types for the expression.
Meaning 1: KernelCategory(%)
The context requires an expression of type Tuple(Type).
#5 (Error) Argument 1 of `->' did not match any possible parameter type.
The rejected type is KernelCategory(%).
Expected type Tuple(Type).
#7 (Error) Have determined 1 possible types for the expression.
Meaning 1:
with
== add ()
, KernelCategory(%)
The context requires an expression of type Tuple(Type).
#8 (Error) Argument 1 of `->' did not match any possible parameter type.
The rejected type is
with
== add ()
, KernelCategory(%).
Expected type Tuple(Type).

"ap/ESC2.ap", line 6:
(|Apply| -> (|Declare| |#1| (|Apply| |KernelCategory| %))
....................................................................^
[L6 C69] #1 (Error) No meaning for identifier `%'.

"ap/ESC2.ap", line 65:
(|Comma| % (|Apply| |List| |#1|)
..................................................................^
[L65 C67] #9 (Error) Argument 1 of `List' did not match any possible
parameter type. The rejected type is KernelCategory(%).
Expected type Type.

"ap/ESC2.ap", line 123:
|#1|)
........................................^
[L123 C41] #2 (Error) There are 0 meanings for `#1' in this context.
The possible types were:
#1: KernelCategory(%), a local
The context requires an expression of type Tuple(Type).
[L123 C41] #3 (Error) Argument 2 of `->' did not match any possible
parameter type. The rejected type is KernelCategory(%).
Expected type Tuple(Type).
[L123 C41] #6 (Error) There are 0 meanings for `#1' in this context.
The possible types were:
#1: KernelCategory(%), a local
The context requires an expression of type Tuple(Type).
[L123 C41] #11 (Fatal Error) Too many errors (use `-M emax=n' or `-M
no-emax' to change the limit).

ar r al/libfricas_ES.al ao/lang.ao ao/boolean0.ao ao/minimach.ao
ao/subsetc.ao ao/BASTYPE.ao ao/KOERCE.ao ao/init_OUTFORM.ao ao/SETCAT.ao
ao/init_PI.ao ao/ABELSG.ao ao/init_NNI.ao ao/ABELMON.ao ao/ABELGRP.ao
ao/ATFINAG.ao ao/AGG.ao ao/ATTWSR.ao ao/ATCS.ao ao/ATNZDIV.ao
ao/ATSHMUT.ao ao/ATUNIKN.ao ao/CABMON.ao ao/COMPAR.ao ao/init_LIST.ao
ao/IEVALAB.ao ao/init_EQ.ao ao/EVALAB.ao ao/PORDER.ao ao/ORDSET.ao
ao/HOAGG.ao ao/KONVERT.ao ao/init_INFORM.ao ao/CLAGG.ao ao/ELTAB.ao
ao/ELTAGG.ao ao/init_SINT.ao ao/HASHSTAT.ao ao/HASHABL.ao ao/IXAGG.ao
ao/MAGMA.ao ao/MAGMAWU.ao ao/SGROUP.ao ao/MONOID.ao ao/NASRNG.ao
ao/NASRING.ao ao/init_UNISEG.ao ao/LNAGG.ao ao/FLAGG.ao ao/A1AGG.ao
ao/AHYP.ao ao/BGAGG.ao ao/DIOPS.ao ao/DIAGG.ao ao/ELAGG.ao ao/KDAGG.ao
ao/RCAGG.ao ao/URAGG.ao ao/STAGG.ao ao/LSAGG.ao ao/TBAGG.ao ao/ALAGG.ao
ao/ALIST.ao ao/APRODC.ao ao/CHARZ.ao ao/init_OMDEV.ao ao/OM.ao ao/AMR.ao
ao/LIST.ao ao/OASGP.ao ao/OAMON.ao ao/OCAMON.ao ao/OAGROUP.ao
ao/ORDRING.ao ao/SEGCAT.ao ao/SEGXCAT.ao ao/SEG.ao ao/ARR2CAT.ao
ao/ATADDVA.ao ao/ATAPPRO.ao ao/ATARBEX.ao ao/ATARBPR.ao ao/ATCANCL.ao
ao/ATCANON.ao ao/ATCUNOR.ao ao/ATMULVA.ao ao/ATRIG.ao ao/ATVCWC.ao
ao/JOINLAT.ao ao/BJOIN.ao ao/MEETLAT.ao ao/BMEET.ao ao/BLAT.ao ao/LAT.ao
ao/DISTLAT.ao ao/BDISTL.ao ao/FINITE.ao ao/LOGIC.ao ao/BOOLEAN.ao
ao/ORDFIN.ao ao/CHAR.ao ao/SETAGG.ao ao/FSAGG.ao ao/CCLASS.ao
ao/CFCAT.ao ao/CHARNZ.ao ao/DIFRING.ao ao/ELEMFUN.ao ao/LORER.ao
ao/init_SUP.ao ao/GCDDOM.ao ao/PID.ao ao/EUCDOM.ao ao/IPC.ao ao/IDPC.ao
ao/FMCAT.ao ao/HYPCAT.ao ao/KOERCEF.ao ao/init_MATRIX.ao
ao/init_VECTOR.ao ao/LINEXP.ao ao/LZSTAGG.ao ao/OAMONS.ao ao/NNI.ao
ao/NONE.ao ao/OINTDOM.ao ao/PDRING.ao ao/init_DFLOAT.ao ao/init_FLOAT.ao
ao/REAL.ao ao/RETRACT.ao ao/init_SYMBOL.ao ao/SAOS.ao ao/SEXCAT.ao
ao/SPFCAT.ao ao/SRAGG.ao ao/STEP.ao ao/STRICAT.ao ao/STRING.ao
ao/TRIGCAT.ao ao/TRANFUN.ao ao/init_FR.ao ao/UFD.ao ao/MATCAT.ao
ao/VECTCAT.ao ao/VECTOR.ao ao/MATRIX.ao ao/OSGROUP.ao ao/ORDMON.ao
ao/PI.ao ao/SINT.ao ao/STREAM.ao ao/UNISEG.ao ao/axlit.ao ao/axextend.ao
ao/CACHSET.ao ao/KERCAT.ao ao/ESC2.ao ao/KERNEL.ao
ar: creating al/libfricas_ES.al
ar: ao/ESC2.ao: No such file or directory
make[1]: *** [cliques.mk:3978: al/libfricas_ES.al] Error 1
rm ao/.dir
make[1]: Leaving directory
'/home/hemmecke/backup/git/fricas-bisect/build/bug-for-aldor-interface/src/aldor'

Waldek Hebisch

unread,
May 26, 2024, 7:25:09 AM5/26/24
to fricas...@googlegroups.com
On Sun, May 26, 2024 at 08:50:13AM +0200, Ralf Hemmecke wrote:
> The commit below causes the compilation of the FriCAS-Aldor interface to
> fail.
>
> The last lines of the log are...
>
> ar: creating al/libfricas_ES.al
> ar: ao/ESC2.ao: No such file or directory
> make[1]: *** [cliques.mk:3978: al/libfricas_ES.al] Error 1
> rm ao/.dir
> make[1]: Leaving directory '/dev/shm/hemmecke/fricas/b/src/aldor'
> make: *** [Makefile:440: al/libfricas.al] Error 2
>
> In fact, when I saw this commit, I was a bit surprised that % is allowed in
> the arguments of a category. I am not aware that I have seen this before.
> Maybe this is not the cause of the problem, but at least it looks
> suspicious.

I am surprosed that you are surprised. Before commit we had:

K : Kernel(%)

so clearly '%' is allowed as argument inside interface part (that is
export part). Also, the code is essentially equivalent to

ExpressionSpace2(K : Type) : Category == Defn where
...
Defn ==> Type
if K has KernelCategory(%) then
...

which has condition inside. As written code is clearer for people
and having unconditional declaration of K should be easier for
compiler.

To put is differently, I am surprosed that apparently Aldor can not
handle this natural and strightforward construction.

OTOH, if you look at categories you will see that most our categories
have no arguments, and among those having arguments many have trivial
arguments (that is Type). So it is no surprise that there were no
similar example earlier.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages