[Aldor-l] Using Aldor or SPAD

Martin Rubey martin.rubey at univie.ac.at
Sun Aug 20 05:14:06 EDT 2006


Ralf Hemmecke <ralf at hemmecke.de> writes:

> 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.

Well, isn't it (currently) possible to ask:

  if Dom has foo then ...

> The final goal for species is to work with them interactively. So I don't
> care if the interpreter in the middle of the session starts the compiler to
> produce some efficient code for me, but it should be possible to produce a
> "sufficiently efficient" standalone program.

Please note that I did write an Aldor program that takes a list of strings (the
specification of a grammar) and that produces the corresponding domain. Thus, I
think that

> And, in particular for species there seems to be need to call the compiler.

is incorrect. To look at it, get 

svn://svn.risc.uni-linz.ac.at/hemmecke/combinat/branches/experiments/rubey

Again:

> In general one would have a set of such recursive "equations". Writing my own
> interpreter for that must invoke the compiler. 

I think that this is not correct. The code is in uc.as.nw

Martin




More information about the Aldor-l mailing list