Skip to content

Commit

Permalink
#3252 Sentence Reworking (for the Glassbr Example)
Browse files Browse the repository at this point in the history
Extract the most worthy places to re-format sentences, and rework on them.
  • Loading branch information
daijingz committed Sep 8, 2024
1 parent a42015d commit 0bf191a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 8 additions & 9 deletions code/drasil-example/glassbr/lib/Drasil/GlassBR/Body.hs
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ priorityNFReqs = [correctness, verifiability, understandability,

startIntro :: (NamedIdea n) => n -> Sentence -> CI -> Sentence
startIntro prgm _ progName = foldlSent [
atStart' explosion, S "in downtown areas are dangerous from the",
phrase blast +:+ S "itself" `S.and_` S "also potentially from the secondary"
+:+ S "effect of falling glass. Therefore" `sC` phrase prgm, S "is needed to"
+:+. purp, S "For example" `sC` S "we might wish to know whether a pane of",
atStart' explosion, S "in downtown areas are dangerous" `S.fromThe` phrase blast +:+
S "itself" `S.and_` S "also potentially from the secondary" +:+
S "effect of falling glass. Therefore" `sC` phrase prgm `S.is` S "needed to" +:+.
purp, S "For example" `sC` S "we might wish to know whether a pane of",
phrase glass, S "fails from a gas main", phrase explosion `S.or_`
S "from a small fertilizer truck bomb." +:+
S "The document describes the program called", short progName,
S ", which is based on the original, manually created version of" +:+
S ", which is based" `S.onThe` S "original" `sC` S "manually created version of" +:+
namedRef externalLinkRef (S "GlassBR")]

externalLinkRef :: Reference
Expand All @@ -225,7 +225,7 @@ appStanddIR = [S "applicable" +:+ plural standard +:+
namedRef (SRS.reference ([]::[Contents]) ([]::[Section])) (plural reference)]

scope :: Sentence
scope = foldlSent_ [S "determining the safety of a", phrase glaSlab,
scope = foldlSent_ [S "determining the safety" `S.ofA` phrase glaSlab,
S "under a", phrase blast, S "loading following the ASTM", phrase standard,
sParen $ refS astm2009]

Expand Down Expand Up @@ -263,13 +263,12 @@ sysCtxDesc :: Contents
sysCtxDesc = foldlSPCol
[S "The interaction between the", phraseNP (product_ `andThe` user),
S "is through a user" +:+. phrase interface,
S "The responsibilities of the", phraseNP (user `andThe` system),
S "The responsibilities" `S.ofThe` phraseNP (user `andThe` system),
S "are as follows"]

sysCtxUsrResp :: [Sentence]
sysCtxUsrResp = [S "Provide the" +:+ plural inDatum +:+ S "related to the" +:+
phraseNP (glaSlab `and_` blastTy) `sC` S "ensuring no errors in the" +:+
plural datum +:+. S "entry",
phraseNP (glaSlab `and_` blastTy) `sC` S "ensuring no errors" `S.inThe` plural datum +:+. S "entry",
S "Ensure that consistent units are used for" +:+. pluralNP (combineNINI input_ variable),
S "Ensure required" +:+
namedRef (SRS.assumpt [] []) (pluralNP (combineNINI software assumption))
Expand Down
2 changes: 2 additions & 0 deletions code/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ extra-deps:
- unix-2.8.5.1@sha256:3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06,9808
- Cabal-3.12.1.0@sha256:08be296ddd941b3f9be4bd125fbb3e6857f5c707b8d10464f6f1d30c91ca3e5f,13551
- Cabal-syntax-3.12.1.0@sha256:6dbb06fb08ff77520947fb4c1ef281c9cea5b8dc7fd9a41ad62273fa916cf4b2,7407
- time-1.12.2@sha256:88e8493d9130038d3b9968a2530a0900141cd3d938483c83dde56e12b875ebc8,6510
- Win32-2.14.0.0@sha256:e34af84fec733b5c0c8f052ec39499785e719e2fbbe308983adf26c82ea3704d,5942

# This configuration option allows the use of newer versions of dependencies than what is specified
allow-newer: true
Expand Down

0 comments on commit 0bf191a

Please sign in to comment.