Both sides previous revisionPrevious revisionNext revision | Previous revisionBoth sides next revision |
alvis:compiler [2017/01/13 00:52] marcin | alvis:compiler [2021/09/23 08:51] (current) |
---|
<code> | <code> |
$> alvisc -h | $> alvisc -h |
usage: alvisc file [--force-generator] [--force-tree-parsing] [-h] [-m | usage: alvisc file [-ald] [-b <arg>] [-csv] [-dot] [--force-generator] |
<arg>] [-nt] [-o <file>] [-v] [-vm] | [--force-tree-parsing] [-h] [-m <arg>] [-nt] [-o <file>] [-p <arg>] |
| [-p1] [-p2] [-sim] [-v] [-vm] |
| -ald,--aldebaran uses code for generating Aldebaran output |
| -b,--backend-mode <arg> switches backend generator. Standard is |
| "default", there is "debug" versionas well. |
| -csv,--csv uses code for generating CSV output |
| -dot,--dot uses code for generating DOT output |
--force-generator forces compiler to generate output even though | --force-generator forces compiler to generate output even though |
compiler met syntactic errors. This option can | compiler met syntactic errors. This option can |
produce compiler crash. | produce compiler crash. |
-h,--help print this message | -h,--help print this message |
-m,--backend-mode <arg> switches backend generator. Standard is | -m,--main <arg> uses code for generating output from given path |
"default", there is "debug" versionas well. | |
-nt,--no-time no time | -nt,--no-time no time |
-o <file> place the output into <file> | -o <file> place the output into <file> |
| -p,--priority <arg> uses priority algorithm form given path |
| -p1,--priority-p1 uses priority algorithm form priority_p1.hs |
| -p2,--priority-p2 uses priority algorithm form priority_p1.hs |
| -sim,--simulation uses code for generating simulator |
-v,--version print version information | -v,--version print version information |
-vm,--verbose-messages switches on printing additional information | -vm,--verbose-messages switches on printing additional information |
* commands: | * commands: |
* **out** //constant// | * **out** //constant// |
* environment specification, | |
* hierarchical agents - The flat version of the model must be generated before compilation. | * hierarchical agents - The flat version of the model must be generated before compilation. |
| |
| |
| ====Example==== |
| |
| Suppose an Alvis model example.alvis is given. The following UNIX/Linux commands generate the LTS graph in the DOT format: |
| <code> |
| alvisc example.alvis -o example.hs |
| ghc --make example.hs -o example |
| ./example > example.dot |
| </code> |
| |
| |
| ==== Compiler options and files ==== |
| |
| Several compiler options allow to configure the output Haskell program. |
| |
| The most basic option is for choosing to use //time// (default) or //non-time// (''--no-time'') Alvis version. Resulting programs will use some different data types and algorithms. The second basic option is for choosing to generate standard LTS-printing program (default) or a model simulator (''--simulation''). Other options allow to select desired format that the resulting program will print (''--dot'', ''--csv'', ''--aldebaran'' or ''--main path/to/code.hs'' for an user-defined format) or the priority algorithm to use (''--priority-p1'', ''--priority-p2'' or ''--priority path/to/code.hs'' for an user-defined algorithm). |
| |
| The standard compiler package comes with //compiler-files// directory, containing files with Haskell code that the compiler uses, depending on the given options. |
| |