drasil-docLang-0.1.26.0: A framework for code and document generation for scientific software - Document Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.DocumentLanguage.TraceabilityGraph

Description

Defines functions to create traceability graphs in SRS documents.

Synopsis

Main Functions

traceMGF :: [LabelledContent] -> [Sentence] -> [Contents] -> String -> [Section] -> Section Source #

Wrapper for traceMIntro and traceGIntro. Turns references (LabelledContents), trailing notes (Sentences), and any other needed contents to create a Traceability Section. Traceability graphs generate as both a link and a figure for convenience.

traceGIntro :: [UID] -> [Sentence] -> [UnlabelledContent] Source #

Generalized traceability graph introduction: appends references to the traceability graphs in Sentence form and wraps in Contents. Usually references the five graphs as defined in GraphInfo.

mkGraphInfo :: SystemInformation -> GraphInfo Source #

Extracts traceability graph inforomation from filled-in SystemInformation.

Helper Functions

mkGraphNodes :: TraceViewCat -> SystemInformation -> String -> NodeFamily Source #

Gets the node family of a graph based on the given section and system information. Also applies a given colour to the node family.

mkGraphEdges :: [TraceViewCat] -> [TraceViewCat] -> SystemInformation -> [(UID, [UID])] Source #

Creates the graph edges based on the relation of the first list of sections to the second. Also needs the system information. Return value is of the form (Section, [Dependencies]).

makeTGraph :: [UID] -> [[UID]] -> [UID] -> [(UID, [UID])] Source #

Helper for making graph edges. Taken from Utils.Drasil's traceability matrix relation finder. But, instead of marking X on two related ideas, it makes them an edge.

checkUID :: UID -> SystemInformation -> UID Source #

Checker for uids by finding if the UID is in one of the possible data sets contained in the SystemInformation database.

checkUIDAbbrev :: SystemInformation -> UID -> String Source #

Similar to checkUID but prepends domain for labelling.

checkUIDRefAdd :: SystemInformation -> UID -> String Source #

Similar to checkUID but gets reference addresses for display.

traceGHeader :: (ChunkDB -> [UID]) -> SystemInformation -> [UID] Source #

Helper that finds the header of a traceability matrix. However, here we use this to get a list of UIDs for a traceability graph instead.

traceGRowHeader :: ([UID] -> [UID]) -> SystemInformation -> [UID] Source #

Helper that finds the headers of the traceability matrix rows. However, here we use this to get a list of UIDs for a traceability graph instead. This is then used to create the graph edges.

graphShows :: UID -> Sentence -> Sentence Source #

Helper that makes references of the form "reference shows the dependencies of something". Only takes a reference UID instead of a Reference.

Functions to Create a Traceability Graphs

Functions related to setting up the structure and contents of the traceability graphs section.

allvsallDesc :: Sentence Source #

Description of the AllvsAll traceability graph.

traceGLst :: Contents Source #

Create a list of traceability graph references.

traceGCon :: String -> [Contents] Source #

The Traceability Graph contents.

traceGraphLC :: String -> FilePath -> UID -> LabelledContent Source #

Generates traceability graphs as figures on an SRS document.

traceGFiles :: [String] Source #

Traceability graph file names.

traceGUIDs :: [UID] Source #

Traceabiliy graph reference UIDs.

traceyGraphPaths :: String -> [String] Source #

Create reference paths to traceability graphs given an example name. For .pdf links

traceyGraphGetRefs :: String -> [Reference] Source #

Create references to traceability graphs given an example name. Primarily used for reference database in examples.

traceyGraphPath :: String -> String -> String Source #

Gets the path of a traceability graph given an example folder name and the graph name. For .png files

resourcePath :: String Source #

Traceability graphs reference path.

folderList' :: [ItemType] Source #

Helper to create a list of traceability graph references.