| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Command.Diagram
Description
Transform a state diagram into a Copilot specification.
Synopsis
- diagram :: FilePath -> DiagramOptions -> IO (Result ErrorCode)
- data DiagramOptions = DiagramOptions {}
- data DiagramFormat
- data DiagramMode
- data DiagramPropFormat
- type ErrorCode = Int
Documentation
Arguments
| :: FilePath | Path to a file containing a diagram |
| -> DiagramOptions | Customization options |
| -> IO (Result ErrorCode) |
Generate a new Copilot monitor that implements a state machine described in a diagram given as an input file.
PRE: The file given is readable, contains a valid file with recognizable
format, the formulas in the file do not use any identifiers that exist in
Copilot, or any of stateMachine, externalState, main, spec,
stateMachine1, clock, ftp, notPreviousNot. All identifiers used are
valid C99 identifiers. The template, if provided, exists and uses the
variables needed by the diagram application generator. The target directory
is writable and there's enough disk space to copy the files over.
data DiagramOptions Source #
Options used to customize the conversion of diagrams to Copilot code.
Constructors
| DiagramOptions | |
data DiagramFormat Source #
Diagram formats supported.
Instances
| Show DiagramFormat Source # | |
Defined in Data.Diagram.Parser | |
| Eq DiagramFormat Source # | |
Defined in Data.Diagram.Parser Methods (==) :: DiagramFormat -> DiagramFormat -> Bool Source # (/=) :: DiagramFormat -> DiagramFormat -> Bool Source # | |
data DiagramMode Source #
Modes of operation.
Constructors
| CheckState | Check if given state matches expectation |
| ComputeState | Compute expected state |
| CheckMoves | Check if transitioning to a state would be possible. |
Instances
| Show DiagramMode Source # | |
Defined in Language.Trans.Diagram2Copilot | |
| Eq DiagramMode Source # | |
Defined in Language.Trans.Diagram2Copilot Methods (==) :: DiagramMode -> DiagramMode -> Bool Source # (/=) :: DiagramMode -> DiagramMode -> Bool Source # | |
data DiagramPropFormat Source #
Property formats supported.
Instances
| Show DiagramPropFormat Source # | |
Defined in Command.Diagram | |
| Eq DiagramPropFormat Source # | |
Defined in Command.Diagram Methods (==) :: DiagramPropFormat -> DiagramPropFormat -> Bool Source # (/=) :: DiagramPropFormat -> DiagramPropFormat -> Bool Source # | |