module Drasil.SSP.Defs where --export all of this file

import Language.Drasil
import Data.Drasil.Domains (civilEng)
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.Sentence.Combinators as S

import Data.Drasil.Concepts.Documentation (analysis, assumption, goalStmt,
  likelyChg, physSyst, property, requirement, refBy, refName, safety, srs, typUnc, 
  unlikelyChg)
import Data.Drasil.Concepts.Education (mechanics)
import Data.Drasil.Concepts.Math (surface)
import Data.Drasil.Concepts.Physics (twoD, threeD, force, stress)
import Data.Drasil.Concepts.PhysicalProperties (dimension, len)
import Data.Drasil.Concepts.SolidMechanics (mobShear, normForce, nrmStrss,shearRes)
import Data.Drasil.TheoryConcepts (dataDefn, genDefn, inModel, thModel)

----Acronyms-----
acronyms :: [CI]
acronyms :: [CI]
acronyms = [CI
twoD, CI
threeD, CI
assumption, CI
dataDefn, CI
genDefn, CI
goalStmt, CI
inModel, CI
likelyChg,
  CI
physSyst, CI
requirement, CI
refBy, CI
refName, CI
srs, CI
ssp, CI
thModel, CI
typUnc, CI
unlikelyChg]

ssp :: CI
ssp :: CI
ssp = String -> NP -> String -> [IdeaDict] -> CI
commonIdeaWithDict String
"ssp" (String -> NP
pn' String
"Slope Stability analysis Program") String
"SSP"   [IdeaDict
civilEng]

defs :: [IdeaDict]
defs :: [IdeaDict]
defs = [IdeaDict
factor, IdeaDict
soil, IdeaDict
material, IdeaDict
intrslce, IdeaDict
layer, IdeaDict
slip, IdeaDict
slope, IdeaDict
slice, IdeaDict
morPrice,
  IdeaDict
soilPrpty, IdeaDict
mtrlPrpty, IdeaDict
itslPrpty, IdeaDict
slopeSrf, IdeaDict
soilLyr, IdeaDict
soilMechanics, 
  IdeaDict
stabAnalysis, IdeaDict
ssa]

defs' :: [ConceptChunk]
defs' :: [ConceptChunk]
defs' = [ConceptChunk
slpSrf, ConceptChunk
crtSlpSrf, ConceptChunk
plnStrn, ConceptChunk
fsConcept, ConceptChunk
waterTable]

----Other Common Phrases----
soil, layer, material, intrslce, slip, slope, slice, stability,
  morPrice :: IdeaDict
intrslce :: IdeaDict
intrslce = String -> NP -> IdeaDict
nc String
"interslice" (String -> NP
cn' String
"interslice")
layer :: IdeaDict
layer    = String -> NP -> IdeaDict
nc String
"layer"      (String -> NP
cn' String
"layer")
material :: IdeaDict
material = String -> NP -> IdeaDict
nc String
"material"   (String -> NP
cn' String
"material")
slice :: IdeaDict
slice    = String -> NP -> IdeaDict
nc String
"slice"      (String -> NP
cn' String
"slice")
slip :: IdeaDict
slip     = String -> NP -> IdeaDict
nc String
"slip"       (String -> NP
cn  String
"slip") --FIXME: verb (escape or get loose from (a means of restraint))/noun 
                                        --       (an act of sliding unintentionally for a short distance)?
                                        --       (related to issue #129)
slope :: IdeaDict
slope    = String -> NP -> IdeaDict
nc String
"slope"      (String -> NP
cn' String
"slope")
soil :: IdeaDict
soil     = String -> NP -> IdeaDict
nc String
"soil"       (String -> NP
cn  String
"soil")
stability :: IdeaDict
stability = String -> NP -> IdeaDict
nc String
"stability" (String -> NP
cn String
"stability")

morPrice :: IdeaDict
morPrice = String -> NP -> IdeaDict
nc String
"morPrice"   (String -> NP
pn  String
"Morgenstern-Price")

soilPrpty, mtrlPrpty, itslPrpty, slopeSrf, soilLyr, soilMechanics, 
  stabAnalysis, ssa :: IdeaDict
--slpSrf    = compoundNC slip surface
soilPrpty :: IdeaDict
soilPrpty = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
soil     IdeaDict
property
mtrlPrpty :: IdeaDict
mtrlPrpty = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
material IdeaDict
property
itslPrpty :: IdeaDict
itslPrpty = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
intrslce IdeaDict
property
slopeSrf :: IdeaDict
slopeSrf  = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
slope ConceptChunk
surface
soilLyr :: IdeaDict
soilLyr   = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
soil IdeaDict
layer
soilMechanics :: IdeaDict
soilMechanics = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
soil IdeaDict
mechanics
stabAnalysis :: IdeaDict
stabAnalysis = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
stability IdeaDict
analysis
ssa :: IdeaDict
ssa = forall a b. (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
compoundNC IdeaDict
slope IdeaDict
stabAnalysis

effFandS, slpSrf, crtSlpSrf, plnStrn, fsConcept, waterTable :: ConceptChunk
effFandS :: ConceptChunk
effFandS = String -> NP -> Sentence -> ConceptChunk
dccWDS String
"effective forces and stresses" 
  (String -> NP
cn String
"effective forces and stresses") 
  (forall n. NounPhrase n => n -> Sentence
atStartNP (forall t. NamedIdea t => t -> NP
the ConceptChunk
normForce) Sentence -> Sentence -> Sentence
`S.or_` forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
nrmStrss Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S String
"carried by the" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
soil Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"skeleton" Sentence -> Sentence -> Sentence
`sC`
  String -> Sentence
S String
"composed of the effective" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
force Sentence -> Sentence -> Sentence
`S.or_` forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
stress Sentence -> Sentence -> Sentence
`S.andThe`
  forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
force Sentence -> Sentence -> Sentence
`S.or_` forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
stress Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"exerted by water")

slpSrf :: ConceptChunk
slpSrf = String -> NP -> Sentence -> ConceptChunk
dccWDS String
"slip surface" (String -> NP
cn' String
"slip surface")
  (forall n. NounPhrase n => n -> Sentence
atStartNP (forall t. NamedIdea t => t -> NP
a_ ConceptChunk
surface) Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"within a" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
slope Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"that has the" Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S String
"potential to fail or displace due to load or other" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
force)

--FIXME: move to Concepts/soldMechanics.hs? They are too specific though
plnStrn :: ConceptChunk
plnStrn = String -> NP -> Sentence -> ConceptChunk
dccWDS String
"plane strain" (String -> NP
cn' String
"plane strain") 
  (String -> Sentence
S String
"A condition where the resultant" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
stress Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"in one of" Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S String
"the directions of a " Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase CI
threeD Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"material can be" Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S String
"approximated as zero. This condition results when a body is" Sentence -> Sentence -> Sentence
+:+ 
  String -> Sentence
S String
"constrained to not deform in one direction, or when the" Sentence -> Sentence -> Sentence
+:+ 
  forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
len Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"of one" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
dimension Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"of the body" Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S String
"dominates the others, to the point where it can be assumed as" Sentence -> Sentence -> Sentence
+:+.
  String -> Sentence
S String
"infinite" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
atStart' ConceptChunk
stress Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"in the direction of the" Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S String
"dominant" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
dimension Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
"can be approximated as zero")

crtSlpSrf :: ConceptChunk
crtSlpSrf = String -> NP -> Sentence -> ConceptChunk
dccWDS String
"critical slip surface" (String -> NP
cn' String
"critical slip surface") 
  (forall n. NounPhrase n => n -> Sentence
atStartNP (ConceptChunk
slpSrf forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`ofThe` IdeaDict
slope) Sentence -> Sentence -> Sentence
+:+
  String -> Sentence
S String
"that has the lowest" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
fsConcept Sentence -> Sentence -> Sentence
`sC`
  String -> Sentence
S String
"and is therefore most likely to experience failure")

fsConcept :: ConceptChunk
fsConcept = String -> NP -> Sentence -> ConceptChunk
dccWDS String
"FS" NP
factorOfSafety
  (String -> Sentence
S String
"The global stability metric" Sentence -> Sentence -> Sentence
`S.ofA` forall n. NounPhrase n => n -> Sentence
phraseNP (ConceptChunk
slpSrf forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`ofA` IdeaDict
slope) Sentence -> Sentence -> Sentence
`sC` 
  String -> Sentence
S String
"defined as the ratio of" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
shearRes Sentence -> Sentence -> Sentence
+:+ 
  String -> Sentence
S String
"to" Sentence -> Sentence -> Sentence
+:+ forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
mobShear)
-- OLD DEFN: Stability metric. How likely a slip surface is to
-- experience failure through slipping.

waterTable :: ConceptChunk
waterTable = String -> NP -> String -> ConceptChunk
dcc String
"water table" (String -> NP
cn' String
"water table") (String
"The upper boundary of a" forall a. [a] -> [a] -> [a]
++
  String
" saturated zone in the ground")

--
factor :: IdeaDict --FIXME: this is here becuase this phrase is
                     --used in datadefs and instance models
factor :: IdeaDict
factor = String -> NP -> IdeaDict
nc String
"factor" (String -> NP
cn' String
"factor") -- possible use this everywhere
                                      -- (fs, fs_rc, fsConcept...)
factorOfSafety :: NP
factorOfSafety :: NP
factorOfSafety = IdeaDict
factor forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
`of_PS` IdeaDict
safety