[Aldor-l] Using Aldor or SPAD
Ralf Hemmecke
ralf at hemmecke.de
Sat Aug 19 13:04:06 EDT 2006
> The only thing I know of the Aldor compiler
> is that long time ago my "intern-mate" Yannis was working on it at
> Sophia Antipolis...
Ah, Yannis Chicha worked with you... This world is so small...
> | I think we should not wait any longer. I'm currently interested in two
> | projects:
> |
> | * species, together with Ralf and Nicolas
> |
> | * symmetric functions
> |
> | Both of these projects depend *heavily* on types being first class
> | objects, and on allowing dependent types. Both of these features are
> | missing in SPAD.
>
> Indeed. You have mentioned dependent types many times. I would like
> to know more about what you mean. For example, if we go full
> dependent types, I suspect it would be very difficult to evaluate
> all categories at compile-time. So, I'm interested in the kind of
> dependency you want.
Currently, in aldor-combinat I am going to define something like...
define CombinatorialSpecies(L: LabelType): Category == with {
<<exports: CombinatorialSpecies>>
}
CharacteristicSpecies(n:Integer)(L:LabelType): CombinatorialSpecies L ==
add {
Rep == Set L;
import from Rep;
<<implementation: CharacteristicSpecies>>
}
EmptySetSpecies(L: LabelType): CombinatorialSpecies L == {
CharacteristicSpecies(0$Integer)(L) add;
}
As you see, EmptySetSpecies is a function and its result type depends on
its input type L.
But I think what you mention about categories is not really connected to
dependent or not dependent types. I actually don't know how one can
construct a category at runtime and later use it.
For example,
define Cat: Category == if odd? random() then {with {foo: () -> ()}}
else {with {bar: () -> ()}}
I could define a domain
Dom: Cat == add {
foo(): () == {}
bar(): () == {}
}
But how would I use it? At compile time the compiler cannot decide whether
foo()$Dom;
is actually available.
> [ For example, C++ has dependent types at its "template systems" but
> values are limited to integers and addresses of toplevel entities ]
Could you provide some example code? A link?
> | In fact, there are two things missing in Axiom:
> |
> | 1) a replacement for SPAD that allows one to use the Aldor language
> Can anyone familiar with integrating SPAD with foreign languages
> educate me about the thorny issues?
What exactly do you mean here?
Ralf
More information about the Aldor-l
mailing list