UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
BackwardAnalysis.h
1 /***************************************************************************
2  * Copyright (C) 2014 by Jan Stückrath <jan.stueckrath@uni-due.de> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
18  ***************************************************************************/
19 
20 #ifndef BACKWARDANALYSIS_H_
21 #define BACKWARDANALYSIS_H_
22 
23 #include "../basic_types/Order.h"
24 #include "../basic_types/Timer.h"
25 #include "../graphs/MinGraphList.h"
26 #include "../graphs/GTS.h"
27 #include "RulePreparer.h"
28 #include "MinPOCEnumerator.h"
29 #include "BackwardResultHandler.h"
30 
31 namespace uncover {
32  namespace analysis {
33 
44 
45  public:
46 
67  shared_ptr<vector<graphs::Hypergraph_sp>> errorGraphs,
71  bool checkInitial = false,
73  unsigned int timeout = 0);
74 
78  virtual ~BackwardAnalysis();
79 
89  shared_ptr<vector<graphs::Hypergraph_sp>> performAnalysis();
90 
91  private:
92 
104  bool applyOne(graphs::MinGraphList& minList, vector<graphs::Hypergraph_sp>& newGraphs);
105 
110 
114  shared_ptr<vector<graphs::Hypergraph_sp>> errorGraphs;
115 
121 
127 
133 
139 
144 
149 
150  };
151 
152  } /* namespace analysis */
153 } /* namespace uncover */
154 
155 #endif /* BACKWARDANALYSIS_H_ */
Provides a timer, which can be started and used to measure elapsed time.
Definition: Timer.h:34
virtual ~BackwardAnalysis()
Destroys the current instance of this class freeing all raw pointed data!
Definition: BackwardAnalysis.cpp:51
basic_types::Order_sp order
Stores the Order used for minimization.
Definition: BackwardAnalysis.h:120
RulePreparer_sp rulePreparer
Stores the RulePreparer used for preprocessing the rule set.
Definition: BackwardAnalysis.h:126
shared_ptr< RulePreparer > RulePreparer_sp
Alias for a shared pointer of a RulePreparer.
Definition: RulePreparer.h:105
This class performs a backward search to solve the coverability problem with respect to a given Order...
Definition: BackwardAnalysis.h:43
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-cl...
Definition: BackwardAnalysis.cpp:190
BackwardResultHandler_sp resultHandler
Stores the BackwardResultHandler used to process intermediate results of the backward analysis...
Definition: BackwardAnalysis.h:143
graphs::GTS_sp gts
Stores the GTS used for the backwards search (before rule preparation).
Definition: BackwardAnalysis.h:109
shared_ptr< BackwardResultHandler > BackwardResultHandler_sp
Alias for a shared pointer to a BackwardResultHandler.
Definition: BackwardResultHandler.h:105
bool checkInitial
If set to true, the analysis will check if a graph smaller or equal to an initial graph was found...
Definition: BackwardAnalysis.h:138
This data structure stores a collection of graphs minimal to some given order.
Definition: MinGraphList.h:36
shared_ptr< vector< graphs::Hypergraph_sp > > errorGraphs
Stores the error graphs used as initial graphs for the backward search.
Definition: BackwardAnalysis.h:114
shared_ptr< Order > Order_sp
Alias for a shared pointer to an Order object.
Definition: Order.h:62
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.
Definition: BackwardAnalysis.cpp:34
basic_types::Timer * timer
Stores a Timer to handle premature timeout termination.
Definition: BackwardAnalysis.h:148
MinPOCEnumerator_sp pocEnumerator
Stores the MinPOCEnumerator used to compute all minimal pushout complements for a pair of rule and gr...
Definition: BackwardAnalysis.h:132
shared_ptr< GTS > GTS_sp
Alias for a shared pointer to a GTS object.
Definition: GTS.h:164
shared_ptr< MinPOCEnumerator > MinPOCEnumerator_sp
Alias of a shared pointer to an MinPOCEnumerator.
Definition: MinPOCEnumerator.h:128
shared_ptr< vector< graphs::Hypergraph_sp > > performAnalysis()
This function performs the backwards analysis with the parameters given during initialization.
Definition: BackwardAnalysis.cpp:55