~verifypn-maintainers/verifypn/emptyTracePrint

« back to all changes in this revision

Viewing changes to CTL/SearchStrategy/BFSSearch.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
/* 
 
2
 * File:   Encoder.h
 
3
 * Author: Peter G. Jensen
 
4
 *
 
5
 * Created on March 7, 2018, 1:50 PM
 
6
 */
 
7
 
 
8
#ifndef BFSSEARCH_H
 
9
#define BFSSEARCH_H
 
10
#include <queue>
 
11
#include "CTL/DependencyGraph/Edge.h"
 
12
#include "SearchStrategy.h"
 
13
 
 
14
namespace SearchStrategy {
 
15
 
 
16
// A custom search strategy that should ensure as little overhead as possible
 
17
// while running sequential computation.
 
18
 
 
19
class BFSSearch : public SearchStrategy {
 
20
 
 
21
protected:
 
22
    size_t Wsize() const { return W.size(); };
 
23
    void pushToW(DependencyGraph::Edge* edge) { W.push(edge); };
 
24
    DependencyGraph::Edge* popFromW() 
 
25
    {
 
26
        auto e = W.front();
 
27
        W.pop();
 
28
        return e;
 
29
    };    
 
30
    std::queue<DependencyGraph::Edge*> W;
 
31
};
 
32
 
 
33
}   // end SearchStrategy
 
34
 
 
35
#endif /* BFSSEARCH_H */
 
36