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

Safe Haskell | None
Language | Haskell2010

Command.Overview

Description

Produce an overview of the input files.

Synopsis

- command :: FilePath -> CommandOptions -> IO (Maybe CommandSummary, Result ErrorCode)
- data CommandOptions = CommandOptions {
  - commandFormat :: String
  - commandPropFormat :: String
  - commandPropVia :: Maybe String
  }
- data CommandSummary = CommandSummary {
  - commandExternalVariables :: Int
  - commandInternalVariables :: Int
  - commandRequirements :: Int
  }
- type ErrorCode = Int

# Documentation

command Source #

Arguments

:: FilePath | Path to a file containing a specification
-> CommandOptions | Customization options
-> IO (Maybe CommandSummary, Result ErrorCode) |

Generate overview of a spec 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`. All identifiers used are valid C99 identifiers. The template, if provided, exists and uses the variables needed by the overview 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.

Constructors

CommandOptions |

Fields

- commandFormat :: String
- commandPropFormat :: String
- commandPropVia :: Maybe String

data CommandSummary Source #

Constructors

CommandSummary |

Fields

- commandExternalVariables :: Int
- commandInternalVariables :: Int
- commandRequirements :: Int

#### Instances

Instances details

ToJSON CommandSummary Source # |
Instance details Defined in Command.Overview 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.Overview

Associated Types

type Rep CommandSummary |

Instance details

Defined in Command.Overview

type Rep CommandSummary = D1 ('MetaData "CommandSummary" "Command.Overview" "ogma-core-1.12.0-2Qe6AFCR00D8NtrO1nlmfy" 'False) (C1 ('MetaCons "CommandSummary" 'PrefixI 'True) (S1 ('MetaSel ('Just "commandExternalVariables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "commandInternalVariables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "commandRequirements") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

Methods

from :: CommandSummary -> Rep CommandSummary x Source #

to :: Rep CommandSummary x -> CommandSummary Source #

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

Instance details

Defined in Command.Overview

type Rep CommandSummary = D1 ('MetaData "CommandSummary" "Command.Overview" "ogma-core-1.12.0-2Qe6AFCR00D8NtrO1nlmfy" 'False) (C1 ('MetaCons "CommandSummary" 'PrefixI 'True) (S1 ('MetaSel ('Just "commandExternalVariables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "commandInternalVariables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "commandRequirements") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

type ErrorCode = Int Source #

Encoding of reasons why the command can fail.