Next: Invoking dzn exec, Previous: Invoking dzn, Up: The Dezyne command-line tools [Contents][Index]
dzn codeWhile the simulator (See Invoking dzn simulate) can interpret Dezyne
code directly, to create an executable program Dezyne uses a code
generator.
This code generator, the command dzn code, generates compilable
or runnable code for a Dezyne file, such as C++. Usually—i.e.,
except for trivial cases—this generated Dezyne code is combined with
“handwritten” code in the target language to create a Dezyne
application, See Code Integration.
When generating code for C++, a dependency file is generated as
<output-directory>/.deps/<base>.dzn.dep for use by the build
system.
dzn dzn-option… code option… FILE…
If FILE is a directory, code is generated for all .dzn files in that directory.
The options can be among the following:
--calling-context=type-c typeGenerate an extra parameter of type for every event.
--touch-empty-files-tWhen generating C++ code, if an execution unit is empty, touch
it, creating an empty file for consistency. This may remove an
irregularity from the build system.
--help-hDisplay help on invoking dzn code, and then exit.
--import=dir-I dirAdd directory dir to the import path.
--init=PROCESSWhen generating mCRL2 code, use init PROCESS. For other
language backends, this options is ignored.
--language=language-l languageGenerate code for language language.
--model=model-m modelGenerate a trivial main for model. This “generated main” can execute an event trace read from stdin, and writes a code trace to stderr. See Getting Started.
--no-constraint-CDo not use a constraining process.
--no-unreachable-UDo not generate tags for the unreachable code check.
--output=dir-o dirWrite output to directory dir (use - for standard output).
--queue-size=size-q sizeWhen generating mCRL2 code, use component queue size size
for verification, the default is 3. For other
language backends, this options is ignored.
--queue-size-defer=sizeWhen generating mCRL2 code, use defer queue size size for
verification, the default is 2. For other
language backends, this options is ignored.
--queue-size-external=sizeWhen generating mCRL2 code, use external queue size size
for verification, the default is 1.
For other language backends, this options is ignored.
--shell=model-s modelGenerate thread-safe system shell for model model. This option can be used multiple times. See Thread-safe Shell.
Next: Invoking dzn exec, Previous: Invoking dzn, Up: The Dezyne command-line tools [Contents][Index]