~verifypn-maintainers/verifypn/emptyTracePrint

« back to all changes in this revision

Viewing changes to CTL/SearchStrategy/DFSSearch.h

  • Committer: Jiri Srba
  • Date: 2018-04-18 10:58:36 UTC
  • mfrom: (197.3.78 cpn_ctlss)
  • Revision ID: srba.jiri@gmail.com-20180418105836-a5rha272u0om4u77
merged in branch lp:~verifypn-cpn/verifypn/cpn_ctlss/

CPN unfolding
CPN linear overapproximation
Export of reduced queries and model
parallel query simplification
TAR for P/T nets
Improved structural reduction rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef DFSSEARCH_H
2
2
#define DFSSEARCH_H
3
3
 
4
 
#include <vector>
 
4
#include <stack>
5
5
#include "CTL/DependencyGraph/Edge.h"
6
 
#include "iSearchStrategy.h"
 
6
#include "SearchStrategy.h"
7
7
 
8
8
namespace SearchStrategy {
9
9
 
12
12
 
13
13
class DFSSearch : public SearchStrategy {
14
14
 
15
 
public:
16
 
    virtual ~DFSSearch(){}
17
 
    DFSSearch() {}
18
 
 
19
 
    bool empty() const;
20
 
    void pushEdge(DependencyGraph::Edge *edge);
21
 
    void pushDependency(DependencyGraph::Edge* edge);
22
 
    void pushNegation(DependencyGraph::Edge *edge);
23
 
    DependencyGraph::Edge* popEdge(bool saturate = false);
24
 
    size_t size() const { return W.size() + N.size() + D.size();}
25
 
 
26
 
    uint32_t maxDistance() const;
27
 
    bool available() const;
28
 
    void releaseNegationEdges(uint32_t );
29
 
    bool trivialNegation();
30
15
protected:
31
 
    bool possibleTrivial = false;
32
 
    std::vector<DependencyGraph::Edge*> W;
33
 
    std::vector<DependencyGraph::Edge*> N;
34
 
    std::vector<DependencyGraph::Edge*> D;
 
16
    size_t Wsize() const { return W.size(); };
 
17
    void pushToW(DependencyGraph::Edge* edge) { W.push(edge); };
 
18
    DependencyGraph::Edge* popFromW() 
 
19
    {
 
20
        auto e = W.top();
 
21
        W.pop();
 
22
        return e;
 
23
    };
 
24
    std::stack<DependencyGraph::Edge*> W;
35
25
};
36
26
 
37
27
}   // end SearchStrategy