Hi Peter,

happy new year to you.

I think I need your help, since I am unable to figure out myself where
to continue my search for a real solution to this problem.

Since r2087 (corresponds to:
https://github.com/fricas/fricas/commit/3a1a01ee22ac98ba481431aa7fbee4641ebf0d02
), I cannot build libaxiom.al anymore.

One of the problems that I could "solve" was with this patch:
0001-add-elt-UniversalSegment-Integer-to-LinearAggregate.patch

Solve is in quotes, because I don't think it is the right solution. I
would be surprised that Aldor cannot figure out that there is already
that "elt" function from the fact that the place in the code clearly says:

LinearAggregate(S : Type) : Category ==
  Join(IndexedAggregate(Integer, S), Collection(S),
       Eltable(UniversalSegment Integer, %)) with

https://github.com/fricas/fricas/blob/master/src/algebra/aggcat.spad#L1669

and the "bad" commit just adds the Eltable and removes the "elt" signature.

https://github.com/fricas/fricas/commit/3a1a01ee22ac98ba481431aa7fbee4641ebf0d02#diff-a006d10d2df53763e50b5e289aaf017dR1671

Looking at the generated .ap files also shows that "elt" is correctly
translated into "apply". I'm also a bit helpless with this, but since it
would have an easy workaround, I don't care so much about it. More
problematic is the following.

With the attached patch added on top of r2087, I still run into a
problem that puzzles me, namely:

===============================
trex:~/backup/git/fricas-bisect/b/src/aldor>make -f Makefile2
ao/A1AGG.ao extra_ao_options="-Wname=axiom -Mno-abbrev -Mpreview
-Msource -Mdetails"
DAASE=/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux
FRICAS_INITFILE=''
/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux/bin/AXIOMsys
< ap/A1AGG.lsp > tmp/A1AGG.log
test -f ap/A1AGG.ap
DAASE=/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux
FRICAS_INITFILE=''
/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux/bin/AXIOMsys
< ap/lang.lsp > tmp/lang.log
test -f ap/lang.ap
DAASE=/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux
FRICAS_INITFILE=''
/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux/bin/AXIOMsys
< ap/boolean0.lsp > tmp/boolean0.log
test -f ap/boolean0.ap
DAASE=/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux
FRICAS_INITFILE=''
/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux/bin/AXIOMsys
< ap/minimach.lsp > tmp/minimach.log
test -f ap/minimach.ap
DAASE=/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux
FRICAS_INITFILE=''
/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux/bin/AXIOMsys
< ap/subsetc.lsp > tmp/subsetc.log
test -f ap/subsetc.ap
mkdir -p ao
touch -t 199901010000 ao/.dir
aldor -Wname=axiom -Mno-abbrev -Mpreview -Msource -Mdetails -Y al -L
AxiomLib=axiom_A1AGG -fao=ao/A1AGG.ao ap/A1AGG.ap
#1 (Error) The interpretation of the type expression
          -- Category == Join(UnaryRecursiveAggregate(#1),
LinearAggregate(#1)) with
                        explicitlyFinite?: (%) -> Boolean
                        possiblyInfinite?: (%) -> Boolean
                        default
                                concat(t#1: %, t#2: %): % == dummyDefault
                                concat(t#1: List(% pretend Type)): % ==
dummyDefault
                                concat!(t#1: %, t#2: %): % == dummyDefault
                                apply(t#1: %, t#2:
UniversalSegment(Integer pretend Type)): % == dummyDefault
                                apply(t#1: %, t#2: Integer): #1 ==
dummyDefault
                                explicitlyFinite?(t#1: %): Boolean ==
dummyDefault
                                fill!(t#1: %, t#2: #1): % == dummyDefault
                                first(t#1: %, t#2: NonNegativeInteger):
% == dummyDefault
                                possiblyInfinite?(t#1: %): Boolean ==
dummyDefault
                                set!(t#1: %, t#2:
UniversalSegment(Integer pretend Type), t#3: #1): #1 == dummyDefault
                                set!(t#1: %, t#2: Integer, t#3: #1): #1
== dummyDefault
failed to satisfy the condition that
      --  with  satisfies StreamAggregate(#1)
Makefile2:224: recipe for target 'ao/A1AGG.ao' failed
make: *** [ao/A1AGG.ao] Error 1
rm ao/.dir
======================================================

How can I convince Aldor to tell me exactly the place in the .ap file
that causes this problem?

I have some suspicion that the

failed to satisfy the condition that
      --  with  satisfies StreamAggregate(#1)

is in connection with my initlist.as, but since I don't know what
exactly causes the trouble, it's hard to debug.

Peter, can you give a hint?
If you need more information, please let me know.

Ralf

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
From 1a76bcfdeeb75c6fe4b920230f9e54f2cc0e05aa Mon Sep 17 00:00:00 2001
From: Ralf Hemmecke <[email protected]>
Date: Tue, 3 Jan 2017 15:05:59 +0100
Subject: add "elt : (%, UniversalSegment(Integer)) -> %" to LinearAggregate

---
 src/algebra/aggcat.spad | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/algebra/aggcat.spad b/src/algebra/aggcat.spad
index ede39cc..be68a52 100644
--- a/src/algebra/aggcat.spad
+++ b/src/algebra/aggcat.spad
@@ -1694,6 +1694,10 @@ LinearAggregate(S : Type) : Category ==
      ++ map(f, u, v) returns a new collection w with elements
      ++ \spad{z = f(x, y)} for corresponding elements x and y from u and v.
      ++ Note: for linear aggregates, \spad{w.i = f(u.i, v.i)}.
+   elt : (%, UniversalSegment(Integer)) -> %
+      ++ elt(u, i..j) (also written: \spad{a(i..j)}) returns the aggregate of
+      ++ elements \spad{u} for k from i to j in that order.
+      ++ Note: in general, \spad{a.s = [a.k for i in s]}.
    delete : (%, Integer) -> %
       ++ delete(u, i) returns a copy of u with the \spad{i}th element deleted.
       ++ Note: for lists,
-- 
2.7.4

Reply via email to