Previous Page
Strategies Specification
Non-Deterministic Computations
Rules Specifications
Modularity and parameterization

 

ELAN- Modularity and parameterization

ELAN is a modular language that allows parameterized modules. It provides also a more subtle parameterization through the use of preprocessing as described in the next section. Each module defines a computational system composed of sets of sorts, operators, rewrite rules, strategy operators and strategy rules. It can import other modules, via a keyword import followed by one or several module names. In a first approach an importation can be seen as a textual copy of the imported module in the importing one. But it is useful to specify that some operations are local and only visible in the module they belong to. The keyword local is used to declare that an operator or a rule is locally visible but hidden outside of the module. The dual keyword global makes an operator or a rule visible outside the module where it is defined. When a module is imported, the importation is itself specified as local or global. Entities visible as global in a module imported as global remain visible as global, whilst global entities become local if the module is imported as local.