UnCoVer (Using Coverability for Verification)
|
This class performs a backward search to solve the coverability problem with respect to a given Order. More...
#include <BackwardAnalysis.h>
Public Member Functions | |
BackwardAnalysis (graphs::GTS_sp gts, shared_ptr< vector< graphs::Hypergraph_sp >> errorGraphs, basic_types::Order_sp order, RulePreparer_sp rulePreparer, MinPOCEnumerator_sp pocEnumerator, bool checkInitial=false, BackwardResultHandler_sp resultHandler=nullptr, unsigned int timeout=0) | |
Generates and initializes a new BackwardAnalysis object with the given parameters. More... | |
virtual | ~BackwardAnalysis () |
Destroys the current instance of this class freeing all raw pointed data! | |
shared_ptr< vector < graphs::Hypergraph_sp > > | performAnalysis () |
This function performs the backwards analysis with the parameters given during initialization. More... | |
Private Member Functions | |
bool | applyOne (graphs::MinGraphList &minList, vector< graphs::Hypergraph_sp > &newGraphs) |
Takes the given rule and graph and computes all minimal representants of predecessor of the upward-closure of the graph. More... | |
Private Attributes | |
graphs::GTS_sp | gts |
Stores the GTS used for the backwards search (before rule preparation). | |
shared_ptr< vector < graphs::Hypergraph_sp > > | errorGraphs |
Stores the error graphs used as initial graphs for the backward search. | |
basic_types::Order_sp | order |
Stores the Order used for minimization. More... | |
RulePreparer_sp | rulePreparer |
Stores the RulePreparer used for preprocessing the rule set. More... | |
MinPOCEnumerator_sp | pocEnumerator |
Stores the MinPOCEnumerator used to compute all minimal pushout complements for a pair of rule and graph. More... | |
bool | checkInitial |
If set to true, the analysis will check if a graph smaller or equal to an initial graph was found, and stop early if this is the case. | |
BackwardResultHandler_sp | resultHandler |
Stores the BackwardResultHandler used to process intermediate results of the backward analysis. | |
basic_types::Timer * | timer |
Stores a Timer to handle premature timeout termination. | |
This class performs a backward search to solve the coverability problem with respect to a given Order.
The GTS and Order have to form a Q-restricted well-structured transition system for this algorithm to be sound and complete. See the following publication for more details about this algorithm: Barbara König and Jan Stückrath. A general framework for well-structured graph transformation systems. In P. Baldan and D. Gorla, editors, Proc. of CONCUR 2014, volume 8704 of LNCS, pages 467––481. Springer, 2014.
BackwardAnalysis | ( | graphs::GTS_sp | gts, |
shared_ptr< vector< graphs::Hypergraph_sp >> | errorGraphs, | ||
basic_types::Order_sp | order, | ||
RulePreparer_sp | rulePreparer, | ||
MinPOCEnumerator_sp | pocEnumerator, | ||
bool | checkInitial = false , |
||
BackwardResultHandler_sp | resultHandler = nullptr , |
||
unsigned int | timeout = 0 |
||
) |
Generates and initializes a new BackwardAnalysis object with the given parameters.
The GTS has to be monotone with respect to the Order. The Order has to be a wqo (possibly on a restricted set of graphs) and the Order, RulePreparer and MinPOCEnumerator have to be compatible. There are three optional parameters. A boolean can be used to activate a check if a graph smaller or equal to an initial graph was reached (default = false). A BackwardResultHandler can be given to store or display intermediate results (default = deactivated). A timeout can be given, to stop (softly) too long computations (default = deactivated).
gts | the GTS to be used, has to be well-structured |
errorGraphs | the initial set of undesired graphs (representing all error configurations) |
order | the order used |
rulePreparer | a RulePreparer compatible to the order |
pocEnumerator | a MinPOCEnumerator compatible to the order |
checkInitial | if true, the analysis will stop as soon as an initial graph or a smaller graph was reached; false will deactivate this check |
resultHandler | a BackwardResultHandler for handling intermediate results |
timeout | a threshold after which the computation will be stopped (soft stop); a timeout of 0 suppresses this check |
|
private |
Takes the given rule and graph and computes all minimal representants of predecessor of the upward-closure of the graph.
If a computed graph was not immediately subsumed by a graph in the given MinGraphList, it is added to the MinGraphList and the given vector. If these checks are activated, after every computed predecessor it is checked if an initial graph (or anything smaller) was found or a timeout was reached, which will cause the function to terminate early. The MinPOCEnumerator used must be reset immediately before calling this function.
minList | all computed graphs will be added to this list (and may be immediately deleted by it) |
newGraphs | all graphs not dropped my the MinGraphList will be added to this vector |
shared_ptr< vector< Hypergraph_sp > > performAnalysis | ( | ) |
This function performs the backwards analysis with the parameters given during initialization.
The search terminates when a backward step leads to no new graphs, a graph smaller or equal to an initial graph is reached (if set) or the timer threshold was exceeded (if set). The resulting set of minimal graphs is returned. Note that the set of minimal graphs may be incomplete if one of the latter two conditions caused termination.
|
private |
Stores the Order used for minimization.
Must be compatible with the RulePreparer and the MinPOCEnumerator.
|
private |
Stores the MinPOCEnumerator used to compute all minimal pushout complements for a pair of rule and graph.
Must be compatible with the Order and RulePreparer.
|
private |
Stores the RulePreparer used for preprocessing the rule set.
Must be compatible with the Order and the MinPOCEnumerator.