module Drasil.GlassBR.TMods (tMods, pbIsSafe, lrIsSafe) where
import Language.Drasil
import Theory.Drasil (TheoryModel, tm, equationalModel')
import Drasil.GlassBR.References (astm2009)
import Drasil.GlassBR.Unitals (isSafeLoad, isSafeProb, pbTolfail, probFail,
tmDemand, tmLRe)
tMods :: [TheoryModel]
tMods :: [TheoryModel]
tMods = [TheoryModel
pbIsSafe, TheoryModel
lrIsSafe]
lrIsSafe :: TheoryModel
lrIsSafe :: TheoryModel
lrIsSafe =
ModelKind ModelExpr
-> [DecRef] -> String -> [Sentence] -> TheoryModel
tm (QDefinition ModelExpr -> ModelKind ModelExpr
forall e. QDefinition e -> ModelKind e
equationalModel' QDefinition ModelExpr
lrIsSafeQD) [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
astm2009] String
"isSafeLoad" [Sentence
lrIsSafeDesc]
lrIsSafeQD :: ModelQDef
lrIsSafeQD :: QDefinition ModelExpr
lrIsSafeQD = DefinedQuantityDict -> NP -> ModelExpr -> QDefinition ModelExpr
forall c e.
(Quantity c, MayHaveUnit c) =>
c -> NP -> e -> QDefinition e
mkQuantDef' DefinedQuantityDict
isSafeLoad (String -> NP
nounPhraseSP String
"Safety Load") ModelExpr
PExpr
lrIsSafeExpr
lrIsSafeExpr :: PExpr
lrIsSafeExpr :: PExpr
lrIsSafeExpr = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tmLRe r -> r -> r
forall r. ExprC r => r -> r -> r
$> UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tmDemand
lrIsSafeDesc :: Sentence
lrIsSafeDesc :: Sentence
lrIsSafeDesc = DefinedQuantityDict -> Sentence
tModDesc DefinedQuantityDict
isSafeLoad
pbIsSafe :: TheoryModel
pbIsSafe :: TheoryModel
pbIsSafe =
ModelKind ModelExpr
-> [DecRef] -> String -> [Sentence] -> TheoryModel
tm (QDefinition ModelExpr -> ModelKind ModelExpr
forall e. QDefinition e -> ModelKind e
equationalModel' QDefinition ModelExpr
pbIsSafeQD) [Citation -> DecRef
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> DecRef
dRef Citation
astm2009] String
"isSafeProb" [Sentence
pbIsSafeDesc]
pbIsSafeQD :: ModelQDef
pbIsSafeQD :: QDefinition ModelExpr
pbIsSafeQD = DefinedQuantityDict -> NP -> ModelExpr -> QDefinition ModelExpr
forall c e.
(Quantity c, MayHaveUnit c) =>
c -> NP -> e -> QDefinition e
mkQuantDef' DefinedQuantityDict
isSafeProb (String -> NP
nounPhraseSP String
"Safety Probability") ModelExpr
PExpr
pbIsSafeExpr
pbIsSafeExpr :: PExpr
pbIsSafeExpr :: PExpr
pbIsSafeExpr = ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
probFail r -> r -> r
forall r. ExprC r => r -> r -> r
$< ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
pbTolfail
pbIsSafeDesc :: Sentence
pbIsSafeDesc :: Sentence
pbIsSafeDesc = DefinedQuantityDict -> Sentence
tModDesc DefinedQuantityDict
isSafeProb
tModDesc :: DefinedQuantityDict -> Sentence
tModDesc :: DefinedQuantityDict -> Sentence
tModDesc DefinedQuantityDict
main = String -> Sentence
S String
"If" Sentence -> Sentence -> Sentence
+:+. (DefinedQuantityDict -> Sentence
forall t.
(IsChunk t, Idea t, HasSpace t, HasSymbol t) =>
t -> Sentence
ch DefinedQuantityDict
main Sentence -> Sentence -> Sentence
`sC` String -> Sentence
S String
"the structure is considered safe")