NAME

lus2oc, ec2oc - lustre to Lustre/Esterel Object Code

SYNOPSIS

lus2oc file.lus node [options]

ec2oc file.ec [options]

DESCRIPTION

The lus2oc command requires a file and a main node; it first calls lus2ec to build the corresponding expanded code, then calls ec2oc with all remaining options.

The ec2oc command builds a sequential program structured as an automaton. Several options allow the user to adjust the automaton generation. The default target format is oc version 5, but the version 2 is still supported, for compatibility with old tools. The default is to write the result in the file "node.oc".

OPTIONS

Miscellaneous

-v

set the verbose mode.

-help

print available options.

-default

print default options.

-o file.oc

define the output file.

-pure

implement Boolean inputs/outputs with "pure" signal (i.e. side-effects). The default is to implement Boolean inputs/outputs with "classic" variables, just like integer or reals.

-double

implement the lustre type real with the target type double (the default target type is float).

Static optimization

-min

(default) the initial operator network is minimized before code generation. This minimization is a kind of "common sub-expression checking" except that the network may contain cycles; as a consequence this phase can be expensive, so the user can disable it (cf. -nomin).

-nomin

disable the minimization of the operator network (cf. -min).

-const

perform static computation of constant expressions.

Output format

-oc2

generate an oc V2 file.

-oc5

(default) generate an oc V5 file.

Automaton

The main control structure is an automaton, obtained by static simulation of the Boolean variables (called state variables). The user can select the set of state variables:

-0

no state variable; the resulting automaton has only one state. This mode is not supported if the source program contains clocks.

-1

only clocks are simulated. For single-clocked program, the resulting automaton has always 2 states (the initial one and the non-initial one).

-2

(default) all Boolean variables are simulated; the resulting program is the "fastest" code that can be generated, but unfortunately its size may be exponentially greater that the source code one. It it advisable to use the -v option, in order to stop the compilation if the automaton size grows too much.

The user may choose between two algorithms for the generation:

-data

(default) the data-driven algorithm simulates the Boolean variables without taking into account their actual influence on the outputs. The resulting automaton is in general non-minimal according to the output computation.

-states integer

works in data-driven mode. The generation stops after the specified number of states (default 10000). This limit avoids the generation of too huge code.

-demand

the demand-driven algorithm builds a automaton just "big" enough to perform the computation of the outputs. Using this option is quite equivalent to perform a standard minimization on the automaton produced by the data-driven algorithm.

The user can select the way conditional statements are treated:

-S1

forbid code duplication, i.e. tests are closed as soon as possible.

-S2

(default) use an heuristic for opening/closing tests; it forbids duplication of "big" parts of code.

-S3

forbid test duplication, i.e. tests are closed only when they are no longer needed.

-S4

forbid test closing; this option is the worst one in term of code size, but it can be very useful for analysing the program (see in particular lus2atg).

Bdds

The bdd (binary decision diagrams) library is one of the most critical (time and space cost) part of the compiler. The user may change some parameters in order to improve compilation time.

-merge

perform a "clever" variable ordering before building bdds; this option is sometimes useful when the state generation step cannot even start.

-bddpage integer

the space devoted to bdds is allocated by pages. Before allocating new pages, the program first performs garbage collection; for big programs, frequent garbage collection may dramatically slow down the compilation, so the user may increase the size of pages, expressed in kilo-unit (default 10).