Next: 3.1.4 unor
Up: 3.1 The extron transformers
Previous: 3.1.2 untype
unmacro is a transformation tool that handles various predefined
as well as user-defined macros.
User-defined macros are declared with declare facts (see section
3.1.1). Since the syntactic transformation performed by
these macros is defined via COMMON LISP functional objects, using them
is not encouraged und thus not further described in this paper.
The following macros are predefined:
- progn simply denotes an inline conjunction of expressions,
returning the value of the last one (analogously to LISP); unmcaro
transforms it into a simple lambda application, which will be
removed by hitrans (see section 3.1.6):
- let creates a context with local ( ) and auxiliary variables
( ) in which some premises ( ) are evaluated:
(let (( ) ... ( )
... ) ... )
Its meaning is identical to that in COMMON LISP; it is, analogously
to progn, translated into lambda expressions.
- let*, just like let, creates a local context, but
does not evaluate the expressions in parallel but sequentially
(just like its COMMON LISP counterpart), thus allowing any
to access any with .
- new-once is the new version of once used in
compiled RELFUN which allows multiple expressions, returning the
value of the last one, which are enclosed
in a single lambda expression:
- naf is handled analogously to new-once:
- tupof is handled analogously to new-once:
- ``!'' is transformed into an active call, (cut), in order
to simplify the vertical compiler:
- type1 is expanded to type with an anonymous variable:
The following examples show how let and let* are transformed
into lambda applications. Since we did not yet develop a PROLOG-like
syntax for these constructs, only the LISP-like syntax is shown.
Harold Boley (email@example.com)