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
, noneOf
,
checkValidTransitions
, 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 Command.Diagram Methods showsPrec :: Int -> DiagramFormat -> ShowS # show :: DiagramFormat -> String # showList :: [DiagramFormat] -> ShowS # | |
Eq DiagramFormat Source # | |
Defined in Command.Diagram Methods (==) :: DiagramFormat -> DiagramFormat -> Bool # (/=) :: DiagramFormat -> DiagramFormat -> Bool # |
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 Command.Diagram Methods showsPrec :: Int -> DiagramMode -> ShowS # show :: DiagramMode -> String # showList :: [DiagramMode] -> ShowS # | |
Eq DiagramMode Source # | |
Defined in Command.Diagram |
data DiagramPropFormat Source #
Property formats supported.
Instances
Show DiagramPropFormat Source # | |
Defined in Command.Diagram Methods showsPrec :: Int -> DiagramPropFormat -> ShowS # show :: DiagramPropFormat -> String # showList :: [DiagramPropFormat] -> ShowS # | |
Eq DiagramPropFormat Source # | |
Defined in Command.Diagram Methods (==) :: DiagramPropFormat -> DiagramPropFormat -> Bool # (/=) :: DiagramPropFormat -> DiagramPropFormat -> Bool # |