drasil-docLang-0.1.26.0: A framework for code and document generation for scientific software - Document Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.SRSDocument

Description

Re-export functions common to all SRS-related examples. This aims to reduce clutter at the top of every Body.hs file in the Drasil examples. If an import is changed here, it will be changed for every example.

Synopsis

Chunk database types and functions

Imported from Database.Drasil

data Block a #

Constructors

Parallel a [a] 

data ChunkDB #

Our chunk databases. Must contain all maps needed in an example. In turn, these maps must contain every chunk definition or concept used in its respective example, else an error is thrown.

data ReferenceDB #

Database for internal references. Contains citations and referrable concepts.

data SystemInformation where #

Data structure for holding all of the requisite information about a system to be used in artifact generation.

Constructors

SI 

Fields

cdb :: (Quantity q, MayHaveUnit q, Idea t, Concept c, IsUnit u) => [q] -> [t] -> [c] -> [u] -> [DataDefinition] -> [InstanceModel] -> [GenDefn] -> [TheoryModel] -> [ConceptInstance] -> [Section] -> [LabelledContent] -> [Reference] -> ChunkDB #

Smart constructor for chunk databases. Takes in the following:

rdb :: BibRef -> [ConceptInstance] -> ReferenceDB #

Smart constructor for creating a reference database from a bibliography and concept instances.

Printing Information needed to generate all documents

data PrintingInformation #

Printing information contains a database, a stage, and a printing configuration.

Instances

Instances details
HasPrintingOptions PrintingInformation

Finds the notation used for the PrintingConfiguration within the PrintingInformation.

Instance details

Defined in Language.Drasil.Printing.PrintingInformation

defaultConfiguration :: PrintingConfiguration #

Default configuration is for engineering.

piSys :: SystemInformation -> Stage -> PrintingConfiguration -> PrintingInformation #

Builds a document's printing information based on the system information.

Document section types needed for a SRS

Imported from Drasil.DocDecl

type SRSDecl = [DocSection] Source #

A Software Requirements Specification Declaration is made up of all necessary sections (DocSections).

data DocSection Source #

Contains all the different sections needed for a full SRS (SRSDecl).

Constructors

TableOfContents

Table of Contents

RefSec RefSec

Reference.

IntroSec IntroSec

Introduction.

StkhldrSec StkhldrSec

Stakeholders.

GSDSec GSDSec

General System Description.

SSDSec SSDSec

Specific System Description.

ReqrmntSec ReqrmntSec

Requirements.

LCsSec

Likely Changes.

UCsSec

Unlikely Changes.

TraceabilitySec TraceabilitySec

Traceability.

AuxConstntSec AuxConstntSec

Auxiliary Constants.

Bibliography

Bibliography.

AppndxSec AppndxSec

Appendix.

OffShelfSolnsSec OffShelfSolnsSec

Off the Shelf Solutions.

newtype ReqrmntSec Source #

Requirements section (wraps ReqsSub subsections).

Constructors

ReqsProg [ReqsSub] 

data ReqsSub where Source #

Requirements subsections.

Constructors

FReqsSub :: Sentence -> [LabelledContent] -> ReqsSub

Functional requirements. LabelledContent for tables (includes input values).

FReqsSub' :: [LabelledContent] -> ReqsSub

Functional requirements. LabelledContent for tables (no input values).

NonFReqsSub :: ReqsSub

Non-Functional requirements.

data PDSub where Source #

Problem Description subsections.

Constructors

TermsAndDefs :: Concept c => Maybe Sentence -> [c] -> PDSub

Terms and Definitions.

PhySysDesc :: Idea a => a -> [Sentence] -> LabelledContent -> [Contents] -> PDSub

Physical System Description.

Goals :: [Sentence] -> PDSub

Goals.

data ProblemDescription where Source #

Problem Description section.

Constructors

PDProg :: Sentence -> [Section] -> [PDSub] -> ProblemDescription 

newtype SSDSec Source #

Specific System Description section (wraps SSDSub subsections).

Constructors

SSDProg [SSDSub] 

data SSDSub where Source #

Specific System Description subsections.

Constructors

SSDProblem :: ProblemDescription -> SSDSub

Problem description.

SSDSolChSpec :: SolChSpec -> SSDSub

Solution characteristics.

data SCSSub where Source #

Solution Characteristics Specification subsections.

Constructors

Assumptions :: SCSSub

Assumptions.

TMs :: [Sentence] -> Fields -> SCSSub

Theory models.

GDs :: [Sentence] -> Fields -> DerivationDisplay -> SCSSub

General definitions.

DDs :: [Sentence] -> Fields -> DerivationDisplay -> SCSSub

Data definitions.

IMs :: [Sentence] -> Fields -> DerivationDisplay -> SCSSub

Instance models.

Constraints :: (HasUncertainty c, Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => Sentence -> [c] -> SCSSub

Constraints.

CorrSolnPpties :: (Quantity c, Constrained c) => [c] -> [Contents] -> SCSSub

Properties of a correct solution.

data SolChSpec where Source #

Solution Characteristics Specification section (wraps SCSSub subsections).

Constructors

SCSProg :: [SCSSub] -> SolChSpec 

Document subsection types needed for a SRS

newtype AppndxSec Source #

Appendix section.

Constructors

AppndxProg [Contents] 

data AuxConstntSec Source #

Values of Auxiliary Constants section.

Constructors

AuxConsProg CI [ConstQDef] 

data DerivationDisplay Source #

Choose whether to show or hide the derivation of an expression.

data Emphasis Source #

How to handle emphasis of words.

Constructors

Bold 
Italics 

Instances

Instances details
Show Emphasis Source # 
Instance details

Defined in Drasil.DocumentLanguage.Core

newtype OffShelfSolnsSec Source #

Off-The-Shelf Solutions section.

Constructors

OffShelfSolnsProg [Contents] 

newtype GSDSec Source #

General System Description section (wraps GSDSub subsections).

Constructors

GSDProg [GSDSub] 

data GSDSub where Source #

General System Description subsections.

Constructors

SysCntxt :: [Contents] -> GSDSub

System context.

UsrChars :: [Contents] -> GSDSub

User characteristics.

SystCons :: [Contents] -> [Section] -> GSDSub

System constraints.

data IntroSec Source #

Introduction section. Contents are top level followed by a list of subsections.

Constructors

IntroProg Sentence Sentence [IntroSub]

Temporary, will be modified once we've figured out more about the section.

data IntroSub where Source #

Introduction subsections.

Constructors

IPurpose :: [Sentence] -> IntroSub

Describes purpose of the system.

IScope :: Sentence -> IntroSub

Describes scope of the system.

IChar :: [Sentence] -> [Sentence] -> [Sentence] -> IntroSub

Describes characteristics of the system.

IOrgSec :: CI -> Section -> Sentence -> IntroSub

Organises the section.

data LFunc where Source #

Lens (lookup) functions (currently for TSymb).

Constructors

Term :: LFunc 
Defn :: LFunc 
TermExcept :: [DefinedQuantityDict] -> LFunc 
DefnExcept :: [DefinedQuantityDict] -> LFunc 
TAD 

Fields

  • :: LFunc

    Term and Definition.

data Literature Source #

Types of literature.

Constructors

Lit Topic

Literature (with a Topic).

Doc' Topic

Existing documentation for (plural version of topic).

Manual Topic

Manual.

data RefSec Source #

Reference section. Contents are top level followed by a list of subsections.

Constructors

RefProg Contents [RefTab] 

data RefTab where Source #

Reference subsections (tables) made out of units or symbols (can be customized).

Constructors

TUnits :: RefTab

Default table of units.

TUnits' :: [TUIntro] -> ([UnitDefn] -> LabelledContent) -> RefTab

Customized introduction.

TSymb :: [TSIntro] -> RefTab

Adds an introduction for a table of symbols.

TSymb' :: LFunc -> [TSIntro] -> RefTab

Allows Lens functions in addition to an introduction for a table of symbols.

TAandA :: RefTab

Default.

newtype StkhldrSec Source #

Stakeholders section (wraps stakeholders subsections StkhldrSub).

Constructors

StkhldrProg [StkhldrSub] 

data StkhldrSub where Source #

Stakeholders subsections.

Constructors

Client :: CI -> Sentence -> StkhldrSub

May have a client.

Cstmr :: CI -> StkhldrSub

May have a customer.

data TConvention Source #

Possible typographic conventions.

Constructors

Vector Emphasis

How vectors are emphasized.

Verb Sentence

Verbatim for specialized conventions.

newtype TraceabilitySec Source #

Traceability Matices and Graphs section. Contains configurations (TraceConfig).

data TSIntro Source #

For creating a table of symbols introduction

Constructors

TypogConvention [TConvention]

Typographic conventions used.

SymbOrder

Symbol ordering (defaults to alphabetical).

SymbConvention [Literature]

Symbol conventions match specified literature.

TSPurpose

Purpose of the Table of Symbols.

VectorUnits

Definition of vector components.

data TUIntro Source #

For creating the table of units introduction.

Constructors

System

System of units (defaults to SI).

Derived

Sentence about derived units being used alongside SI.

TUPurpose

Purpose of the table of units.

Document subsection helper types

data Field Source #

Fields that should be displayed in definitions.

Instances

Instances details
Show Field Source #

Defines Fields as Spaces.

Instance details

Defined in Drasil.DocumentLanguage.Definitions

Methods

showsPrec :: Int -> Field -> ShowS #

show :: Field -> String #

showList :: [Field] -> ShowS #

type Fields = [Field] Source #

Synonym for a list of Fields.

data InclUnits Source #

Determines whether to include or ignore units.

Constructors

IncludeUnits

In description field (for other symbols).

data Verbosity Source #

Refers to the verbosity of statements.

Constructors

Verbose

Full Descriptions.

Succinct

Simple Description (do not redefine other symbols).

SRS Document creator functions

mkDoc :: SRSDecl -> (IdeaDict -> IdeaDict -> Sentence) -> SystemInformation -> Document Source #

Creates a document from a document description, a title combinator function, and system information.

fillcdbSRS :: SRSDecl -> SystemInformation -> SystemInformation Source #

Assuming a given ChunkDB with no traces and minimal/no references, fill in for rest of system information. Currently fills in references, traceability matrix information and IdeaDicts.

Helper functions to make an SRS Document

Imports from various sections of drasil-docLang

intro :: Contents Source #

Default Reference Material section introduction.

traceMatStandard :: SystemInformation -> [TraceConfig] Source #

Helpers to check if given argument has more than one peice of information

Contains traceability matrix assumptions, other assumptions, refinement, and other requirements.

tsymb :: [TSIntro] -> RefTab Source #

Default is term and given introduction.

Table of symbols constructor.

tsymb'' :: [TSIntro] -> LFunc -> RefTab Source #

Table of symbols constructor. Takes a custom function and introduction.

purpDoc :: CI -> Verbosity -> [Sentence] Source #

Combines purpDocPara1 and developmentProcessParagraph. Verbosity controls if the developmentProcessParagraph is added or not.