Psi Calculus Noel Welsh (13 Nov 2001 14:14 UTC)
Re: Psi Calculus Jussi Piitulainen (13 Nov 2001 17:22 UTC)

Re: Psi Calculus Jussi Piitulainen 13 Nov 2001 17:22 UTC

Noel Welsh writes:

> The Psi calculus is a calculus of array manipulation, analogous to
> the lambda calculus and functions. I think it should be considered
> as a theoretical basis for srfi-25.

Wonderful. Thank you.

> (e.g. http://www.informatik.uni-kiel.de/~sacbase/array.html)

I looked at this page. It is indeed a close relative and good to know
about. It doesn't provide sharing as a primitive notion. I suppose it
relies on a compiler to avoid a lot of unnecessary copying.

> The implications for srfi-25 are fairly minor - it would basically
> require adding a few more primitive operations to the library. The
> imperative procedure array-set! would then be redundant

I think,

1) modarray single element case in Scheme would _be_ array-set!, not
   make it redundant;

2) reshape is partly provided by share-array and partly not provided
   in current srfi-25; the row major stuff mentioned in Issues would
   provide the latter part;

3) most of the rest is covered by build-array or similar, which might
   be a basic operation in another srfi (it's in Issues now);

> and it will be possible to do a lot of optimisations on array code
> (see, e.g. the SAC papers).

4) there is no way around Scheme being an imperative language with
   runtime typing; static compiler optimisations are not in reach, nor
   is anything restricted to single assignment.
--
Jussi