next up previous contents
Next: 2.3.1 Parameter Structure Up: 2. The Algorithm Library Previous: 2.2 Design of the


2.3 Structures of the Algorithm Library

The Algorithm Library has been designed as a highly portable toolkit integrated into the VMAKE CASE environment which is a common platform for all applications of the VISTA and SIESTA TCAD environment. An overall guideline was to achieve a high portability both to different operating systems and to the majority of the available C++ compilers. The intention to simplify future maintenance and developments of additional features leads to the topology depicted in Fig. 2.1.

Figure 2.1: Structure of the Algorithm Library
\begin{figure}
\begin{center}
\includegraphics{figures/ModelLibrary_Structure.eps}\end{center}\end{figure}

The whole library is based on a ``Virtual Operating System'' layer providing non-ambiguous access to basic functions of the underlying operating system. The Vienna C++ Classes Library is introduced to overcome the deficiencies of the slow and very divergent development of C++ compilers implementing the C++ standard [1]. It implements replacement classes and templates for the ANSI C++ and standard template libraries (STL).

The first layer of the Algorithm Library kernel defines the central classes for abstracting the model, interface, and parameter concepts of the algorithm library discussed in Section 2.3.1 to Section 2.3.2. These C++ classes are completed with a system of C++ macro definitions and source code templates for the generation of user defined MDL classes, functions, and Parameter types on the basis of tables and ordinary C++ classes. This module is equally responsible for the unified runtime type management of native C++ class instance objects and MDL class instances generated by the MDL interpreter (Chapter 3). Furthermore it provides an interface to dynamically access member functions and parameters of model class instances by their name and the dynamic instantiation of model and parameter classes using their type names.

On top of these basic layers the foundation classes of the MDL language are established. These are grouped into two complementary tree structures. The first group of these classes reflects the grammar of the MDL language. For each operator, (block) statement, and class definition available within the MDL language an according description class is defined. The Algorithm Library internal MDL definition manager holds a repository of instances of these classes comprehending the results of the MDL parser. Thereby definitions contained in parsed MDL input decks are mapped into structured conglomerates of C++ objects.

The second part of the MDL foundation classes is formed by a hierarchy of C++ template classes with the same structure as the description classes in the first group. Specializations of these templates are automatically created by the above mentioned first layer of the Algorithm Library to reflect the user defined Parameter types. Instances of these specialized classes are created by the according MDL statement description classes on demand of the application to form evaluable MDL expressions. The classes in the first group are also responsible for compiling the respective MDL definition into C++ code.

The MDL interpreter is realized by wrapping a lexical scanner algorithm and the parser algorithm generated using the standard tools Flex [36] and Bison [13] into C++ classes which feed the MDL definition manager module with instances of MDL description classes. In parallel a hash containing informations concerning the parsed MDL files is generated. Every MDL description class contains a reference to this hash table enabling the two pass error recovery scheme described in Section 3.11.

The MDL class instance manager module keeps track of all available MDL class instances as well as for type and default value definitions in conjunction with these instances. Furthermore it signs responsible for the administration of the parameter linkage structures discussed in Section 2.3.1.2.

Algorithms of the MDL $\rightarrow$ C++ compiler module collect all information about MDL model classes and are used for the automated generation of complete VMAKE project directories on user request. These project directories include all necessary header, source, and makefiles required to compile dynamically loadable shared libraries with user defined MDL classes.

These structures are wrapped into an application, programming, and CASE interface layer which provides the designated user interface to the Algorithm Library functionality. The programming interface consists of a set of C++ header files providing the declarations required for the definition of new Parameter, Interface, and Model classes. These are used to generate application specific Algorithm Library extensions. The CASE interface consists of a set of templates for makefiles, project description files, and LISP files for the VMAKE CASE utility. These reduce the effort of generating extensions of the Algorithm Library with user defined parameter and model types to the specialization of these templates with the names of standard C++ classes and their source code files as described in detail in the following sections. The application interface is contained in a single C++ header file which can be included into the source code of the application and provides the declarations of Algorithm Library functions for the management of MDL class instances.




next up previous contents
Next: 2.3.1 Parameter Structure Up: 2. The Algorithm Library Previous: 2.2 Design of the
Robert Mlekus
1999-11-14