~tapaal-ltl/verifypn/scc-optimise

« back to all changes in this revision

Viewing changes to src/CTL/Algorithm/FixedPointAlgorithm.cpp

  • 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
#include "CTL/Algorithm/FixedPointAlgorithm.h"
 
2
#include "CTL/SearchStrategy/BFSSearch.h"
 
3
#include "CTL/SearchStrategy/DFSSearch.h"
 
4
#include "CTL/SearchStrategy/RDFSSearch.h"
 
5
#include "CTL/SearchStrategy/HeuristicSearch.h"
 
6
 
 
7
namespace Algorithm {
 
8
    FixedPointAlgorithm::FixedPointAlgorithm(PetriEngine::Reachability::Strategy type) {
 
9
        using namespace PetriEngine::Reachability;
 
10
        using namespace SearchStrategy;
 
11
        switch(type)
 
12
        {
 
13
            case DFS:
 
14
                strategy = std::make_shared<DFSSearch>();
 
15
                break;
 
16
            case RDFS:
 
17
                strategy = std::make_shared<RDFSSearch>();
 
18
                break;
 
19
            case BFS:
 
20
                strategy = std::make_shared<BFSSearch>();
 
21
                break;
 
22
            case HEUR:
 
23
                strategy = std::make_shared<HeuristicSearch>();
 
24
                break;
 
25
            default:
 
26
                std::cerr << "Search strategy is unsupported by the CTL-Engine"   <<  std::endl;
 
27
                assert(false);
 
28
                exit(ErrorCode);                
 
29
        }
 
30
    }
 
31
 
 
32
 
 
33
}