ogma-core-1.14.0: Ogma: Helper tool to interoperate between Copilot and other languages.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.Trans.Diagram2Copilot

Description

Transform a state diagram into a Copilot specification.

Synopsis

- data DiagramMode
  - = CheckState
  - | ComputeState
  - | CheckMoves
- diagram2CopilotSpec :: Diagram -> DiagramMode -> (String, String)
- diagram2Copilot :: Diagram -> String

# Documentation

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 Language.Trans.Diagram2Copilot Methods showsPrec :: Int -> DiagramMode -> ShowS Source # show :: DiagramMode -> String Source # showList :: [DiagramMode] -> ShowS Source #
Eq DiagramMode Source # |
Instance details Defined in Language.Trans.Diagram2Copilot Methods (==) :: DiagramMode -> DiagramMode -> Bool Source # (/=) :: DiagramMode -> DiagramMode -> Bool Source #

diagram2CopilotSpec :: Diagram -> DiagramMode -> (String, String) Source #

Convert the diagram into a set of Copilot definitions, and a list of indented trigger definitions to include in the Copilot spec.

diagram2Copilot :: Diagram -> String Source #

Convert the diagram into a set of Copilot definitions.