Next: 3.1 Basic Facilities
Up: Dissertation
Previous: 2.8 The CASE Tool Interface
3. The Model Definition Language
The Model Definition Language (MDL) is an object-oriented language which has been designed
to integrate seamlessly into the Algorithm Library. It supports the full set of
conditional and loop expressions of the C++ language, class definitions
with data and method encapsulation, multiple inheritance and polymorphic
method calls. The major design goals for the implementation of MDL
were:
- The syntax of MDL is compatible to C++ wherever the meaning of
the statements is comparable. Therefore in many cases the statements of
MDL methods can be interchanged with existing C or C++ functions
in ``Cut and Paste'' manner. This is especially true for the syntax and
precedence of all operators (Section 3.1.8), functions
(Section 3.1.9), conditional, and loop expressions
(Section 3.1.10).
- The developer of MDL models should be relieved from any
responsibility for the memory management of the models. Therefore MDL
has no built-in statements to allocate, free or access any kind of memory
and does not provide derived parameter types like pointers or vectors of
parameters. Whenever such facilities are necessary the simulator
developer has to provide the appropriate MDL parameter types and
operators. Good examples for such parameter types are container classes
of the C++ Standard Template Library.
- For the definition of new MDL classes the inheritance of
parameters and methods from MDL classes defined either in C++ model
libraries, or in previously parsed MDL files is supported . Likewise
it is possible to aggregate several MDL classes to enhance the
functionality of the newly defined one. Within the MDL syntax no
difference is visible between native C++ and interpreted MDL
classes.
- A major design goal was to support an orthogonal set of MDL
expressions, which can efficiently be executed by the MDL interpreter
and compiled into an accordingly efficient C++ code, compatible with
C++ compilers on all supported platforms. The compatibility
requirements resulted in the exclusion of the C++ exception mechanism,
while the most visible result of the orthogonality issue is the
restriction of the MDL class method definition syntax in comparison
with the C++ method definition possibilities.
- MDL methods take no argument list, and their return type is always
MdlBool. The parameter exchange with MDL methods has to be done by
using local, static, or interface parameters of the particular MDL
class.
- The syntax of MDL expressions is independent of the underlying
parameter types. The Algorithm Library comes with a minimal set of built-in
parameter types and MDL functions. This set has to be supplemented by
MDL functions and types according to the specific application in the
particular simulator program to deploy the full strength of the MDL
concept.
Next: 3.1 Basic Facilities
Up: Dissertation
Previous: 2.8 The CASE Tool Interface
Robert Mlekus
1999-11-14