Next: Implementation of ARS++:
Up: ARSAPI:
Previous: ARSAPI:
Contents
ARSAPI for C gets special coverage in the mentioned book and is used
to implement A++ with a rich set of primitive functions in a version that
consists of a compiler and a virtual machine.
In ARSAPI for C three datatypes are of significant importance:
`PRIM', `CLAM' and `LAMB'. They define three different
categories of functions:
- PRIM: Primitive functions in C. These are normal C functions
with a specific argument protocol, so that they can also be used
in AVIM, the virtual machine language in ARS++.
- CLAM: Lambda-Abstraktionen in C.
They represent the core of the implementation of ARS in C.
- Like an `object' is an encapsulation of attributes and methods
in object oriented technology, so is a `clam' an
encapsulation of an abstraction with its total environment,
including attributes and methods. Such a `clam' is a so-called
`first class' object, that can be treated like any other data item:
it can be stored in memory, passed to a function as an argument and
returned as a value from a function.
- LAMB:
A function of this type is a representation of an AVIM lambda
abstraction in C. A lambda abstraction in ARS++ will be translated by the
compiler ACOMP into a function in the machine language AVIM.
The virtual machine language interpreter has to convert this
AVIM function
into an instance of type `LAMB'.
A `lamb' is also a `first class' object.
Next: Implementation of ARS++:
Up: ARSAPI:
Previous: ARSAPI:
Contents