~tapaal-ltl/verifypn/scc-optimise

« back to all changes in this revision

Viewing changes to include/CTL/SearchStrategy/DFSSearch.h

  • Committer: srba.jiri at gmail
  • Date: 2020-09-11 14:23:39 UTC
  • mfrom: (213.1.151 interval_tar)
  • Revision ID: srba.jiri@gmail.com-20200911142339-bq9328s1gppw24uj
merged in lp:~verifypn-maintainers/verifypn/interval_tar doing 
- Implements TAR w/o z3, but using a simple integer inference engine for Hoare logic.
 - Replaces LP-Solve with GLPK, reduces computation-time and memory overhead
 - Implements new global properties, translated into CTL formulae.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef DFSSEARCH_H
 
2
#define DFSSEARCH_H
 
3
 
 
4
#include <stack>
 
5
#include "CTL/DependencyGraph/Edge.h"
 
6
#include "SearchStrategy.h"
 
7
 
 
8
namespace SearchStrategy {
 
9
 
 
10
// A custom search strategy that should ensure as little overhead as possible
 
11
// while running sequential computation.
 
12
 
 
13
class DFSSearch : public SearchStrategy {
 
14
 
 
15
protected:
 
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;
 
25
};
 
26
 
 
27
}   // end SearchStrategy
 
28
 
 
29
#endif // DFSSEARCH_H