next up previous contents
Next: Lexical parts Up: An Optimix Specification Previous: An Optimix Specification

Outline

The outline of an -specification file is the following:2.1


\begin{verbsyntax}\synrule{OptimizerSpecification}{'MODULE' ModuleName [ 'OPT' O...
...ewriteProcedures}{ ( UseClause \vert GraphRewriteProcedure ) *}
\end{verbsyntax}

C mode only:-specifications are module-based. accepts -modules and AST-modules.2.2 As in AST, -modules are bracketed by the pair MODULE <module-name> and END <module-name>. The clause OPT OptimizerName, may be used to specify the name of the output file. Otherwise it is set by the first file argument in the command line or the value of the -o option. Specified modules are combined in order to compose the output file(s). The graph rewrite systems of all -modules are collected into one list. The code which is generated for them is put together into one C output file. In AST/standalone-mode, also collects all data specifications from AST-modules, coalesces them into a single data model, and type-checks the graph rewrite specifications against this model. In CoSy-fSDL mode, the user must specify a flatform-file from which the flat fSDL data specification can be read.

As AST, accepts several global target code sections, containing code of the target language C. The code is copied unchanged to certain parts of the generated files:

HFIRST
into <OptimizerName>.h file; before any code line. Can be used to manipulate inclusions of files
IMPORT
into <OptimizerName>.h file; after the inclusion of stdio.h
EXPORT
into <OptimizerName>.h file; after IMPORT
GLOBAL
into <OptimizerName>.c file; after the prologue
BEGIN
into <OptimizerName>.c file into the begin function <OptimizerName>_Begin()
CLOSE
into OptimizerName.c file into the close function <OptimizerName>_Close()
end C mode.

Java mode only:In Java, works as a preprocessor to the standard Java compiler. Hence specifications are embedded into Java files; no separate modules are allowed, but instead graph rewrite procedures can replace standard Java methods. As output for each Java- specification, a standard Java class is produced which contains a generated method instead of the graph rewrite procedure.end Java mode.


next up previous contents
Next: Lexical parts Up: An Optimix Specification Previous: An Optimix Specification
Uwe Assmann
1998-12-22