Table of Contents
lnt2lotos - LOTOS NT to LOTOS translator
lnt2lotos [
-silent
|
-verbose] [
-version] [
-force] [
-pidlist] [
-root instantiation]
filename[
.lnt]
LOTOS NT is an imperatively styled specification language for
concurrent processes. The
lnt2lotos program translates a LOTOS NT specification
to a LOTOS specification.
The input to lnt2lotos is a LOTOS NT file, which
must have the extension .lnt. If the user does not specify the extension
.lnt on the command line, it will be appended automatically and lnt2lotos
will read filename.lnt as input.
Typically, the input should have been pre-processed
by lpp before being passed to lnt2lotos. The pre-processor expands extended
notation such as literal numbers and strings, which is not accepted by
lnt2lotos directly.
The output is a LOTOS library or LOTOS specification.
When lnt2lotos is called with the -root option and the name of an instantiation,
or when the input specification contains a process called MAIN without
value parameters, lnt2lotos will generate a LOTOS specification. In all
other cases, lnt2lotos will generate a LOTOS library. An auxiliary .f file
is also produced, containing C code for external functions.
To avoid confusion
between source code and generated code, all output files created by lnt2lotos
will be placed in a special directory that lnt2lotos creates if it does
not exist already. If the creation of the direcory fails, lnt2lotos issues
an error message and stops. The name of this directory is either given by
the environment variable $LNTGEN, if this variable is set, or is ./LNTGEN.
Note that ./LNTGEN (or $LNTGEN) is created relative to the directory from
which the user calls lnt2lotos, not relative to the directory containing
the input file.
The name of the input file is used to construct the names
of the output files, with the particular rule that all letters are turned
to upper case when constructing the names of .lib files. For an input file
example.lnt, lnt2lotos creates the LOTOS library EXAMPLE.lib or the LOTOS
specification example.lotos and the auxiliary file example.f. To avoid clashes
between generated files and user-written files, lnt2lotos writes a special
tag at the beginning of each generated file. This tag is a comment containing
the name and the version of lnt2lotos that generated the file. lnt2lotos
uses this tag for two purposes:
- To prevent lnt2lotos from overwriting a
file that was not generated by itself: if the output file already exists
but has no special tag or has an invalid tag indicating that the file was
not generated by the right tool, lnt2lotos issues an error message and
stops.
- To avoid unnecessary compilations: lnt2lotos recompiles a LOTOS NT
file only if the source file was modified since the last translation, or
if the output file was generated by an older version of lnt2lotos.
- -silent
- Execute silently, reporting only errors. This is the opposite of -verbose.
The default option is -verbose.
- -verbose
- Report activities and progress, including
errors, to the user's screen. This is the opposite of -silent. The default
option is -verbose.
- -version
- Display the tool version and exit.
- -force
- Overwrite
the output files, even if they were edited by the user or do not need to
be updated.
- -pidlist
- List the names of all processes without value parameters
that occur in the input file and exit. In other words, list all processes
that can be used as main process (by instantiation with the -root option).
- -root instantiation
- Use the process instantiation as the main process, meaning
that the generated LOTOS specification has the behaviour of the main process.
The instantiation is a character string (preferably enclosed by single
quotes) denoting a LOTOS NT process instantiation. For example, given the
instantiation
P [G1, ..., Gn] of process P with gate identifiers [G1, ..., Gn]
lnt2lotos would produce a specification specification P [G1, ..., Gn] : exit
with a behaviour behaviour P [G1, ..., Gn] where .... If the list of gates [G1,
..., Gn] is omitted, the list of formal gate parameters of the process P is
used instead. The process P, of which there can be exactly one (processes
cannot be overloaded in LOTOS NT), should have no value parameters at all.
If the option ``-root -'' is specified (that is, the instantiation is specified
as ``-''), this indicates that there is no main process (even if there is a
process called MAIN), and lnt2lotos will generate a LOTOS library.
- filename.lnt
- LOTOS NT specification (input)
- $LNTGEN/filename.lotos
- LOTOS
code (optional output)
- $LNTGEN/FILENAME.lib
- LOTOS code (optional output)
- $LNTGEN/filename.f
- C code (output)
- $LNTGEN/filename.err
- detailed error messages
(output)
- $CADP/lib/LNT_V1.lib
- LOTOS NT predefined library (LOTOS code)
- $CADP/incl/LNT_V1.h
- LOTOS NT predefined library (C code)
- $LNTGEN
- The target directory of the output files.
If the translation
was successful the exit status is 0, even if warnings were issued during
the execution. If any error occurred during translation, the exit status
is 1.
David Champelovier, Xavier Clerc, Hubert Garavel, Gideon Smeding,
Frederic Lang, Wendelin Serwe (INRIA Rhone-Alpes)
For a complete
description of LOTOS NT, see the
lnt2lotos reference manual. Otherwise see
lpp
,
lnt.open
,
caesar.adt
,
caesar
.
The type
system of
lnt2lotos is not implemented yet, hence, some incorrect LOTOS
NT programs will be accepted by
lnt2lotos. These errors will be detected
by the LOTOS compilers
caesar and
caesar.adt. Please report any mistranslations
or other problems with
lnt2lotos to
cadp@inrialpes.fr
Table of Contents