-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTableau.h
More file actions
60 lines (52 loc) · 1.77 KB
/
Tableau.h
File metadata and controls
60 lines (52 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include "Model.h"
#include "LTLFormulaSet.h"
class PreTableauState;
//class TableauState
//{
//public:
// TableauState(int state, LTLFormulaSet&& formulas, const InterpretationFunction& interpretation);
// TableauState(int state, LTLFormulaSet&& formulas, InterpretationFunction&& interpretation);
// TableauState(TableauState&& state) = default;
// ~TableauState();
//
// void addChild(TableauState& child) { this->children.push_back(&child); };
//
// const std::vector<TableauState*>& getChildren() const { return this->children; };
// const LTLFormulaSet& getFormulas() const { return this->formulas; };
// const InterpretationFunction& getInterpretationFunction() const { return this->interpretation; };
// int getState() const { return this->state; };
//
// bool operator==(const TableauState& other) const;
//
// int id;
//private:
// static int lastID;
// int state;
// LTLFormulaSet formulas;
// InterpretationFunction interpretation;
//
// std::vector<TableauState*> children;
//};
typedef PreTableauState TableauState;
class Tableau
{
public:
Tableau() = default;
Tableau(const Model* model, LTLFormula* formula, std::vector<std::unique_ptr<TableauState>>&& states, std::vector<TableauState*>&& rootStates);
Tableau(Tableau&& tab) = default;
Tableau& operator=(Tableau&& tab) = default;
~Tableau();
void stateElim1();
void stateElim2();
void tableauComputation();
size_t getStateCount() { return this->states.size(); };
operator std::string() const;
bool isOpen() const;
private:
std::vector<std::unique_ptr<TableauState>> states;
std::vector<TableauState*> roots;
const Model* model;
LTLFormula* formula;
bool isEventualityRealised(const LTLFormula* eventuality, const TableauState* fromState, std::vector<const TableauState*>& alreadyVisitedStates) const;
};