Usage of compiler

Basic usage of the compiler is to produce an intermediate Haskell representation of an Alvis model. The intermediate representation may be used to generate the Label Transition System (LTS graph) for the given model. The Alvis compiler requires a Haskell compiler to be installed.

$> alvisc input_file.alvis

The default output file is called out.hs. One can include the -o output_file.hs option to specify the name of the output file.

$> alvisc input_file.alvis -o output_file.hs

A short help about the compiler usage can be generated using the -h option:

$> alvisc -h
usage: alvisc file [--force-generator] [--force-tree-parsing] [-h] [-m
       <arg>] [-nt] [-o <file>] [-v] [-vm]
    --force-generator      forces compiler to generate output even though
                           compiler met syntactic errors. This option can
                           produce compiler crash.
    --force-tree-parsing   forces sematic analysis even though Alvis
                           parser encountered errors. This option can
                           produce compiler crash.
 -h,--help                 print this message
 -m,--backend-mode <arg>   switches backend generator. Standard is
                           "default", there is "debug" versionas well.
 -nt,--no-time             no time
 -o <file>                 place the output into <file>
 -v,--version              print version information
 -vm,--verbose-messages    switches on printing additional information
                           about errors which maybe helpful for newbie.

Support of Alvis language and limitation of compiler in current alpha version

The current compiler version supports both time and non-time Alvis models with α^0 system layer (multi-processor systems).

Current version do not support:

  • commands:
    • out constant
  • environment specification,
  • hierarchical agents - The flat version of the model must be generated before compilation.


Suppose an Alvis model example.alvis is given. The following UNIX/Linux commands generate the LTS graph in the DOT format:

alvisc example.alvis -o example.hs
ghc --make example.hs -o example
./example >