Discussion:
[fricas-devel] Re: aldor fricas interoperability... call for testers
Ralf Hemmecke
2008-08-05 13:49:46 UTC
Permalink
Hi Martin,

Nice to see that you work hard on this.
(6)
ACIsomorphismType(ACInteger,Interpret([CONCATPlusPARENAGGLSTCONCATNOTHINGSing
letonSpeciesCONCATTimesPARENAGGLSTCONCATNOTHINGSelfCONCATNOTHINGSelf],ACInteg
er))
Type: Domain
[isomorphismTypes(m)$IsoT]$ACList(IsoT)
The value |Interpret| is not of type (SIMPLE-ARRAY T (*)).
-- comment --------------------------------------------------------------------
Interpret(p: List ExpressionTree, L: LabelType): CombinatorialSpecies L == {
import from InterpretingTools, LabelSpecies, List LabelSpecies;
l: LabelSpecies := first interpret p;
(coerce(l)$LabelSpecies)(L) add;
}
Of course, that's a hack to deal with the problem that Axiom treats functions
that return types specially.
But here you are going really really far. We have already discussed it
on the aldor-combinat mailing list.

What you want is that Aldor hopefully produces something reasonable out
of that. Actually, you should have raised this problem during the Aldor
& Axiom Workshop when Stephen was present. It's a pity that we forgot
that. But it seems the Aldor compiler is underspecified in dealing
recursive definitions of domains at runtime.

But wait, your are actually not doing that... well, you have to show the
'interpret' function (lower case).

Ralf

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Martin Rubey
2008-08-05 14:19:46 UTC
Permalink
Interpret(p: List ExpressionTree, L: LabelType): CombinatorialSpecies L == {
import from InterpretingTools, LabelSpecies, List LabelSpecies;
l: LabelSpecies := first interpret p;
(coerce(l)$LabelSpecies)(L) add;
}
Of course, that's a hack to deal with the problem that Axiom treats functions
that return types specially.
But here you are going really really far. We have already discussed it on the
aldor-combinat mailing list.
Well, GCL based FriCAS likes it. Actually, since it's "only" a type error, I
think it should be fixable. And I want the aldor interface to be as robust as
possible. Waldek, Greg, would it help if I recompile the interp directory with
high debug setting?
But wait, your are actually not doing that... well, you have to show the
'interpret' function (lower case).
(only for Ralf, the rest can skip it safely...)

-------------------------------------------------------------------------------
interpret(p: List ExpressionTree): List LabelSpecies == {
import from MachineInteger, LabelSpecies, List LabelSpecies;
A: LabelSpecies == coerce EmptySetSpecies;
res: List LabelSpecies := [A for x in p];
E(i: MachineInteger)(L: LabelType): CombinatorialSpecies(L) ==
(coerce evaluate(p.i, res))(L) add;
for i in 1..#p repeat res.i := coerce E(i);
res;
}
-------------------------------------------------------------------------------

I don't think that this function has much to do with it. Curiously however,

[structures(l)$T]$ACLIST(T)

works. Got it - the problem is elsewhere:

(9) -> S := ACIsomorphismType(ACINT, SetSpecies ACINT)

(9) ACIsomorphismType(ACInteger,SetSpecies ACInteger)
Type: Domain
(10) -> [isomorphismTypes(m)$S]$ACLIST(S)
The value |SetSpecies| is not of type (SIMPLE-ARRAY T (*)).

Here is the definition of ACIsomorphismType (another hack, trying to deal with
functions that return a type...):

ACIsomorphismType(L: LabelType, F: CombinatorialSpecies L):
IsomorphismTypeCategory L == (IsomorphismType$F) add;

(every species F exports an IsomorphismType, which is actually a constant.
FriCAS turns it into a nullary function) Since ordinary fricas functions are
not allowed to return types, I have to provide an accessor type, as above.

Calling

IsoS := IsomorphismType()$SetSpecies(ACINT)

crashes FriCAS.

Martin


NB: Another datapoint: sbcl based aldor interface seems to be *really really*
slow. :-(



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Ralf Hemmecke
2008-08-05 15:11:49 UTC
Permalink
Post by Martin Rubey
(only for Ralf, the rest can skip it safely...)
Only for Martin, the rest can safely skip the following ;-)
Post by Martin Rubey
Here is the definition of ACIsomorphismType (another hack, trying to deal with
IsomorphismTypeCategory L == (IsomorphismType$F) add;
(every species F exports an IsomorphismType, which is actually a constant.
FriCAS turns it into a nullary function) Since ordinary fricas functions are
not allowed to return types, I have to provide an accessor type, as above.
Calling
IsoS := IsomorphismType()$SetSpecies(ACINT)
crashes FriCAS.
Well, I don't know whether any Axiom flavour can deal with it, but you
remember that I don't like that kind of treatment of isomorphism types
in aldor-combinat, anyway. Not yet, at least.

I will try to deal with removing ACList, ACINT, etc. first and then I
might have time to deal with isomorphism types or multisort species.
Hopefully, my computerless vacation time will not come earlier. ;-)

Ralf

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Loading...