Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- data Block a = Parallel a [a]
- data ChunkDB
- data ReferenceDB
- data SystemInformation where
- SI :: forall a b e f h i j. (CommonIdea a, Idea a, Idea b, Quantity e, Eq e, MayHaveUnit e, Quantity f, MayHaveUnit f, Concept f, Eq f, Quantity h, MayHaveUnit h, Quantity i, MayHaveUnit i, HasUID j, Constrained j) => {..} -> SystemInformation
- cdb :: (Quantity q, MayHaveUnit q, Idea t, Concept c, IsUnit u) => [q] -> [t] -> [c] -> [u] -> [DataDefinition] -> [InstanceModel] -> [GenDefn] -> [TheoryModel] -> [ConceptInstance] -> [Section] -> [LabelledContent] -> [Reference] -> ChunkDB
- rdb :: BibRef -> [ConceptInstance] -> ReferenceDB
- data PrintingInformation = PI {}
- defaultConfiguration :: PrintingConfiguration
- piSys :: SystemInformation -> Stage -> PrintingConfiguration -> PrintingInformation
- type SRSDecl = [DocSection]
- data DocSection
- newtype ReqrmntSec = ReqsProg [ReqsSub]
- data ReqsSub where
- FReqsSub :: Sentence -> [LabelledContent] -> ReqsSub
- FReqsSub' :: [LabelledContent] -> ReqsSub
- NonFReqsSub :: ReqsSub
- data PDSub where
- TermsAndDefs :: Concept c => Maybe Sentence -> [c] -> PDSub
- PhySysDesc :: Idea a => a -> [Sentence] -> LabelledContent -> [Contents] -> PDSub
- Goals :: [Sentence] -> PDSub
- data ProblemDescription where
- PDProg :: Sentence -> [Section] -> [PDSub] -> ProblemDescription
- newtype SSDSec = SSDProg [SSDSub]
- data SSDSub where
- SSDProblem :: ProblemDescription -> SSDSub
- SSDSolChSpec :: SolChSpec -> SSDSub
- data SCSSub where
- Assumptions :: SCSSub
- TMs :: [Sentence] -> Fields -> SCSSub
- GDs :: [Sentence] -> Fields -> DerivationDisplay -> SCSSub
- DDs :: [Sentence] -> Fields -> DerivationDisplay -> SCSSub
- IMs :: [Sentence] -> Fields -> DerivationDisplay -> SCSSub
- Constraints :: (HasUncertainty c, Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => Sentence -> [c] -> SCSSub
- CorrSolnPpties :: (Quantity c, Constrained c) => [c] -> [Contents] -> SCSSub
- data SolChSpec where
- newtype AppndxSec = AppndxProg [Contents]
- data AuxConstntSec = AuxConsProg CI [ConstQDef]
- data DerivationDisplay
- data Emphasis
- newtype OffShelfSolnsSec = OffShelfSolnsProg [Contents]
- newtype GSDSec = GSDProg [GSDSub]
- data GSDSub where
- data IntroSec = IntroProg Sentence Sentence [IntroSub]
- data IntroSub where
- data LFunc where
- Term :: LFunc
- Defn :: LFunc
- TermExcept :: [DefinedQuantityDict] -> LFunc
- DefnExcept :: [DefinedQuantityDict] -> LFunc
- TAD :: LFunc
- data Literature
- data RefSec = RefProg Contents [RefTab]
- data RefTab where
- newtype StkhldrSec = StkhldrProg [StkhldrSub]
- data StkhldrSub where
- Client :: CI -> Sentence -> StkhldrSub
- Cstmr :: CI -> StkhldrSub
- data TConvention
- newtype TraceabilitySec = TraceabilityProg [TraceConfig]
- data TSIntro
- data TUIntro
- data Field
- type Fields = [Field]
- data InclUnits = IncludeUnits
- data Verbosity
- mkDoc :: SRSDecl -> (IdeaDict -> IdeaDict -> Sentence) -> SystemInformation -> Document
- fillcdbSRS :: SRSDecl -> SystemInformation -> SystemInformation
- intro :: Contents
- traceMatStandard :: SystemInformation -> [TraceConfig]
- tsymb :: [TSIntro] -> RefTab
- tsymb'' :: [TSIntro] -> LFunc -> RefTab
- purpDoc :: CI -> Verbosity -> [Sentence]
Chunk database types and functions
Imported from Database.Drasil
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.
SI | |
|
Instances
HasSystemInformation SystemInformation | |
Defined in SysInfo.Drasil.SystemInformation systemInformation :: Lens' SystemInformation SystemInformation # authors :: Lens' SystemInformation People # background :: Lens' SystemInformation Background # configFiles :: Lens' SystemInformation [String] # constants :: Lens' SystemInformation [ConstQDef] # datadefs :: Lens' SystemInformation [DataDefinition] # defSequence :: Lens' SystemInformation [Block SimpleQDef] # instModels :: Lens' SystemInformation [InstanceModel] # motivation :: Lens' SystemInformation Motivation # purpose :: Lens' SystemInformation Purpose # scope :: Lens' SystemInformation Scope # sysinfodb :: Lens' SystemInformation ChunkDB # usedinfodb :: Lens' SystemInformation ChunkDB # |
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:
- [
Quantity
] (forSymbolMap
), NamedIdea
s (forTermMap
),Concept
s (forConceptMap
),- Units (something that
IsUnit
forUnitMap
), DataDefinition
s (forDatadefnMap
),InstanceModel
s (forInsModelMap
),GenDefn
s (forGendefMap
),TheoryModel
s (forTheoryModelMap
),ConceptInstance
s (forConceptInstanceMap
),Section
s (forSectionMap
),LabelledContent
s (forLabelledContentMap
).
rdb :: BibRef -> [ConceptInstance] -> ReferenceDB #
Smart constructor for creating a reference database from a bibliography and concept instances.
Printing Information needed to generate all documents
Imported from Language.Drasil.Printers
data PrintingInformation #
Printing information contains a database, a stage, and a printing configuration.
PI | |
|
Instances
HasPrintingOptions PrintingInformation | Finds the notation used for the |
Defined in Language.Drasil.Printing.PrintingInformation getSetting :: Lens' PrintingInformation Notation # |
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 (DocSection
s).
data DocSection Source #
Contains all the different sections needed for a full SRS (SRSDecl
).
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. |
Requirements subsections.
FReqsSub :: Sentence -> [LabelledContent] -> ReqsSub | Functional requirements. |
FReqsSub' :: [LabelledContent] -> ReqsSub | Functional requirements. |
NonFReqsSub :: ReqsSub | Non-Functional requirements. |
Problem Description subsections.
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.
PDProg :: Sentence -> [Section] -> [PDSub] -> ProblemDescription |
Specific System Description section (wraps SSDSub
subsections).
Specific System Description subsections.
SSDProblem :: ProblemDescription -> SSDSub | Problem description. |
SSDSolChSpec :: SolChSpec -> SSDSub | Solution characteristics. |
Solution Characteristics Specification subsections.
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. |
Solution Characteristics Specification section (wraps SCSSub
subsections).
Document subsection types needed for a SRS
Imported from Drasil.DocumentLanguage.Core
data DerivationDisplay Source #
Choose whether to show or hide the derivation of an expression.
How to handle emphasis of words.
General System Description section (wraps GSDSub
subsections).
General System Description subsections.
Introduction section. Contents are top level followed by a list of subsections.
Introduction subsections.
Lens (lookup) functions (currently for TSymb).
Term :: LFunc | |
Defn :: LFunc | |
TermExcept :: [DefinedQuantityDict] -> LFunc | |
DefnExcept :: [DefinedQuantityDict] -> LFunc | |
TAD | |
|
data Literature Source #
Types of literature.
Reference section. Contents are top level followed by a list of subsections.
Reference subsections (tables) made out of units or symbols (can be customized).
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
).
data StkhldrSub where Source #
Stakeholders subsections.
Client :: CI -> Sentence -> StkhldrSub | May have a client. |
Cstmr :: CI -> StkhldrSub | May have a customer. |
data TConvention Source #
Possible typographic conventions.
newtype TraceabilitySec Source #
Traceability Matices and Graphs section. Contains configurations (TraceConfig
).
For creating a table of symbols introduction
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. |
For creating the table of units introduction.
Document subsection helper types
Imported from Drasil.DocumentLanguage.Definitions
Fields that should be displayed in definitions.
Determines whether to include or ignore units.
IncludeUnits | In description field (for other symbols). |
Refers to the verbosity of statements.
SRS Document creator functions
Imported from Drasil.DocumentLanguage
mkDoc :: SRSDecl -> (IdeaDict -> IdeaDict -> Sentence) -> SystemInformation -> Document Source #
Creates a document from a document description, a title combinator function, and system information.
Helper functions to make an SRS Document
Imports from various sections of drasil-docLang
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.