Copyright  (c) HansJürgen Guth, 2014 

License  LGPL 
Maintainer  juergen.software@freea2a.de 
Stability  experimental 
Safe Haskell  SafeInferred 
Language  Haskell2010 
With this module you can define a graph of parttestcases
(Casepart
) and evaluate this graph to a list of strings,
where every string is the concatenation of the code of the
parttestcases.
 data Casepart cnf locals = Casepart {}
 data CasepartInternal cnf locals = CasepartInternal {}
 data CPType
 data DirGraph a
 data SplittedGraph a = Split [DirGraph a]
 data Testgraph a = Testgraph {
 dirGraph :: DirGraph a
 docuInfo :: TGDocuInfo
 data TGDocuInfo = TGDocuInfo {
 name :: String
 descForNode :: String
 descForTex :: String
 generic :: Bool
 toExpand :: Bool
 data Expand
 generate :: Text > [cnf] > locals > (cnf > Text) > DirGraph (CasepartInternal cnf locals) > [Text]
 emptyCp :: Casepart cnf locals
 markCp :: Text > Casepart cnf locals
 getSubGraphs :: DirGraph a > [(String, Testgraph a)] > [(String, Testgraph a)]
 mkEle :: Casepart cnf locals > DirGraph (CasepartInternal cnf locals)
 (&&) :: DirGraph a > DirGraph a > DirGraph a
 conc :: DirGraph a > DirGraph a > DirGraph a
 split :: [DirGraph a] > DirGraph a
 mkGraph2Ele :: (cnfNew > cnfOld) > (localsInB > localsInA) > (localsInB > localsInA > localsInB) > Expand > Testgraph (CasepartInternal cnfOld localsInA) > DirGraph (CasepartInternal cnfNew localsInB)
 mkGraph2Ele0 :: Testgraph a > DirGraph a
 convertDirGraph :: (cnfB > cnfA) > (localsInB > localsInA) > (localsInB > localsInA > localsInB) > DirGraph (CasepartInternal cnfA localsInA) > DirGraph (CasepartInternal cnfB localsInB)
 convertTestgraph :: (cnfB > cnfA) > (localsInB > localsInA) > (localsInB > localsInA > localsInB) > Testgraph (CasepartInternal cnfA localsInA) > Testgraph (CasepartInternal cnfB localsInB)
Types
data Casepart cnf locals Source
The parttestcase
Casepart  

data CasepartInternal cnf locals Source
The parttestcase, internal format of Casepart
, with a writermonad as stringFkt
instead of the varFkt and the old stringFkt
Types of Caseparts, mainly (up to now only) for visualisation of the graph of Caseparts
Directed graph with one end, selfinvented definition
SimpleDG a  Constructor for a node alone, A node is a graph. 
Conc (DirGraph a) (DirGraph a)  Constructor for one subgraph after another 
Join (SplittedGraph a)  Constructor for the "splitting" of graphs,
comparable with an "if".
The 
StructDG (Testgraph a)  A graph with more attributes,
importing of a 
data SplittedGraph a Source
many disjunct graphs Every partgraph has one end and one begin
data TGDocuInfo Source
TGDocuInfo  

Functions
:: Text  how a text is coomented, ("# " or " ") 
> [cnf]  a list of the testvalues 
> locals  the initial value of the variables that the testcases change 
> (cnf > Text)  "prelude" of a testcase, i.e. 
> DirGraph (CasepartInternal cnf locals)  the graph of caseparts 
> [Text]  the final result: the list of testcases incl. comments 
The heart of this module, the final function.
It takes configurations (cnf
means testvalues),
that is a record of variables with a
value, a function that describes the "prelude" of one testcase (without
comment chars, which are later added) (a good starting value : the
show
function of cnf
, so that the used testvalues are printed on top
of the testcase), the graph of testcases and returns
voilá:
the list of testcases, ready to printed out in seperate files and to run.
emptyCp :: Casepart cnf locals Source
An empty testcase, all strings are "".
The condition is always True
.
Shall serve as an starting point for own definitions of
Casepart'
s.
Functions for generating DirGraph
s
mkEle :: Casepart cnf locals > DirGraph (CasepartInternal cnf locals) Source
Function to create a node, function for the user. If longDesc = "", shortDesc is used as longDesc.
:: (cnfNew > cnfOld)  conversion function for the testdatainput of the casepart 
> (localsInB > localsInA)  conversion function for the variables the testcases uses/changes (inputside) 
> (localsInB > localsInA > localsInB)  conversion function for the variables the testcases uses/changes (outputside) that is: how shall the variables look after the run of the casepart? Dependant of the old value of the variables and the value of the variables after run of the imported testcase 
> Expand  Shall this Graph in the documation expanded or not ? 
> Testgraph (CasepartInternal cnfOld localsInA)  the Testgraph that shall be imported 
> DirGraph (CasepartInternal cnfNew localsInB)  the imported Testgraph, now a DirGraph with the correct types 
Function to add a testgraph to a dirgraph with convertingfunction f of the testdata ("cnfOld" resp. "cnfNew") and a Boolean, that says, if the subgraph should be expanded or not.
mkGraph2Ele0 :: Testgraph a > DirGraph a Source
Function to add a testgraph to a dirgraph without convertingfunction
Conversion Functions
:: (cnfB > cnfA)  conversion function for the testdatainput of the casepart 
> (localsInB > localsInA)  conversion function for the variables the testcases uses/changes (inputside) 
> (localsInB > localsInA > localsInB)  conversion function for the variables the testcases uses/changes (outputside) that is: how shall the variables look after the run of the casepart? Dependant of the old value of the variables and the value of the variables after run of the imported testcase 
> DirGraph (CasepartInternal cnfA localsInA)  the DirGraph that shall be imported 
> DirGraph (CasepartInternal cnfB localsInB)  the imported DirGraph with the correct types 
Converts a DirGraph, for example our testgraphs. With that function you can import other testgraphs with another set of variables. You need a interpreting from the target datatype to the source datatype (not vice versa)
:: (cnfB > cnfA)  conversion function for the testdatainput of the casepart 
> (localsInB > localsInA)  conversion function for the variables the testcases uses/changes (inputside) 
> (localsInB > localsInA > localsInB)  conversion function for the variables the testcases uses/changes (outputside) that is: how shall the variables look after the run of the casepart? Dependant of the old value of the variables and the value of the variables after run of the imported testcase 
> Testgraph (CasepartInternal cnfA localsInA)  the Testgraph that shall be imported 
> Testgraph (CasepartInternal cnfB localsInB)  the imported Testgraph with the correct types 
Converts a testgraph, necessary in order to add a different testgraph ( with another type of configuration) to a dirGraph