UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BackwardAnalysis Class Reference

This class performs a backward search to solve the coverability problem with respect to a given Order. More...

#include <BackwardAnalysis.h>

Collaboration diagram for BackwardAnalysis:
Collaboration graph
[legend]

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::Timertimer
 Stores a Timer to handle premature timeout termination.
 

Detailed Description

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.

Author
Jan Stückrath
See Also
analysis::BackwardStep

Constructor & Destructor Documentation

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).

Parameters
gtsthe GTS to be used, has to be well-structured
errorGraphsthe initial set of undesired graphs (representing all error configurations)
orderthe order used
rulePreparera RulePreparer compatible to the order
pocEnumeratora MinPOCEnumerator compatible to the order
checkInitialif true, the analysis will stop as soon as an initial graph or a smaller graph was reached; false will deactivate this check
resultHandlera BackwardResultHandler for handling intermediate results
timeouta threshold after which the computation will be stopped (soft stop); a timeout of 0 suppresses this check

Member Function Documentation

bool applyOne ( graphs::MinGraphList minList,
vector< graphs::Hypergraph_sp > &  newGraphs 
)
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.

Parameters
minListall computed graphs will be added to this list (and may be immediately deleted by it)
newGraphsall graphs not dropped my the MinGraphList will be added to this vector
Returns
true, iff the function terminated because of a timeout or found initial graph
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.

Returns
a vector containing all minimal graphs resulting from this backward search; may be incomplete if the search terminated due to a timeout or a found initial graph

Member Data Documentation

basic_types::Order_sp order
private

Stores the Order used for minimization.

Must be compatible with the RulePreparer and the MinPOCEnumerator.

MinPOCEnumerator_sp pocEnumerator
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.

RulePreparer_sp rulePreparer
private

Stores the RulePreparer used for preprocessing the rule set.

Must be compatible with the Order and the MinPOCEnumerator.


The documentation for this class was generated from the following files: