~verifypn-stub/verifypn/deadlock-hotfix-2.2

« back to all changes in this revision

Viewing changes to CTL/PetriNets/PetriConfig.h

  • Committer: Jiri Srba
  • Date: 2017-12-04 14:01:52 UTC
  • mfrom: (181.4.11 nctl)
  • Revision ID: srba.jiri@gmail.com-20171204140152-3tjzqq6xusfq0wyj
merged in branch lp:~verifypn-stub/verifypn/new-ctl

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include <sstream>
5
5
#include "../DependencyGraph/Configuration.h"
6
 
#include "../CTLParser/CTLQuery.h"
7
 
#include "../CTLParser/CTLParser.h"
 
6
#include "PetriEngine/PQL/PQL.h"
8
7
 
9
8
namespace PetriNets {
10
9
 
11
10
class PetriConfig : public DependencyGraph::Configuration {
12
11
 
13
12
public:
 
13
    using Condition = PetriEngine::PQL::Condition;
14
14
    PetriConfig() : 
15
15
        DependencyGraph::Configuration(), marking(0), query(NULL) 
16
16
    {}
17
17
    
18
 
    PetriConfig(size_t t_marking, CTLQuery *t_query) :
 
18
    PetriConfig(size_t t_marking, Condition *t_query) :
19
19
        DependencyGraph::Configuration(), marking(t_marking), query(t_query) {
20
20
    }
21
21
 
 
22
    virtual ~PetriConfig(){};
 
23
 
22
24
    size_t marking;
23
 
    CTLQuery *query;
24
 
 
25
 
    virtual std::string toString() const override
26
 
    {
27
 
        std::stringstream ss;
28
 
        ss << "==================== Configuration ====================" << std::endl
29
 
           << attrToString() << " Depth: " << query->Depth << " IsTemporal: " << (query->IsTemporal ? "TRUE" : "FALSE") << std::endl
30
 
//           << marking->toString() << std::endl
31
 
           << query->ToString() << std::endl
32
 
           << "=======================================================" << std::endl;
33
 
 
34
 
        return ss.str();
35
 
    }
36
 
 
37
 
    virtual void printConfiguration() const override {
38
 
        std::cout << toString();
39
 
    }
 
25
    Condition *query;
40
26
 
41
27
};
42
28