Model checking tools, simulator and some of other tools cannot work with sources of models immediately. Often the sequence of code transformations is needed to get the source to the required format.
First translation of DVE and Promela is discussed, second single tools and their invocation are described below.
The sequence of translations is the following:
Preprocessed DVE is ready to use as an input for simulator. But model checking algorithms furthermore need LTL formula encoded in a source as a neverclaim automaton. This can be done using divine.combine
. This script implicitly calls divine.preprocessor
, therefore precocessor usage is in parenthesis above.
model.ltl
may contain several formulas, therefore also several combined files (model.prop1.dve
, model.prop2.dve
) may be produced.
Summary: Translation of DVE is easy - it needs at most one call (of divine.combine
). LTL formulas can be in a separate file.
The sequence of translations is the following:
Preprocessed Promela needs to be translated to an assembler using divine.pml2s.sh
and then to a bytecode using divine.nips_asm.pl
. Unfortunatelly currently divine.combine
cannot work with Promela, therefore neverclaim automaton expressing LTL formula must be encoded already in a Promela source code.
Summary: Translation of DVE is little laborious for now - it needs 3 calls of different translation scripts. LTL formulas have to be currently encoded inside a Promela source code.
divine.preprocessor [-D macros] model_source
where macros
is of the type 'parameter1=value1 parameter2=value2 ...'
and model_source
is a source code of a model written in DVE with m4
preprocessor macros or in Promela with cpp
preprocessor macros.
divine.combine [-hoqv] [-p number] model_source formula_source
where:
model_source
is a DVE source, which can contain macros (*.mdve
) or not (*.dve
)formula_source
is an LTL formula, which can contain macros (*.mltl
) or not (*.ltl
)model_source
with formula_source
. If any of sources contains macros and has an appropriate extension (*.mdve
, *.mltl
), then macros are expanded first. Defaultly the script produces one DVE source for each LTL property in formula_source
.Parameters:
h
... print a brief helpo
... print a resulting file to standard output (valid only in a connection with -p number
or formula_source
containing only one formula); this option also implies -q
p number
... use only the number
-th LTL formulaq
... a quiet mode - do not print names of created files to the standard outputv
... print a versiondivine.pml2s model_source
divine.nips_asm.pl
. The resulting assembler code is written to the file model_source.s
.divine.bymoc_asm.pl input.s [ output.b [output.l] ]
or
divine.nips_asm.pl input.s [ output.b [output.l] ]
This script produces always 2 files. User can only change their default names (original name + .b
or .l
):
output.b
... a byte code to be interpreted in a simulation or model checkingoutput.l
... references to the bytecode - not needed for interpreting of a bytecode, but useful for debugging (instructions of original assembler source are mapped to addresses to the bytecode)divine.syntax model_source
divine.draw_automata model_source
dot
format to the standard output. Graph consists of process states and possible transitions between them. Details like guards and effects are ommited from the graph.It works only with DVE models.