Wed Apr 8 08:21:23 CEST 2009


The interface consists of:

  1. register namespace
  2. register content representation (for registers containing stacks)

The first part is necessary to decouple the cardinality and order of
the registers in the representation from specification of functionality.

For the second I'm not sure whether datastructures should be limited
to stacks only, in which case the pattern matching becomes simpler.
In all use cases in staapl (*) these are the only two

  (*) registers only: real machine simulation (w. stacks implemented in memory)
      stacks: all scat based machines + forth parser machine

So, the macros are factored in the following way:
  - convert to normal form: this introduces and/or completes clauses
  - convert to binding form

For the latter there should be more than one: simple lambda forms and
match expressions.

So, I have a basic lambda form now:

(machine-lambda #'values                ;; continuation
                '(X Y)                  ;; identifier namespace + order
                #'((X -> (car X))))     ;; update function
=> (lambda (X Y)
     (values (car X) Y))