Translating Domain Definitions
The metaprocessor is a key component of the metaprocessing system. It has as input a set of related domain definitions. The output is a skeleton of a source program. Our current implementation generates a skeleton of an Elisa program. To demonstrate the process of metaprocessing we return to our Family program and formulate a complete set of domain definitions. See Figure 1.
Figure 1: Domain definitions of the Family
Based on these domain definitions the metaprocessor generates the following skeleton Elisa source code (Figure 2).
<< BEGIN OF INPUT
Figure 2: Skeleton of the Family
The metaprocessor generates, depending on its input a number of Elisa components and type declarations.
In Elisa, a software component is a self-contained building block. It has a well-defined interface with its outside world. A software component is designed to perform a number of related functions. It consists of two parts:
1. The interface-section. It contains the signatures of the operations and functions that may be called from outside the component. Additionally, it may also contain type-specifications.
2. The implementation-section. It contains the definitions of the operations and functions that are externally accessible as specified in the interface-section. It may also contain other definitions that are local to the component.
The metaprocessor generates three kinds of functions: the new
functions create new so-called descriptors. A descriptor is a data
structure that describes a certain type. For example, the newFamily
function generates a new family descriptor. The newPerson function
creates a new Person descriptor. A get function retrieves an
element of the specified descriptor, and a set function changes
an element of the specified descriptor.
This page was last modified on 19-05-2015 12:17:09