Ralf Hemmecke <[EMAIL PROTECTED]> writes:

> > |Interpret| is the following aldor function (a domain, actually):
> > 
> > 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)

   >> System error:
   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=/
_______________________________________________
Aldor-combinat-devel mailing list
Aldor-combinat-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel

Reply via email to