The outline of an -specification file is the following:2.1
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:
<OptimizerName>.h file; before any code line. Can be used to
manipulate inclusions of files
<OptimizerName>.h file; after the inclusion of stdio.h
<OptimizerName>.h file; after IMPORT
<OptimizerName>.c file; after the prologue
<OptimizerName>.c file into the begin
function <OptimizerName>_Begin()
OptimizerName.c file into the close
function <OptimizerName>_Close()
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.