axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] spad: language and compiler


From: Martin Rubey
Subject: Re: [Axiom-developer] spad: language and compiler
Date: 24 Aug 2006 13:16:56 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Gabriel Dos Reis <address@hidden> writes:

> I know Martin has examples for dependent types.  Are those the only things we
> are missing?

Yes:

* types being first class objects, i.e., being able to have a list of Rings.

Examples:

f(m: INT, n: INT): PF n == m::PF(n)

[f(100, n) for n in primes(1,100)]

L := [PF(n) for n in primes(1,100)]

[a::P for P in L]

> My take is that the improvement to the SPAD compiler, first, needs to be
> driven by needs we have for writing Axiom libraries.

If we had dependent types, we could get rid of "Any" in the series
operations. If we have both of the above, Combinat will work in Axiom.

By the way, I think it is more important to make the interpreter understand
these things. Since:

* it would maybe be easier, I guess 

* we have to do it anyway: having the compiler understand won't help since we
                           couldn't use it in the interpreter

                           the aldor interpreter doesn't work too well

* we could use aldor meanwhile

* it will help us understand the issues involved, I guess


> We need a clearer type system and semantics description -- this independently
> of whether we convert to Aldor or not.

As far as I know, the SPAD implementation does not "conflict" with the Aldor
language. I.e., those concepts that are present work just as specified in the
Aldor User Guide.

So, this amounts to clarifying the Aldor User guide. Quite a bit of work has
been done on this side. Consult the archives or ask specific questions on
aldor-devel.

> Jaakko and I are interested in the dependent type system aspect, 

great!

> If people can look at the existing Axiom libraries (of planned libraries)
> souces and say what they would like to express _directly_ -- assuming they
> had the linguistic constructs -- that would help us shape directions for the
> SPAD language and compiler.

I think, that the series stuff in the algebra(SPAD) library and our species
stuff serve as very good examples for the things I personally would like to
have. I would really like you to start on that one :-)

BTW, I think that there is no SPAD language, only a SPAD implementation. There
is however an Aldor language (more or less) and an Aldor
implementation. Fortunately, the SPAD implementation implements a subset (in
some sense) of the Aldor language.

> It is important we aim at "ideal expression", not just limited to what the
> current SPAD or Aldor languages accept (hi Martin, Ralf).

I think that we first need to explore the possibilities of the Aldor language
before we embark to modify it. When we do, I think the thesis of Nic Doye is a
good starting point, as well as FOCAL by Renaud Rioboo and THEOREMA by
Buchberger et al.,

> Of course, we have gotten the lisp problem.  I don't volunteer to
> attack that one yet.  :-/  

for the interpreter I guess that this is nearly a must (or was it BOOT?).Unless
you rewrite it from scratch. In this case, Aldor would be a natural choice, I
guess. Christian has a parser written in Aldor, but you know that.

> However, I have the desire to target not just Lisp, but C, C++ and probably
> Java or C#.  There are interesting problems lurking there, but not none that
> is urgent.

So, that's a point for FOAM :-)

Martin





reply via email to

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