module Drasil.Projectile.Requirements (funcReqs, nonfuncReqs) where
import Language.Drasil
import Drasil.DocLang.SRS (datCon, propCorSol)
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.Sentence.Combinators as S
import Data.Drasil.Concepts.Computation (inValue)
import Data.Drasil.Concepts.Documentation (assumption, code, datumConstraint,
environment, funcReqDom, likelyChg, mg, mis, module_, nonFuncReqDom, output_,
property, requirement, srs, traceyMatrix, unlikelyChg, value, vavPlan, propOfCorSol)
import Data.Drasil.Concepts.Math (calculation)
import Data.Drasil.Concepts.Software (errMsg)
import Data.Drasil.TheoryConcepts (dataDefn, genDefn, inModel, thModel)
import Drasil.Projectile.IMods (landPosIM, messageIM, offsetIM, timeIM)
import Drasil.Projectile.Unitals (flightDur, landPos, message, offset)
funcReqs :: [ConceptInstance]
funcReqs :: [ConceptInstance]
funcReqs = [ConceptInstance
verifyInVals, ConceptInstance
calcValues, ConceptInstance
outputValues]
verifyInVals, calcValues, outputValues :: ConceptInstance
verifyInVals :: ConceptInstance
verifyInVals = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "verifyInVals" Sentence
verifyParamsDesc "Verify-Input-Values" ConceptChunk
funcReqDom
calcValues :: ConceptInstance
calcValues = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "calcValues" Sentence
calcValuesDesc "Calculate-Values" ConceptChunk
funcReqDom
outputValues :: ConceptInstance
outputValues = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "outputValues" Sentence
outputValuesDesc "Output-Values" ConceptChunk
funcReqDom
verifyParamsDesc, calcValuesDesc, outputValuesDesc :: Sentence
verifyParamsDesc :: Sentence
verifyParamsDesc = [Sentence] -> Sentence
foldlSent [String -> Sentence
S "Check the entered", NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
inValue,
String -> Sentence
S "to ensure that they do not exceed the" Sentence -> Sentence -> Sentence
+:+. Section -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef ([Contents] -> [Section] -> Section
datCon [] []) (NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
datumConstraint),
String -> Sentence
S "If any of the", NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
inValue, String -> Sentence
S "are out of bounds" Sentence -> Sentence -> Sentence
`sC`
String -> Sentence
S "an", ConceptChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
phrase ConceptChunk
errMsg, String -> Sentence
S "is displayed" Sentence -> Sentence -> Sentence
`S.andThe` ConceptChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural ConceptChunk
calculation, String -> Sentence
S "stop"]
calcValuesDesc :: Sentence
calcValuesDesc = [Sentence] -> Sentence
foldlSent [String -> Sentence
S "Calculate the following" Sentence -> Sentence -> Sentence
+: NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
value,
SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List [
ConstrConcept -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch ConstrConcept
flightDur Sentence -> Sentence -> Sentence
+:+ InstanceModel -> Sentence
forall r. (Referable r, HasShortName r) => r -> Sentence
fromSource InstanceModel
timeIM,
ConstrConcept -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch ConstrConcept
landPos Sentence -> Sentence -> Sentence
+:+ InstanceModel -> Sentence
forall r. (Referable r, HasShortName r) => r -> Sentence
fromSource InstanceModel
landPosIM,
ConstrConcept -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch ConstrConcept
offset Sentence -> Sentence -> Sentence
+:+ InstanceModel -> Sentence
forall r. (Referable r, HasShortName r) => r -> Sentence
fromSource InstanceModel
offsetIM,
QuantityDict -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch QuantityDict
message Sentence -> Sentence -> Sentence
+:+ InstanceModel -> Sentence
forall r. (Referable r, HasShortName r) => r -> Sentence
fromSource InstanceModel
messageIM
]]
outputValuesDesc :: Sentence
outputValuesDesc = [Sentence] -> Sentence
foldlSent [NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
atStart NamedChunk
output_, QuantityDict -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch QuantityDict
message,
InstanceModel -> Sentence
forall r. (Referable r, HasShortName r) => r -> Sentence
fromSource InstanceModel
messageIM Sentence -> Sentence -> Sentence
`S.and_` ConstrConcept -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch ConstrConcept
offset, InstanceModel -> Sentence
forall r. (Referable r, HasShortName r) => r -> Sentence
fromSource InstanceModel
offsetIM]
nonfuncReqs :: [ConceptInstance]
nonfuncReqs :: [ConceptInstance]
nonfuncReqs = [ConceptInstance
correct, ConceptInstance
verifiable, ConceptInstance
understandable, ConceptInstance
reusable, ConceptInstance
maintainable, ConceptInstance
portable]
correct :: ConceptInstance
correct :: ConceptInstance
correct = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "correct" ([Sentence] -> Sentence
foldlSent [
NP -> Sentence
forall n. NounPhrase n => n -> Sentence
atStartNP' (NamedChunk
output_ NamedChunk -> NamedChunk -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`the_ofThePS` NamedChunk
code), String -> Sentence
S "have the",
NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
property, String -> Sentence
S "described in", Section -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef ([Contents] -> [Section] -> Section
propCorSol [] []) (NamedChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize' NamedChunk
propOfCorSol)
]) "Correct" ConceptChunk
nonFuncReqDom
verifiable :: ConceptInstance
verifiable :: ConceptInstance
verifiable = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "verifiable" ([Sentence] -> Sentence
foldlSent [
NP -> Sentence
forall n. NounPhrase n => n -> Sentence
atStartNP (NamedChunk -> NP
forall t. NamedIdea t => t -> NP
the NamedChunk
code), String -> Sentence
S "is tested with complete",
NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
phrase NamedChunk
vavPlan]) "Verifiable" ConceptChunk
nonFuncReqDom
understandable :: ConceptInstance
understandable :: ConceptInstance
understandable = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "understandable" ([Sentence] -> Sentence
foldlSent [
NP -> Sentence
forall n. NounPhrase n => n -> Sentence
atStartNP (NamedChunk -> NP
forall t. NamedIdea t => t -> NP
the NamedChunk
code), String -> Sentence
S "is modularized with complete",
NP -> Sentence
forall n. NounPhrase n => n -> Sentence
phraseNP (CI
mg CI -> CI -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`and_` CI
mis)]) "Understandable" ConceptChunk
nonFuncReqDom
reusable :: ConceptInstance
reusable :: ConceptInstance
reusable = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "reusable" ([Sentence] -> Sentence
foldlSent [NP -> Sentence
forall n. NounPhrase n => n -> Sentence
atStartNP (NamedChunk -> NP
forall t. NamedIdea t => t -> NP
the NamedChunk
code), String -> Sentence
S "is modularized"]) "Reusable" ConceptChunk
nonFuncReqDom
maintainable :: ConceptInstance
maintainable :: ConceptInstance
maintainable = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "maintainable" ([Sentence] -> Sentence
foldlSent [
String -> Sentence
S "The traceability between", SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List [CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
requirement,
CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
assumption, CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
thModel, CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
genDefn, CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
dataDefn, CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
inModel,
CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
likelyChg, CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural CI
unlikelyChg, NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
module_], String -> Sentence
S "is completely recorded in",
NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
traceyMatrix, String -> Sentence
S "in the", CI -> Sentence
getAcc CI
srs Sentence -> Sentence -> Sentence
`S.and_` CI -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
phrase CI
mg]) "Maintainable" ConceptChunk
nonFuncReqDom
portable :: ConceptInstance
portable :: ConceptInstance
portable = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic "portable" ([Sentence] -> Sentence
foldlSent [
NP -> Sentence
forall n. NounPhrase n => n -> Sentence
atStartNP (NamedChunk -> NP
forall t. NamedIdea t => t -> NP
the NamedChunk
code), String -> Sentence
S "is able to be run in different", NamedChunk -> Sentence
forall n. (HasUID n, NamedIdea n) => n -> Sentence
plural NamedChunk
environment])
"Portable" ConceptChunk
nonFuncReqDom