ogma-core-1.7.0: Ogma: Helper tool to interoperate between Copilot and other languages.
Safe HaskellNone
LanguageHaskell2010

Command.Diagram

Description

Transform a state diagram into a Copilot specification.

Synopsis

Documentation

diagram Source #

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 DiagramFormat Source #

Diagram formats supported.

Constructors

Mermaid 
Dot 

Instances

Instances details
Show DiagramFormat Source # 
Instance details

Defined in Command.Diagram

Eq DiagramFormat Source # 
Instance details

Defined in Command.Diagram

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

Instances details
Show DiagramMode Source # 
Instance details

Defined in Command.Diagram

Eq DiagramMode Source # 
Instance details

Defined in Command.Diagram

data DiagramPropFormat Source #

Property formats supported.

Constructors

Lustre 
Inputs 
Literal 
SMV 

type ErrorCode = Int Source #

Encoding of reasons why the command can fail.

The error code used is 1 for user error.