Mon Oct 5 15:50:00 CEST 2009

2-level semantics

Concrete: whenever an identifier appears as a literal in a syntax-case
expression, it has a compile-time semantics thats _not_ programmable.

There is a subtle difference between this, and providing a syntax
binding for the identifier.  The latter allows for lexical scope.

Currently, using syntax case with identifiers for normalizing
arithmetic expressions is probably good enough.


  While writing an (algebraic) meta-processing language, some of the
  identifiers (operators) have a compile-time semantics (i.e. the
  associativity law which allows re-arranging expressions, and has
  little meaning at run time, when the program has lost all its
  mathematical meaning and is merely a sequence of instructions for a
  serial/parallel computer.)

  In short, `+' and `*' are _not_ scheme!  They have two identities
  that should be distinguished with the utmost care: at compile time
  they are _formal_, and are there _only_ to steer formula
  transformation.  At run time they are functions that operate on
  values.  Once this separation is clear, it is possible to start
  being flexible with the idea of "run time" : if some of the run-time
  reductions/operations can be performed in a separate transformation
  stage, further reductions are possible.

  On the other hand, variables might be scheme (i.e. they should
  respect hygiene).  However, they are quite type-restricted: the
  compile time transformation (formal manipulation) needs to be
  compatible with the run-time semantics (model theory).