This module provides data structures for tracing symbolic information.
Author: Jan Tikovsky
Version: December 2017
prelSymCons
:: String -> TypeExpr -> SymObj
Create a symbolic constructor for a typed FlatCurry Prelude constructor
|
soType
:: SymObj -> TypeExpr
Get the type of a symbolic object |
lcNeg
:: LConstr -> LConstr
Negate a literal constraint |
lcMirror
:: LConstr -> LConstr
Mirror literal constraint due to swapping of argument order |
getLConstr
:: (String,String) -> AExpr TypeExpr -> Maybe (Int,SymObj)
Generate a literal constraint from the given FlatCurry expression, if possible |
rmvApplies
:: AExpr TypeExpr -> AExpr TypeExpr
|
isApplyCall
:: AExpr a -> Bool
|
litConstrs
:: [((String,String),LConstr)]
List of supported literal constraints |
ppTrace
:: [Decision] -> Doc
Pretty printing of a symbolic trace |
getSVars
:: Decision -> [Int]
Get all symbolic variables of a decision |
rnmTrace
:: [Int] -> [Decision] -> ([[Decision]],Int) -> ([[Decision]],Int)
Rename all variables occuring in a symbolic trace |
mkCoveredCs
:: SymObj -> [Int] -> CoveredCs
Create information on covered constructors / constraint |
Symbolic objects Symbolic object
Constructors:
Literal constraint
Constructors:
E
:: LConstr
NE
:: LConstr
L
:: LConstr
LE
:: LConstr
G
:: LConstr
GE
:: LConstr
Symbolic tracing of case branches Symbolic trace
Type synonym: Trace = [Decision]
Symbolic information for branch decisions
Constructors:
Case identifier
Type synonym: CaseID = VarIndex
Branch number, i.e. branch m of n branches
Constructors:
BNr
:: Int -> Int -> BranchNr
Nodes of symbolic execution tree Representation of path constraints, i.e.
Type synonym: PathConstr = (VarIndex,SymObj,[VarIndex])
A symbolic node includes the following information:
Constructors:
SymNode
:: Depth -> Context -> [VarIndex] -> [PathConstr] -> [VarIndex] -> VarIndex -> SymNode
Fields:
Node depth in a symbolic execution tree
Type synonym: Depth = Int
A context is a case identifier followed by a sequence of preceeding case identifiers
Type synonym: Context = [VarIndex]
Coverage information Coverage information for case expressions
Constructors:
Covered constructors / literal constraints
Constructors:
Create a symbolic constructor for a typed FlatCurry
|
Negate a literal constraint
|
Generate a literal constraint from the given FlatCurry expression, if possible |
|
|
List of supported literal constraints |
Get all symbolic variables of a decision
|
Rename all variables occuring in a symbolic trace |
Create information on covered constructors / constraint
|