Skip to content

Commit

Permalink
Manual merge of master - version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
samm82 committed Jul 24, 2018
2 parents c057b92 + 57041db commit 0bc8c9c
Show file tree
Hide file tree
Showing 36 changed files with 1,054 additions and 824 deletions.
Binary file added code/datafiles/SSP/SystemContextFigure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion code/drasil-code/drasil-code.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ library
split >= 0.2.3.1,
MissingH >= 1.4.0.1,
parsec >= 3.1.9,
drasil-lang >= 0.1.5
drasil-lang >= 0.1.6
default-language: Haskell2010
ghc-options: -Wall -O2

Expand Down
7 changes: 5 additions & 2 deletions code/drasil-data/Data/Drasil/Citations.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Data.Drasil.Citations (koothoor2013, parnasClements1986, smithLai2005, jnlCGJ
module Data.Drasil.Citations (campidelli, koothoor2013, parnasClements1986, smithLai2005, jnlCGJ
) where

import Language.Drasil --(S,(:+:),(+:+),sC,phrase,F,Accent(..),Citation(..),CiteField(..))
import Data.Drasil.People (dParnas, jRalyte, lLai, nKoothoor, nKraiem,
pcClements, pjAgerfalk, spencerSmith)
pcClements, pjAgerfalk, spencerSmith, mCampidelli)
import Data.Drasil.Software.Products (sciCompS)

---------------
Expand All @@ -12,6 +12,9 @@ import Data.Drasil.Software.Products (sciCompS)

koothoor2013, parnasClements1986, smithLai2005 :: Citation

campidelli = cBooklet "campidelli"
(S "Glass-BR Software for the design and risk assessment of glass facades subjected to blast loading") [author [mCampidelli]]

koothoor2013 =
cMThesis "koothoor2013" [nKoothoor]
(S "A document drive approach to certifying" +:+ phrase sciCompS)
Expand Down
2 changes: 1 addition & 1 deletion code/drasil-data/drasil-data.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ library
MissingH >= 1.4.0.1,
parsec >= 3.1.9,
data-fix (>= 0.0.4 && <= 1.0),
drasil-lang >= 0.1.5
drasil-lang >= 0.1.6
default-language: Haskell2010
ghc-options: -Wall

Expand Down
20 changes: 10 additions & 10 deletions code/drasil-docLang/Drasil/DocLang.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module Drasil.DocLang (
SCSSub(..), SSDSec(..), SSDSub(..), SolChSpec(..), ExistingSolnSec(..),
StkhldrSec(StkhldrProg2),
StkhldrSub(Client, Cstmr), TConvention(..), TraceabilitySec(TraceabilityProg),
TSIntro(..), UCsSec(..), mkDoc, mkLklyChnk, mkRequirement, mkUnLklyChnk,
tsymb, tsymb'',
TSIntro(..), UCsSec(..), mkDoc, mkLklyChnk, mkRequirement,
mkUnLklyChnk, tsymb, tsymb'',
-- DocumentLanguage.Definitions
Field(..), Fields, InclUnits(IncludeUnits), Verbosity(Verbose),
-- DocumentLanguage.RefHelpers
Expand Down Expand Up @@ -40,14 +40,14 @@ module Drasil.DocLang (
) where

import Drasil.DocumentLanguage (AppndxSec(..), AuxConstntSec(..),
DerivationDisplay(..), DocDesc, DocSection(..), Emphasis(..), GSDSec(GSDProg2),
GSDSub(UsrChars, SystCons, SysCntxt), IntroSec(..), IntroSub(..), LCsSec(..), LFunc(..),
Literature(Doc', Lit, Manual), ProblemDescription(..), RefSec(..), RefTab(..),
ReqrmntSec(..), ReqsSub(FReqsSub, NonFReqsSub), ScpOfProjSec(ScpOfProjProg),
SCSSub(..), SSDSec(..), SSDSub(..), SolChSpec(..), StkhldrSec(StkhldrProg2),
StkhldrSub(Client, Cstmr), TConvention(..), TraceabilitySec(TraceabilityProg),
TSIntro(..), UCsSec(..), mkDoc, mkLklyChnk, mkRequirement, mkUnLklyChnk,
tsymb, tsymb'', ExistingSolnSec(..))
DerivationDisplay(..), DocDesc, DocSection(..), Emphasis(..), ExistingSolnSec(..),
GSDSec(GSDProg2), GSDSub(UsrChars, SystCons, SysCntxt), IntroSec(..), IntroSub(..),
LCsSec(..), LFunc(..), Literature(Doc', Lit, Manual), ProblemDescription(..),
RefSec(..), RefTab(..), ReqrmntSec(..), ReqsSub(FReqsSub, NonFReqsSub),
ScpOfProjSec(ScpOfProjProg), SCSSub(..), SSDSec(..), SSDSub(..), SolChSpec(..),
StkhldrSec(StkhldrProg2), StkhldrSub(Client, Cstmr), TConvention(..),
TraceabilitySec(TraceabilityProg), TSIntro(..), UCsSec(..), mkDoc,
mkLklyChnk, mkRequirement, mkUnLklyChnk, tsymb, tsymb'')
import Drasil.DocumentLanguage.Definitions (Field(..), Fields,
InclUnits(IncludeUnits), Verbosity(Verbose))
import Drasil.DocumentLanguage.RefHelpers (ModelDB, cite, ddRefDB, mdb, refA,
Expand Down
9 changes: 5 additions & 4 deletions code/drasil-docLang/Drasil/DocumentLanguage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import Data.Drasil.Concepts.Documentation (refmat)

import Data.Function (on)
import Data.List (nub, sortBy)
import Data.Ord (comparing)

type System = Sentence
type DocKind = Sentence
Expand Down Expand Up @@ -158,7 +159,7 @@ data GSDSec = GSDVerb Section

data GSDSub where
GSDSubVerb :: Section -> GSDSub
SysCntxt :: [Contents] -> GSDSub
SysCntxt :: [Contents] -> GSDSub --FIXME: partially automate
UsrChars :: [Contents] -> GSDSub
SystCons :: [Contents] -> [Section] -> GSDSub

Expand Down Expand Up @@ -254,7 +255,7 @@ mkSections si l = map doit l
doit (IntroSec is) = mkIntroSec si is
doit (StkhldrSec sts) = mkStkhldrSec sts
doit (SSDSec ss) = mkSSDSec si ss
doit (AuxConstntSec acs) = mkAuxConsSec acs
doit (AuxConstntSec acs) = mkAuxConsSec acs
doit Bibliography = mkBib (citeDB si)
doit (GSDSec gs') = mkGSDSec gs'
doit (ScpOfProjSec sop) = mkScpOfProjSec sop
Expand Down Expand Up @@ -423,7 +424,7 @@ mkScpOfProjSec (ScpOfProjProg kWrd uCTCntnts indCases) =
mkSSDSec :: SystemInformation -> SSDSec -> Section
mkSSDSec _ (SSDVerb s) = s
mkSSDSec si (SSDProg l) =
SSD.specSysDescr (siSys si) $ map (mkSubSSD si) l
SSD.specSysDescr $ map (mkSubSSD si) l
where
mkSubSSD :: SystemInformation -> SSDSub -> Section
mkSubSSD _ (SSDSubVerb s) = s
Expand Down Expand Up @@ -533,7 +534,7 @@ mkExistingSolnSec (ExistSolnProg cs) = SRS.offShelfSol cs []
-- | Helper for making the 'Values of Auxiliary Constants' section
mkAuxConsSec :: AuxConstntSec -> Section
mkAuxConsSec (AuxConsVerb s) = s
mkAuxConsSec (AuxConsProg key listOfCons) = AC.valsOfAuxConstantsF key listOfCons
mkAuxConsSec (AuxConsProg key listOfCons) = AC.valsOfAuxConstantsF key $ sortBySymbol listOfCons

{--}

Expand Down
4 changes: 2 additions & 2 deletions code/drasil-docLang/Drasil/DocumentLanguage/Definitions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ mkQField d _ l@DefiningEquation fs = (show l, (eqUnR $ sy d $= d ^. equat):[]) :
mkQField d m l@(Description v u) fs =
(show l, buildDDescription v u d m) : fs
mkQField _ _ l@(RefBy) fs = (show l, fixme) : fs --FIXME: fill this in
mkQField _ _ l@(Source) fs = (show l, fixme) : fs
mkQField d _ l@(Source) fs = (show l, [Paragraph $ getSource d]) : fs
mkQField d _ l@(Notes) fs = maybe fs (\ss -> (show l, map Paragraph ss) : fs) (d ^. getNotes)
mkQField _ _ label _ = error $ "Label " ++ show label ++ " not supported " ++
"for data definitions"
Expand All @@ -122,7 +122,7 @@ mkDDField d _ l@DefiningEquation fs = (show l, (eqUnR $ sy d $= d ^. relat):[])
mkDDField d m l@(Description v u) fs =
(show l, buildDDescription' v u d m) : fs
mkDDField _ _ l@(RefBy) fs = (show l, fixme) : fs --FIXME: fill this in
mkDDField _ _ l@(Source) fs = (show l, fixme) : fs
mkDDField d _ l@(Source) fs = (show l, [Paragraph $ getSource d]) : fs
mkDDField d _ l@(Notes) fs = maybe fs (\ss -> (show l, map Paragraph ss) : fs) (d ^. getNotes)
mkDDField _ _ label _ = error $ "Label " ++ show label ++ " not supported " ++
"for data definitions"
Expand Down
4 changes: 2 additions & 2 deletions code/drasil-docLang/Drasil/Sections/SolutionCharacterSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import Data.Drasil.SentenceStructures (ofThe, foldlSP, foldlSent, foldlList, sAn
import qualified Data.Drasil.Concepts.Documentation as Doc
import Data.List (find)
import Control.Lens ((^.))
import Drasil.Sections.SpecificSystemDescription (inDataConstTbl, outDataConstTbl,
listofTablesToRefs)

import Drasil.Sections.GeneralSystDesc(genSysIntro)
import Drasil.Sections.SpecificSystemDescription (inDataConstTbl, outDataConstTbl,
listofTablesToRefs)

import qualified Drasil.DocLang.SRS as SRS

Expand Down
31 changes: 16 additions & 15 deletions code/drasil-docLang/Drasil/Sections/SpecificSystemDescription.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,29 @@ import Language.Drasil
import Data.Drasil.Concepts.Documentation (physical, column, input_, uncertainty, physicalConstraint,
softwareConstraint, typUnc, user, model, value, quantity, information, constraint, variable,
output_, symbol_, limitation, problem, inModel, datum, datumConstraint, section_, dataDefn,
general, genDefn, assumption, thModel, physicalSystem,
likelyChg, unlikelyChg, goalStmt, purpose, requirement, element)
general, genDefn, assumption, thModel, physicalSystem, problemDescription, solutionCharacteristic,
likelyChg, unlikelyChg, goalStmt, purpose, requirement, element, specification)
import Data.Drasil.Concepts.Math (equation)
import Data.Drasil.Concepts.Software (program)
import Data.Drasil.Utils (foldle, fmtU, getRVal)
import Data.Drasil.SentenceStructures (fmtPhys, fmtSfwr, mkTableFromColumns, foldlSent,
foldlSP, typUncr, ofThe, foldlList)
import Data.List (sortBy)

import qualified Drasil.DocLang.SRS as SRS


-- | Specific System description section builder. Takes the system and subsections.
specSysDescr :: (NamedIdea a) => a -> [Section] -> Section
specSysDescr sys subs = SRS.specSysDes [intro_ sys] subs
specSysDescr :: [Section] -> Section
specSysDescr subs = SRS.specSysDes [intro_] subs

-- FIXME: this all should be broken down and mostly generated.
-- Generates an introduction based on the system.
intro_ :: (NamedIdea a) => a -> Contents
intro_ sys = Paragraph $ S "This section first presents the problem" +:+
S "description, which gives a high-level view of the problem to be" +:+
S "solved. This is followed by the solution characteristics" +:+
S "specification, which presents the assumptions" `sC`
S "theories, and definitions that are used for the" +:+. (phrase sys)
intro_ :: Contents
intro_ = Paragraph $ foldlSent [S "This", phrase section_, S "first presents the",
phrase problemDescription `sC` S "which gives a high-level view of the", phrase problem,
S "to be solved. This is followed by the", plural solutionCharacteristic, phrase specification `sC`
S "which presents the", foldlList (map S ["assumptions", "theories", "definitions"]), S "that are used"]

--Up to change, decide on what ending sentence structure we would like to employ
--Using Verbatim for now.
Expand Down Expand Up @@ -208,11 +209,11 @@ dataConstraintUncertainty = foldlSent [S "The", phrase uncertainty, phrase colum
inDataConstTbl :: (UncertainQuantity c, Constrained c, HasReasVal c) => [c] -> Contents
inDataConstTbl qlst = Table titl cts (S "Input Data Constraints") True "InDataConstraints"
where
columns = [(S "Var", map ch qlst),
(titleize' physicalConstraint, map fmtPhys qlst),
(titleize' softwareConstraint, map fmtSfwr qlst),
(S "Typical Value", map (\q -> fmtU (E $ getRVal q) q) qlst),
(short typUnc, map typUncr qlst)]
columns = [(S "Var", map ch $ sortBySymbol qlst),
(titleize' physicalConstraint, map fmtPhys $ sortBySymbol qlst),
(titleize' softwareConstraint, map fmtSfwr $ sortBySymbol qlst),
(S "Typical Value", map (\q -> fmtU (E $ getRVal q) q) $ sortBySymbol qlst),
(short typUnc, map typUncr $ sortBySymbol qlst)]
tbl = mkTableFromColumns columns
titl = fst tbl
cts = snd tbl
Expand Down
2 changes: 1 addition & 1 deletion code/drasil-docLang/drasil-docLang.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ library
MissingH >= 1.4.0.1,
parsec >= 3.1.9,
data-fix (>= 0.0.4 && <= 1.0),
drasil-lang >= 0.1.5,
drasil-lang >= 0.1.6,
drasil-data >= 0.1.4
default-language: Haskell2010
ghc-options: -Wall
Expand Down
2 changes: 1 addition & 1 deletion code/drasil-example/Drasil/GamePhysics/Body.hs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ systemConstraintSect = sSubSec systemConstraint []
-- have not been encoded.

specific_system_description :: Section
specific_system_description = specSysDescr physLib [problem_description, solution_characteristics_specification]
specific_system_description = specSysDescr [problem_description, solution_characteristics_specification]

-------------------------------
-- 4.1 : Problem Description --
Expand Down
18 changes: 9 additions & 9 deletions code/drasil-example/Drasil/GlassBR/Body.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import Drasil.DocLang (AppndxSec(..), AuxConstntSec(..), DerivationDisplay(..),
ReqsSub(FReqsSub, NonFReqsSub), ScpOfProjSec(ScpOfProjProg), SCSSub(..),
SSDSec(..), SSDSub(..), SolChSpec(..), StkhldrSec(StkhldrProg2),
StkhldrSub(Client, Cstmr), TraceabilitySec(TraceabilityProg),
TSIntro(SymbOrder, TSPurpose), UCsSec(..), Verbosity(Verbose), cite,
dataConstraintUncertainty, goalStmtF, inDataConstTbl, intro, mkDoc,
TSIntro(SymbOrder, TSPurpose), UCsSec(..), Verbosity(Verbose),
cite, dataConstraintUncertainty, goalStmtF, inDataConstTbl, intro, mkDoc,
mkRequirement, outDataConstTbl, physSystDesc, probDescF, termDefnF,
traceGIntro, tsymb)

Expand Down Expand Up @@ -54,14 +54,14 @@ import Data.Drasil.Utils (makeTMatrix, makeListRef, itemRefToSent, noRefs,
import Drasil.GlassBR.Assumptions (assumptionConstants, assumptionDescs,
gbRefDB, newAssumptions)
import Drasil.GlassBR.Changes (likelyChanges_SRS, unlikelyChanges_SRS)
import Drasil.GlassBR.Concepts (aR, lShareFac, gLassBR, stdOffDist, glaSlab,
blastRisk, glass, glaPlane, glassBRProg, ptOfExplsn, acronyms)
import Drasil.GlassBR.Concepts (acronyms, aR, blastRisk, glaPlane, glaSlab,
glass, gLassBR, lShareFac, ptOfExplsn, stdOffDist)
import Drasil.GlassBR.DataDefs (aspRat, dataDefns, gbQDefns, hFromt, strDisFac, nonFL,
dimLL, glaTyFac, tolStrDisFac, tolPre, risk, standOffDis)
import Drasil.GlassBR.ModuleDefs (allMods)
import Drasil.GlassBR.References (rbrtsn2012)
import Drasil.GlassBR.Symbols (this_symbols)
import Drasil.GlassBR.TMods (tModels, t1SafetyReq, t2SafetyReq, t1IsSafe, t2IsSafe)
import Drasil.GlassBR.TMods (tModels, pbSafetyReq, lrSafetyReq, pbIsSafe, lrIsSafe)
import Drasil.GlassBR.IMods (iModels, calOfCap, calOfDe, probOfBr, probOfBreak,
calofCapacity, calofDemand)

Expand Down Expand Up @@ -130,7 +130,7 @@ mkSRS = RefSec (RefProg intro [TUnits, tsymb [TSPurpose, SymbOrder], TAandA]) :
, SSDSolChSpec
(SCSProg
[ Assumptions
, TMs ([Label] ++ stdFields) [t1IsSafe, t2IsSafe]
, TMs ([Label] ++ stdFields) [pbIsSafe, lrIsSafe]
, GDs [] [] HideDerivation -- No Gen Defs for GlassBR
, DDs' ([Label, Symbol, Units] ++ stdFields) dataDefns ShowDerivation
, IMs ([Label, Input, Output, InConstraints, OutConstraints] ++ stdFields) [probOfBreak, calofCapacity, calofDemand] HideDerivation
Expand Down Expand Up @@ -162,7 +162,7 @@ stdFields = [DefiningEquation, Description Verbose IncludeUnits, Notes, Source,

glassSystInfo :: SystemInformation
glassSystInfo = SI {
_sys = glassBRProg,
_sys = gLassBR,
_kind = srs,
_authors = [nikitha, spencerSmith],
_units = map unitWrapper [metre, second, kilogram] ++ map unitWrapper [pascal, newton],
Expand Down Expand Up @@ -543,8 +543,8 @@ req4Desc = foldlSent [titleize output_, S "the", plural inQty,
S "from", acroR 2]

req5Desc cmd = foldlSent_ [S "If", (ch is_safe1), S "", (ch is_safe2),
sParen (S "from" +:+ (makeRef (reldefn t1SafetyReq))
`sAnd` (makeRef (reldefn t2SafetyReq))), S "are true" `sC`
sParen (S "from" +:+ (makeRef (reldefn pbSafetyReq))
`sAnd` (makeRef (reldefn lrSafetyReq))), S "are true" `sC`
phrase cmd, S "the", phrase message, Quote (safeMessage ^. defn),
S "If the", phrase condition, S "is false, then", phrase cmd,
S "the", phrase message, Quote (notSafe ^. defn)]
Expand Down
9 changes: 4 additions & 5 deletions code/drasil-example/Drasil/GlassBR/Concepts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import Data.Drasil.Concepts.Documentation (assumption, dataDefn, goalStmt, inMod

{--}

glassBRProg :: CommonConcept
{-glassBRProg :: CommonConcept
glassBRProg = dcc' "glassBRProg" (nounPhraseSP "GlassBR program")
"The glass safety analysis program" "GlassBR"
"The glass safety analysis program" "GlassBR"-}

{-Acronyms-}
acronyms :: [CI]
acronyms = [assumption, annealed, aR, dataDefn, fullyT, goalStmt,
glassTypeFac, heatS, iGlass, inModel, likelyChg, loadDurFactor,
lGlass, lResistance, lShareFac, notApp, nFL, physSyst, requirement,
stdOffDist, srs, thModel, eqTNT, typUnc, unlikelyChg]
stdOffDist, srs, thModel, typUnc, unlikelyChg]

annealed, aR, fullyT, glassTypeFac, heatS, loadDurFactor, iGlass, lGlass,
lResistance, lShareFac, eqTNT, gLassBR, stdOffDist, nFL :: CI
lResistance, lShareFac, gLassBR, stdOffDist, nFL :: CI

--FIXME: Add compound nounphrases

Expand All @@ -33,7 +33,6 @@ iGlass = commonIdea "iGlass" (nounPhraseSP "insulating glass")
lGlass = commonIdea "lGlass" (nounPhraseSP "laminated glass") "LG"
lResistance = commonIdea "lResistance" (nounPhraseSP "load resistance") "LR"
lShareFac = commonIdea "lShareFac" (nounPhraseSP "load share factor") "LSF"
eqTNT = commonIdea "eqTNT" (nounPhraseSP "TNT (Trinitrotoluene) Equivalent Factor") "TNT"
gLassBR = commonIdea "gLassBR" (pn "GlassBR") "GlassBR"
stdOffDist = commonIdea "stdOffDist" (nounPhraseSP "stand off distance") "SD"
loadDurFactor = commonIdea "loadDurFactor" (nounPhraseSP "load duration factor") "LDF"
Expand Down
Loading

0 comments on commit 0bc8c9c

Please sign in to comment.