@@ -3,10 +3,11 @@ module Drasil.GlassBR.Body where
33
44import Control.Lens ((^.) )
55import Language.Drasil hiding (organization , section , variable )
6+ import Language.Drasil.Development (toSent )
67import Drasil.Metadata as M (dataDefn , inModel , thModel )
78import Drasil.SRSDocument
89import Drasil.Generator (cdb )
9- import Drasil.DocLang (auxSpecSent , termDefnF' )
10+ import Drasil.DocLang (auxSpecSent , termDefnF' , fillcdbSRS , DocDesc , ReqsSub ( .. ) )
1011import qualified Drasil.DocLang.SRS as SRS (reference , assumpt , inModel )
1112import Language.Drasil.Chunk.Concept.NamedCombinators
1213import qualified Language.Drasil.Sentence.Combinators as S
@@ -51,11 +52,11 @@ import Drasil.GlassBR.Unitals (blast, blastTy, bomb, explosion, constants,
5152srs :: Document
5253srs = mkDoc mkSRS (S. forGen titleize phrase) fullSI
5354
54- fullSI :: System
55+ fullSI :: ( System , DocDesc )
5556fullSI = fillcdbSRS mkSRS si
5657
5758printSetting :: PrintingInformation
58- printSetting = piSys (fullSI ^. systemdb ) Equational defaultConfiguration
59+ printSetting = piSys (fst fullSI ) Equational defaultConfiguration
5960
6061si :: System
6162si = mkSystem progName Specification
@@ -64,7 +65,7 @@ si = mkSystem progName Specification
6465 tMods [] GB. dataDefs iMods
6566 configFp
6667 inputs outputs constrained constants
67- symbMap
68+ symbMap allRefs
6869
6970mkSRS :: SRSDecl
7071mkSRS = [TableOfContents ,
@@ -78,7 +79,7 @@ mkSRS = [TableOfContents,
7879 IOrgSec M. dataDefn (SRS. inModel [] [] ) (Just orgOfDocIntroEnd)],
7980 StkhldrSec $
8081 StkhldrProg
81- [Client progName $ phraseNP (a_ company)
82+ [Client progName $ toSent ( phraseNP (a_ company) )
8283 +:+. S " named Entuitive" +:+ S " It is developed by Dr." +:+ S (name mCampidelli),
8384 Cstmr progName],
8485 GSDSec $ GSDProg [SysCntxt [sysCtxIntro, LlC sysCtxFig, sysCtxDesc, sysCtxList],
@@ -99,7 +100,7 @@ mkSRS = [TableOfContents,
99100 ]
100101 ],
101102 ReqrmntSec $ ReqsProg [
102- FReqsSub inReqDesc funcReqsTables,
103+ FReqsSub funcReqsTables,
103104 NonFReqsSub
104105 ],
105106 LCsSec ,
@@ -136,7 +137,7 @@ conceptChunks =
136137
137138symbMap :: ChunkDB
138139symbMap = cdb thisSymbols ideaDicts conceptChunks ([] :: [UnitDefn ])
139- GB. dataDefs iMods [] tMods concIns labCon allRefs citations
140+ GB. dataDefs iMods [] tMods concIns citations labCon
140141
141142-- | Holds all references and links used in the document.
142143allRefs :: [Reference ]
@@ -208,7 +209,7 @@ externalLinkRef = makeURI "glassBRSRSLink"
208209
209210undIR , appStanddIR :: [Sentence ]
210211undIR = [phrase scndYrCalculus, phrase structuralMechanics, phrase glBreakage,
211- phrase blastRisk, pluralNP (computerApp `in_PS` Edu. civilEng)]
212+ phrase blastRisk, toSent ( pluralNP (computerApp `in_PS` Edu. civilEng) )]
212213appStanddIR = [S " applicable" +:+ plural standard +:+
213214 S " for constructions using glass from" +:+ foldlList Comma List
214215 (map refS [astm2009, astm2012, astm2016]) `S.in_`
@@ -227,7 +228,7 @@ scope = foldlSent_ [S "determining the safety" `S.ofA` phrase glaSlab,
227228{- -Organization of Document--}
228229
229230orgOfDocIntroEnd :: Sentence
230- orgOfDocIntroEnd = foldlSent [atStartNP' (the dataDefn) `S.are`
231+ orgOfDocIntroEnd = foldlSent [toSent ( atStartNP' (the dataDefn) ) `S.are`
231232 S " used to support" , plural definition `S.the_ofThe` S " different" , plural model]
232233
233234{- -STAKEHOLDERS--}
@@ -243,32 +244,32 @@ sysCtxIntro :: Contents
243244sysCtxIntro = foldlSP
244245 [refS sysCtxFig +:+ S " shows the" +:+. phrase sysCont,
245246 S " A circle represents an external entity outside the" +:+ phrase software
246- `sC` phraseNP (the user), S " in this case. A rectangle represents the" ,
247+ `sC` toSent ( phraseNP (the user) ), S " in this case. A rectangle represents the" ,
247248 phrase softwareSys, S " itself" , (sParen (short progName) !. ),
248- S " Arrows are used to show the data flow between the" +:+ phraseNP (system
249- `andIts` environment)]
249+ S " Arrows are used to show the data flow between the" +:+ toSent ( phraseNP (system
250+ `andIts` environment)) ]
250251
251252sysCtxDesc :: Contents
252253sysCtxDesc = foldlSPCol
253- [S " The interaction between the" , phraseNP (product_ `andThe` user),
254+ [S " The interaction between the" , toSent ( phraseNP (product_ `andThe` user) ),
254255 S " is through a user" +:+. phrase interface,
255- S " The responsibilities" `S.ofThe` phraseNP (user `andThe` system),
256+ S " The responsibilities" `S.ofThe` toSent ( phraseNP (user `andThe` system) ),
256257 S " are as follows" ]
257258
258259sysCtxUsrResp :: [Sentence ]
259260sysCtxUsrResp = [S " Provide the" +:+ plural inDatum +:+ S " related to the" +:+
260- phraseNP (glaSlab `and_` blastTy) `sC` S " ensuring no errors" `S.inThe` plural datum +:+. S " entry" ,
261- S " Ensure that consistent units are used for" +:+. pluralNP (combineNINI input_ variable),
261+ toSent ( phraseNP (glaSlab `and_` blastTy) ) `sC` S " ensuring no errors" `S.inThe` plural datum +:+. S " entry" ,
262+ S " Ensure that consistent units are used for" +:+. toSent ( pluralNP (combineNINI input_ variable) ),
262263 S " Ensure required" +:+
263- namedRef (SRS. assumpt [] [] ) (pluralNP (combineNINI software assumption))
264+ namedRef (SRS. assumpt [] [] ) (toSent ( pluralNP (combineNINI software assumption) ))
264265 +:+ S " are appropriate for any particular" +:+
265266 phrase problem +:+ S " input to the" +:+. phrase software]
266267
267268sysCtxSysResp :: [Sentence ]
268269sysCtxSysResp = [S " Detect data type mismatch, such as a string of characters" +:+
269270 phrase input_ +:+. S " instead of a floating point number" ,
270271 S " Determine if the" +:+ plural input_ +:+ S " satisfy the required" +:+.
271- pluralNP (physical `and_` softwareConstraint),
272+ toSent ( pluralNP (physical `and_` softwareConstraint) ),
272273 S " Predict whether the" +:+ phrase glaSlab +:+. S " is safe or not" ]
273274
274275sysCtxResp :: [Sentence ]
@@ -308,16 +309,16 @@ termsAndDesc = termDefnF' (Just (S "All of the" +:+ plural term_ +:+
308309{- -Physical System Description--}
309310
310311physSystParts :: [Sentence ]
311- physSystParts = [(atStartNP (the glaSlab)!. ),
312- foldlSent [(atStartNP (the ptOfExplsn) !. ), S " Where the" , phrase bomb `sC`
313- S " or" , (blast ^. defn) `sC` (S " is located" !. ), atStartNP (the sD) `S.isThe`
314- phrase distance, S " between the" , phrase ptOfExplsn `S.and_` phraseNP (the glass)]]
312+ physSystParts = [((toSent ( atStartNP (the glaSlab)) )!. ),
313+ foldlSent [((toSent ( atStartNP (the ptOfExplsn)) ) !. ), S " Where the" , phrase bomb `sC`
314+ S " or" , (blast ^. defn) `sC` (S " is located" !. ), (toSent ( atStartNP (the sD)) ) `S.isThe`
315+ phrase distance, S " between the" , phrase ptOfExplsn `S.and_` toSent ( phraseNP (the glass) )]]
315316
316317{- -Goal Statements--}
317318
318319goalInputs :: [Sentence ]
319- goalInputs = [pluralNP (dimension `the_ofThePS` glaPlane), phraseNP (the glassTy),
320- pluralNP (characteristic `the_ofThePS` explosion), phraseNP (the pbTol)]
320+ goalInputs = [toSent ( pluralNP (dimension `the_ofThePS` glaPlane)), toSent ( phraseNP (the glassTy) ),
321+ toSent ( pluralNP (characteristic `the_ofThePS` explosion)), toSent ( phraseNP (the pbTol) )]
321322
322323{- -SOLUTION CHARACTERISTICS SPECIFICATION--}
323324
0 commit comments