module Drasil.GlassBR.Changes (likelyChgs, unlikelyChgs) where

--A list of likely and unlikely changes for GlassBR

import Language.Drasil hiding (variable)
import Language.Drasil.Chunk.Concept.NamedCombinators

import Data.Drasil.Concepts.Documentation (condition, goal, input_, likeChgDom,
  software, system, unlikeChgDom, value, variable)
import Data.Drasil.Concepts.Math (calculation)
import Data.Drasil.Concepts.PhysicalProperties (flexure)

import Drasil.GlassBR.Assumptions (assumpGC, assumpES, assumpSV, assumpGL,
  assumpBC, assumpRT, assumpLDFC, assumptionConstants)
import Drasil.GlassBR.Concepts (blastRisk, glaSlab, glass)
import Drasil.GlassBR.Unitals (explosion, lite)

{--LIKELY CHANGES--}

likelyChgs :: [ConceptInstance]
likelyChgs :: [ConceptInstance]
likelyChgs = [ConceptInstance
calcInternalBlastRisk, ConceptInstance
varValsOfmkE, ConceptInstance
accMoreThanSingleLite,
  ConceptInstance
accMoreBoundaryConditions, ConceptInstance
considerMoreThanFlexGlass]

calcInternalBlastRisk, varValsOfmkE, accMoreThanSingleLite, accMoreBoundaryConditions,
  considerMoreThanFlexGlass :: ConceptInstance

calcInternalBlastRisk :: ConceptInstance
calcInternalBlastRisk     = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"calcInternalBlastRisk"     (IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
calcInternalBlastRiskDesc IdeaDict
blastRisk) String
"Calculate-Internal-Blast-Risk"       ConceptChunk
likeChgDom
varValsOfmkE :: ConceptInstance
varValsOfmkE              = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"varValsOfmkE"              Sentence
varValsOfmkEDesc                      String
"Variable-Values-of-m,k,E"            ConceptChunk
likeChgDom
accMoreThanSingleLite :: ConceptInstance
accMoreThanSingleLite     = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"accMoreThanSingleLite"     Sentence
accMoreThanSingleLiteDesc             String
"Accomodate-More-than-Single-Lite"    ConceptChunk
likeChgDom
accMoreBoundaryConditions :: ConceptInstance
accMoreBoundaryConditions = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"accMoreBoundaryConditions" Sentence
accMoreBoundaryConditionsDesc         String
"Accomodate-More-Boundary-Conditions" ConceptChunk
likeChgDom
considerMoreThanFlexGlass :: ConceptInstance
considerMoreThanFlexGlass = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"considerMoreThanFlexGlass" Sentence
considerMoreThanFlexGlassDesc         String
"Consider-More-than-Flexure-Glass"    ConceptChunk
likeChgDom

calcInternalBlastRiskDesc :: NamedIdea n => n -> Sentence
varValsOfmkEDesc, accMoreThanSingleLiteDesc, accMoreBoundaryConditionsDesc, considerMoreThanFlexGlassDesc :: Sentence

calcInternalBlastRiskDesc :: forall n. NamedIdea n => n -> Sentence
calcInternalBlastRiskDesc n
mainConcept = [Sentence] -> Sentence
foldlSent [ConceptInstance -> Sentence -> Sentence
forall x.
(HasShortName x, Referable x) =>
x -> Sentence -> Sentence
chgsStart ConceptInstance
assumpES (String -> Sentence
S String
"The"),
  IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
system, String -> Sentence
S String
"currently only calculates for external" Sentence -> Sentence -> Sentence
+:+.
  n -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase n
mainConcept, String -> Sentence
S String
"In the future,", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
calculation,
  String -> Sentence
S String
"can be added for the internal", n -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase n
mainConcept]

varValsOfmkEDesc :: Sentence
varValsOfmkEDesc = [Sentence] -> Sentence
foldlSent [ConceptInstance -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS ConceptInstance
assumpSV Sentence -> Sentence -> Sentence
`sC` ConceptInstance -> Sentence -> Sentence
forall x.
(HasShortName x, Referable x) =>
x -> Sentence -> Sentence
chgsStart ConceptInstance
assumpLDFC (String -> Sentence
S String
"Currently, the"),
  IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
plural IdeaDict
value, String -> Sentence
S String
"for", SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List ((ConstQDef -> Sentence) -> [ConstQDef] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map ConstQDef -> Sentence
forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch (Int -> [ConstQDef] -> [ConstQDef]
forall a. Int -> [a] -> [a]
take Int
3 [ConstQDef]
assumptionConstants)),
  String -> Sentence
S String
"are assumed to be the same for all" Sentence -> Sentence -> Sentence
+:+. IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
glass,
  String -> Sentence
S String
"In the future, these", IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
plural IdeaDict
value, String -> Sentence
S String
"can be changed to",
  NP -> Sentence
forall n. NounPhrase n => n -> Sentence
pluralNP (IdeaDict -> IdeaDict -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
combineNINI IdeaDict
variable IdeaDict
input_)]

accMoreThanSingleLiteDesc :: Sentence
accMoreThanSingleLiteDesc = [Sentence] -> Sentence
foldlSent [ConceptInstance -> Sentence -> Sentence
forall x.
(HasShortName x, Referable x) =>
x -> Sentence -> Sentence
chgsStart ConceptInstance
assumpGL (String -> Sentence
S String
"The"), IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
software,
  String -> Sentence
S String
"may be changed to accommodate more than a single", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
lite]

accMoreBoundaryConditionsDesc :: Sentence
accMoreBoundaryConditionsDesc = [Sentence] -> Sentence
foldlSent [ConceptInstance -> Sentence -> Sentence
forall x.
(HasShortName x, Referable x) =>
x -> Sentence -> Sentence
chgsStart ConceptInstance
assumpBC (String -> Sentence
S String
"The"), IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
software,
  String -> Sentence
S String
"may be changed to accommodate more boundary", IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
plural IdeaDict
condition,
  String -> Sentence
S String
"than 4-sided support"]

considerMoreThanFlexGlassDesc :: Sentence
considerMoreThanFlexGlassDesc = [Sentence] -> Sentence
foldlSent [ConceptInstance -> Sentence -> Sentence
forall x.
(HasShortName x, Referable x) =>
x -> Sentence -> Sentence
chgsStart ConceptInstance
assumpRT (String -> Sentence
S String
"The"), IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
software,
  String -> Sentence
S String
"may be changed to consider more than just", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
flexure,
  String -> Sentence
S String
"of the glass"]

{--UNLIKELY CHANGES--}

unlikelyChgs :: [ConceptInstance]
unlikelyChgs :: [ConceptInstance]
unlikelyChgs = [ConceptInstance
predictWithstandOfCertDeg, ConceptInstance
accAlteredGlass]

predictWithstandOfCertDeg, accAlteredGlass :: ConceptInstance

predictWithstandOfCertDeg :: ConceptInstance
predictWithstandOfCertDeg = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"predictWithstandOfCertDeg" Sentence
predictWithstandOfCertDegDesc String
"Predict-Withstanding-of-Certain-Degree"  ConceptChunk
unlikeChgDom
accAlteredGlass :: ConceptInstance
accAlteredGlass           = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"accAlteredGlass"           Sentence
accAlteredGlassDesc           String
"Accommodate-Altered-Glass"               ConceptChunk
unlikeChgDom

predictWithstandOfCertDegDesc, accAlteredGlassDesc :: Sentence

predictWithstandOfCertDegDesc :: Sentence
predictWithstandOfCertDegDesc = [Sentence] -> Sentence
foldlSent [NP -> Sentence
forall n. NounPhrase n => n -> Sentence
atStartNP (IdeaDict
goal IdeaDict -> IdeaDict -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`the_ofThe` IdeaDict
system),
  String -> Sentence
S String
"is to predict whether the", IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
glaSlab, String -> Sentence
S String
"under consideration can",
  String -> Sentence
S String
"withstand an", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
explosion, String -> Sentence
S String
"of a certain degree"]

accAlteredGlassDesc :: Sentence
accAlteredGlassDesc = [Sentence] -> Sentence
foldlSent [ConceptInstance -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS ConceptInstance
assumpGC, String -> Sentence
S String
"requires that the", IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
glass Sentence -> Sentence -> Sentence
+:+.
  String -> Sentence
S String
"is not altered in any way", String -> Sentence
S String
"Therefore, this cannot be used on altered",
  IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
glass]