ogma-spec-1.14.0: Ogma: Runtime Monitor translator: JSON Frontend

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.OgmaSpec

Description

Abstract representation of an Ogma specification.

Synopsis

- data Spec a = Spec {
  - internalVariables :: [InternalVariableDef]
  - externalVariables :: [ExternalVariableDef]
  - requirements :: [Requirement a]
  }
- data InternalVariableDef = InternalVariableDef {
  - internalVariableName :: String
  - internalVariableType :: String
  - internalVariableExpr :: String
  }
- data ExternalVariableDef = ExternalVariableDef {
  - externalVariableName :: String
  - externalVariableType :: String
  }
- data Requirement a = Requirement {
  - requirementName :: String
  - requirementExpr :: a
  - requirementDescription :: String
  - requirementResultType :: Maybe String
  - requirementResultExpr :: Maybe a
  }

# Documentation

data Spec a Source #

Abstract representation of an Ogma specification.

Constructors

Spec |

Fields

- internalVariables :: [InternalVariableDef]
- externalVariables :: [ExternalVariableDef]
- requirements :: [Requirement a]

#### Instances

Instances details

Show a => Show (Spec a) Source # |
Instance details Defined in Data.OgmaSpec Methods showsPrec :: Int -> Spec a -> ShowS Source # show :: Spec a -> String Source # showList :: [Spec a] -> ShowS Source #

data InternalVariableDef Source #

Internal variable definition, with a given name, its type and definining expression.

Constructors

InternalVariableDef |

Fields

- internalVariableName :: String
- internalVariableType :: String
- internalVariableExpr :: String

#### Instances

Instances details

Show InternalVariableDef Source # |
Instance details Defined in Data.OgmaSpec Methods showsPrec :: Int -> InternalVariableDef -> ShowS Source # show :: InternalVariableDef -> String Source # showList :: [InternalVariableDef] -> ShowS Source #

data ExternalVariableDef Source #

External variable definition, with a given name and type.

The value of external variables is assigned outside Copilot, so they have no defining expression in this type.

Constructors

ExternalVariableDef |

Fields

- externalVariableName :: String
- externalVariableType :: String

#### Instances

Instances details

Show ExternalVariableDef Source # |
Instance details Defined in Data.OgmaSpec Methods showsPrec :: Int -> ExternalVariableDef -> ShowS Source # show :: ExternalVariableDef -> String Source # showList :: [ExternalVariableDef] -> ShowS Source #

data Requirement a Source #

Requirement with a given name and a boolean expression.

Constructors

Requirement |

Fields

- requirementName :: String
- requirementExpr :: a
- requirementDescription :: String
- requirementResultType :: Maybe String
- requirementResultExpr :: Maybe a

#### Instances

Instances details

Show a => Show (Requirement a) Source # |
Instance details Defined in Data.OgmaSpec Methods showsPrec :: Int -> Requirement a -> ShowS Source # show :: Requirement a -> String Source # showList :: [Requirement a] -> ShowS Source #