LPP manual page
Table of Contents

Name

lpp - LOTOS / LOTOS NT pre-processor

Synopsis

lpp [-version] [-silent | -verbose] [-force] input [output]

Description

lpp is a pre-processor developed to palliate the fact that the LOTOS language does not support standard notations for litteral constants (such as numbers, characters, strings, etc.).

lpp expands such standard notations into lower-level algebraic terms that are compatible with the LOTOS syntax. These terms use the algebraic sorts and operations contained in the LNT_V1 predefined library of CADP.

The input file given to lpp should be either LOTOS code (i.e., a file with the .lotos or .lib extension) or LOTOS NT code (i.e., a file with the .lnt extension).

In the latter case, lpp is likely to be used in conjunction with lnt2lotos, which translates LOTOS NT code into LOTOS and expects to have its input previously expanded by lpp. Thus, the output of lpp typically serves as the input for lnt2lotos.

If an output file name is specified on the command line, the expanded code produced by lpp is written to output. To ensure that the input file will not be overwritten, lpp stops if the output file is the same as the input file.

If no output file name is specified on the command line, the expanded code produced by lpp is written to input.lotos, INPUT.lib, or input.lnt depending on the extension of input. Notice the conversion to uppercase letters of .lib file names as requested by the caesar and caesar.adt compilers.

To avoid confusion between source code and generated code, all output files created by lpp (excepting output if specified on the command line) will be placed in a special directory that lpp creates if it does not exist already. If the creation of the direcory fails, lpp 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 lpp, not relative to the directory containing the input file. To avoid clashes between generated files and user-written files, lpp writes a special tag at the end of each generated file. This tag is a comment containing the name and the version of lpp that generated the file. lpp uses this tag for two purposes:

Options

-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 file, even if it was edited by the user or does not need to be updated.

Operands

input
The file name of a LOTOS or LOTOS NT specification with extension .lnt, .lib, or .lotos. If input has a different extension or no extension, lpp refuses it.

output
The file to which lpp will write instead of $LNTGEN/input.

Environment Variables

$LNTGEN
The target directory of the output file. This environment variable has no effect if an output file argument is supplied.

Exit Status

If no error occurred, 0, otherwise 1.

Authors

David Champelovier, Xavier Clerc, Gideon Smeding, Yves Guerte, Hubert Garavel (INRIA Rhone-Alpes)

See Also

For a complete description of this tool, see the lnt2lotos reference manual. Otherwise see lnt.open , lnt2lotos , caesar.adt , caesar .

Bugs

Please report any bugs to cadp@inria.fr


Table of Contents