You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--| Fill in the 'Section's and 'LabelledContent' maps of the 'ChunkDB' from the 'SRSDecl'.
102
-
fillSecAndLC::DocDesc->System->System
103
-
fillSecAndLC dd si = si2
102
+
fillLC::DocDesc->System->System
103
+
fillLC sd si@SI{ _sys = sn }
104
+
| containsTraceSec sd = si2
105
+
|otherwise= si
104
106
where
105
-
-- Get current contents of si
106
107
chkdb = si ^. systemdb
107
-
-- extract sections and labelledcontent
108
-
allSections =concatMap findAllSec $ mkSections si dd -- FIXME: `mkSections` on something particularly large that is immediately discarded is a sign that we're doing something wrong.
109
-
allLC =concatMap findAllLC allSections
108
+
-- Pre-generate a copy of all required LabelledContents (i.e., traceability
109
+
-- graphs) for insertion in the ChunkDB.
110
+
createdLCs = genTraceGraphLabCons $ programName sn
111
+
-- FIXME: This is a semi-hack. This is only strictly necessary for the
112
+
-- traceability graphs. Those are all chunks that should exist but not be
113
+
-- handled like this. They should be created and included in the
traceGCon::String-> [Contents] -- FIXME: HACK: We're generating "LlC"s of the traceability graphs multiple times... See DocumentLanguage.hs' mkTraceabilitySec for the other spot.
165
-
traceGCon ex =mapLlC (zipWith (traceGraphLC ex) traceGFiles traceGUIDs)
165
+
traceGCon ex =mapLlC (genTraceGraphLabCons ex)
166
166
++ [mkParagraph $S"For convenience, the following graphs can be\
167
167
\ found at the links below:", traceGLst]
168
168
169
+
--| Generate the `LabelledContent` chunks, specialized to a specific example
170
+
-- (and its path).
171
+
genTraceGraphLabCons::String-> [LabelledContent]
172
+
genTraceGraphLabCons ex =zipWith (traceGraphLC ex) traceGFiles traceGUIDs
173
+
169
174
--| Generates traceability graphs as figures on an SRS document.
0 commit comments