axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] kTuple wish


From: Martin Rubey
Subject: Re: [Axiom-developer] kTuple wish
Date: 29 Mar 2007 19:37:00 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Dear Ralf,

Ralf Hemmecke <address@hidden> writes:

> Suppose I want to write a domain that takes a finite number of domains
> satisfying a certain category "LabelType".
> 
> I write kTuple instead of Tuple, because the Aldor-Tuple constructor
> is not suitable for what I want. In particular, if
> 
>    T: Tuple PrimitiveType
> 
> then I T = (Integer, String, Boolean, String) would be one possible
> value for T. 

I guess that "I T" should be "T"? 

> However, an element of T is not a Tuple, since T (not its
> type) is non-homogeneous. 

Did you want to say: "an element of T is not a PrimitiveType"? I do not
understand either, in fact:

%1 >> #include "aldor"
                                           Comp: 200 msec, Interp: 40 msec
%2 >> #include "aldorinterp"
                                           Comp: 80 msec, Interp: 0 msec
%3 >> import from Tuple PrimitiveType
                                           Comp: 0 msec, Interp: 0 msec
%4 >> T: Tuple PrimitiveType := (Integer, String, Boolean, String)
  () @ Tuple(PrimitiveType)
                                           Comp: 10 msec, Interp: 60 msec
%5 >> Tuple PrimitiveType
  () @ Join(
 with 
    ==  add ()
, 
 with 
        element: (%, MachineInteger) -> PrimitiveType
        dispose!: % -> ()
        length: % -> MachineInteger
        tuple: (MachineInteger, Pointer) -> %
    ==  add ()
)
                                           Comp: 10 msec, Interp: 80 msec
%6 >> import from MachineInteger
                                           Comp: 30 msec, Interp: 0 msec
%7 >> element(T, machine 1)
  () @ PrimitiveType
                                           Comp: 0 msec, Interp: 30 msec

Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]