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

Safe Haskell | None
Language | Haskell2010

Command.Report

Description

Produce a report of the diagrams and requirements in the input files.

Synopsis

- command :: CommandOptions -> IO (Result ErrorCode)
- data CommandOptions = CommandOptions {
  - commandTargetDir :: String
  - commandTemplateDir :: Maybe String
  - commandInputFile :: String
  - commandFormat :: String
  - commandPropFormat :: String
  - commandPropVia :: Maybe String
  }
- data CommandSummary = CommandSummary {
  - commandExternalVariables :: Int
  - commandInternalVariables :: Int
  - commandRequirementsAny :: Bool
  - commandRequirements :: Int
  - commandRequirementsTrue :: Int
  - commandRequirementsFalse :: Int
  - commandRequirementsConsistent :: Bool
  - commandRequirementList :: [RequirementDetails]
  - commandDiagramsAny :: Bool
  - commandDiagrams :: Int
  - commandDiagramList :: [DiagramDetails]
  }
- type ErrorCode = Int

# Documentation

command Source #

Arguments

:: CommandOptions | Customization options
-> IO (Result ErrorCode) |

Generate report of a spec or diagram given in 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 `prop`, `clock`, `ftp`, `notPreviousNot`. The template, if provided, exists and uses the variables needed by the report application generator. The target directory is writable and there's enough disk space to copy the files over.

data CommandOptions Source #

Options used to customize the interpretation of input specifications and the resulting report.

Constructors

CommandOptions |

Fields

- commandTargetDir :: String
- commandTemplateDir :: Maybe String
- commandInputFile :: String
- commandFormat :: String
- commandPropFormat :: String
- commandPropVia :: Maybe String

data CommandSummary Source #

Summary of the files read.

Constructors

CommandSummary |

Fields

- commandExternalVariables :: Int
- commandInternalVariables :: Int
- commandRequirementsAny :: Bool
- commandRequirements :: Int
- commandRequirementsTrue :: Int
- commandRequirementsFalse :: Int
- commandRequirementsConsistent :: Bool
- commandRequirementList :: [RequirementDetails]
- commandDiagramsAny :: Bool
- commandDiagrams :: Int
- commandDiagramList :: [DiagramDetails]

#### Instances

Instances details

ToJSON CommandSummary Source # |
Instance details Defined in Command.Report Methods toJSON :: CommandSummary -> Value Source # toEncoding :: CommandSummary -> Encoding Source # toJSONList :: [CommandSummary] -> Value Source # toEncodingList :: [CommandSummary] -> Encoding Source # omitField :: CommandSummary -> Bool Source #
Generic CommandSummary Source # |

Instance details

Defined in Command.Report

Associated Types

type Rep CommandSummary |
Instance details Defined in Command.Report type Rep CommandSummary

Methods

from :: CommandSummary -> Rep CommandSummary x Source #

to :: Rep CommandSummary x -> CommandSummary Source #

Show CommandSummary Source # |
Instance details Defined in Command.Report Methods showsPrec :: Int -> CommandSummary -> ShowS Source # show :: CommandSummary -> String Source # showList :: [CommandSummary] -> ShowS Source #
type Rep CommandSummary Source # |
Instance details Defined in Command.Report type Rep CommandSummary

type ErrorCode = Int Source #

Encoding of reasons why the command can fail.