Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Re-export document language types and functions for easy use in other packages.
Synopsis
- 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
- mkDoc :: SRSDecl -> (IdeaDict -> IdeaDict -> Sentence) -> SystemInformation -> Document
- fillTraceSI :: SRSDecl -> SystemInformation -> SystemInformation
- fillcdbSRS :: SRSDecl -> SystemInformation -> SystemInformation
- findAllRefs :: Section -> [Reference]
- type LsnDecl = [LsnChapter]
- data LsnChapter
- newtype Intro = IntrodProg [Contents]
- newtype LearnObj = LrnObjProg [Contents]
- newtype Review = ReviewProg [Contents]
- newtype CaseProb = CaseProbProg [Contents]
- newtype Example = ExampleProg [Contents]
- newtype Smmry = SmmryProg [Contents]
- newtype Apndx = ApndxProg [Contents]
- mkNb :: LsnDecl -> (IdeaDict -> IdeaDict -> Sentence) -> SystemInformation -> Document
- data Field
- type Fields = [Field]
- data InclUnits = IncludeUnits
- data Verbosity
- ddefn :: Fields -> SystemInformation -> DataDefinition -> LabelledContent
- mkGraphInfo :: SystemInformation -> GraphInfo
- traceyGraphGetRefs :: String -> [Reference]
- traceMatStandard :: SystemInformation -> [TraceConfig]
- traceMatOtherReq :: SystemInformation -> TraceConfig
- generateTraceMap :: [DocSection] -> TraceMap
- tableOfConstants :: [ConstQDef] -> LabelledContent
- purpDoc :: CI -> Verbosity -> [Sentence]
- intro :: Contents
- emptySectSentPlu :: NamedIdea n => [n] -> Sentence
- emptySectSentSing :: NamedIdea n => [n] -> Sentence
- tsymb :: [TSIntro] -> RefTab
- tsymb'' :: [TSIntro] -> LFunc -> RefTab
- unitTableRef :: Reference
- tunit :: [TUIntro] -> RefTab
- tunit' :: [TUIntro] -> RefTab
- tunitNone :: [TUIntro] -> RefTab
- inReq :: Sentence -> ConceptInstance
- inTable :: (Quantity i, MayHaveUnit i) => [i] -> LabelledContent
- mkInputPropsTable :: (Quantity i, MayHaveUnit i, HasShortName r, Referable r) => [i] -> r -> LabelledContent
- mkQRTuple :: (HasOutput i, HasShortName i, Referable i) => [i] -> [(QuantityDict, Sentence)]
- mkQRTupleRef :: (Quantity i, MayHaveUnit i, HasShortName r, Referable r) => [i] -> [r] -> [(QuantityDict, Sentence)]
- mkValsSourceTable :: (Quantity i, MayHaveUnit i) => [(i, Sentence)] -> String -> Sentence -> LabelledContent
- reqInputsRef :: Reference
- mkMaintainableNFR :: String -> Integer -> String -> ConceptInstance
- mkPortableNFR :: String -> [String] -> String -> ConceptInstance
- mkCorrectNFR :: String -> String -> ConceptInstance
- mkVerifiableNFR :: String -> String -> ConceptInstance
- mkUnderstandableNFR :: String -> String -> ConceptInstance
- mkReusableNFR :: String -> String -> ConceptInstance
- mkSecurityNFR :: String -> String -> ConceptInstance
- auxSpecSent :: Sentence
- termDefnF' :: Maybe Sentence -> [Contents] -> Section
- inDataConstTbl :: (HasUncertainty c, Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => [c] -> LabelledContent
- outDataConstTbl :: (Quantity c, Constrained c) => [c] -> LabelledContent
- getDocDesc :: DocDesc -> [Sentence]
- egetDocDesc :: DocDesc -> [ModelExpr]
- secRefs :: [Reference]
Document Language
SRS
For generating Software Requirements Specifications.
Types
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).
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
).
TraceabilityProg [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.
Functions
mkDoc :: SRSDecl -> (IdeaDict -> IdeaDict -> Sentence) -> SystemInformation -> Document Source #
Creates a document from a document description, a title combinator function, and system information.
fillTraceSI :: SRSDecl -> SystemInformation -> SystemInformation Source #
Helper for filling in the traceability matrix and graph information into the system.
findAllRefs :: Section -> [Reference] Source #
Recursively find all references in a section (meant for getting at LabelledContent
).
Notebook
For generating Jupyter notebook lesson plans.
Types
type LsnDecl = [LsnChapter] Source #
A Lesson Plan notebook declaration is made up of all necessary chapters (LsnChapter
s).
data LsnChapter Source #
Contains all the different chapters needed for a notebook lesson plan (LsnDecl
).
Functions
mkNb :: LsnDecl -> (IdeaDict -> IdeaDict -> Sentence) -> SystemInformation -> Document Source #
Creates a notebook from a lesson description and system information.
Subsection Functions
Definitions and Models
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.
ddefn :: Fields -> SystemInformation -> DataDefinition -> LabelledContent Source #
Create a data definition using a list of fields, a database of symbols, and a
QDefinition
(called automatically by SCSSub
program).
Traceability
mkGraphInfo :: SystemInformation -> GraphInfo Source #
Extracts traceability graph inforomation from filled-in SystemInformation
.
traceyGraphGetRefs :: String -> [Reference] Source #
Create references to traceability graphs given an example name. Primarily used for reference database in examples.
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.
traceMatOtherReq :: SystemInformation -> TraceConfig Source #
Records other requirements. Converts the SystemInformation
into a TraceConfig
.
generateTraceMap :: [DocSection] -> TraceMap Source #
Creates a traceability map from document sections.
Auxiliary Constants
tableOfConstants :: [ConstQDef] -> LabelledContent Source #
Helper that gets a table of constants from a QDefinition
.
Introduction
purpDoc :: CI -> Verbosity -> [Sentence] Source #
Combines purpDocPara1
and developmentProcessParagraph
.
Verbosity controls if the developmentProcessParagraph
is added or not.
Reference Material
emptySectSentPlu :: NamedIdea n => [n] -> Sentence Source #
Helper for variants of emptySectSent
emptySectSentSing :: NamedIdea n => [n] -> Sentence Source #
Helper for variants of emptySectSent
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.
unitTableRef :: Reference Source #
Makes a reference to the Table of Units.
tunit' :: [TUIntro] -> RefTab Source #
Table of units with SI name in the description column.
Table of units constructors.
tunitNone :: [TUIntro] -> RefTab Source #
Table of units with SI name in the description column.
Table of units constructors.
Requirements
inReq :: Sentence -> ConceptInstance Source #
Creates a ConceptInstance
of input values.
inTable :: (Quantity i, MayHaveUnit i) => [i] -> LabelledContent Source #
Creates a generalized input-value table for the Requirements section.
mkInputPropsTable :: (Quantity i, MayHaveUnit i, HasShortName r, Referable r) => [i] -> r -> LabelledContent Source #
Creates an Input Data Table for use in the Functional Requirments section. Takes a list of wrapped variables and something that is Referable
.
mkQRTuple :: (HasOutput i, HasShortName i, Referable i) => [i] -> [(QuantityDict, Sentence)] Source #
mkQRTupleRef :: (Quantity i, MayHaveUnit i, HasShortName r, Referable r) => [i] -> [r] -> [(QuantityDict, Sentence)] Source #
mkValsSourceTable :: (Quantity i, MayHaveUnit i) => [(i, Sentence)] -> String -> Sentence -> LabelledContent Source #
Creates a table for use in the Functional Requirments section. Takes a list of tuples containing variables and sources, a label, and a caption.
reqInputsRef :: Reference Source #
Reference for the Required Inputs table.
mkMaintainableNFR :: String -> Integer -> String -> ConceptInstance Source #
mkPortableNFR :: String -> [String] -> String -> ConceptInstance Source #
Common Non-Functional Requirement for Portability.
mkCorrectNFR :: String -> String -> ConceptInstance Source #
Common Non-Functional Requirement for Correctness.
mkVerifiableNFR :: String -> String -> ConceptInstance Source #
Common Non-Functional Requirement for Verifiability.
mkUnderstandableNFR :: String -> String -> ConceptInstance Source #
Common Non-Functional Requirement for Understandability.
mkReusableNFR :: String -> String -> ConceptInstance Source #
Common Non-Functional Requirement for Reusability.
mkSecurityNFR :: String -> String -> ConceptInstance Source #
Common Non-Functional Requirement for Security.
Specific System Description
auxSpecSent :: Sentence Source #
General Sentence
that describes some auxiliary specifications of the system.
termDefnF' :: Maybe Sentence -> [Contents] -> Section Source #
Similar to termDefnF
, except does not take definitions from the list of terms.
inDataConstTbl :: (HasUncertainty c, Quantity c, Constrained c, HasReasVal c, MayHaveUnit c) => [c] -> LabelledContent Source #
Creates the input Data Constraints Table.
outDataConstTbl :: (Quantity c, Constrained c) => [c] -> LabelledContent Source #
Creates the output Data Constraints Table.
Document Extraction Function
getDocDesc :: DocDesc -> [Sentence] Source #
Extracts Sentence
s from a document description.
egetDocDesc :: DocDesc -> [ModelExpr] Source #
Extracts expressions from the document description (DocDesc
) and default DLPlate
.