Debian Codegraph @

Source/Reasoner/Kernel/Process/Dependency/CBranchTreeNode.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_REASONER_KERNEL_PROCESS_DEPENDENCY_CBRANCHTREENODE_H
22 #define KONCLUDE_REASONER_KERNEL_PROCESS_DEPENDENCY_CBRANCHTREENODE_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "DependencySettings.h"
29
30
31 // Other includes
32 #include "Utilities/Container/CLinker.h"
33
34 #include "Reasoner/Kernel/Process/CProcessContext.h"
35 #include "Reasoner/Kernel/Process/CBranchingTag.h"
36
37
38 // Logger includes
39 #include "Logger/CLogger.h"
40
41
42
43 namespace Konclude {
44
45 using namespace Utilities::Container;
46
47 namespace Reasoner {
48
49 namespace Kernel {
50
51 namespace Task {
52 // forward declaration
53 class CSatisfiableCalculationTask;
54 };
55
56 namespace Process {
57
58 namespace Dependency {
59
60
61 //#define KONCLUCE_TASK_ALGORITHM_BRANCH_STRING_INSTRUCTION(a) a
62 #define KONCLUCE_TASK_ALGORITHM_BRANCH_STRING_INSTRUCTION(a)
63
64
65 /*!
66 *
67 * \class CBranchTreeNode
68 * \author Andreas Steigmiller
69 * \version 0.1
70 * \brief TODO
71 *
72 */
73 class CBranchTreeNode : public CBranchingTag {
74 // public methods
75 public:
76 //! Constructor
77 CBranchTreeNode(CProcessContext* processContext = nullptr);
78
79 CBranchTreeNode* initBranchingRootNode(Task::CSatisfiableCalculationTask* satCalcTask);
80 CBranchTreeNode* initBranchingChildNode(CBranchTreeNode* parentBranchTreeNode, Task::CSatisfiableCalculationTask* satCalcTask);
81 CBranchTreeNode* initBranchingCopyNode(CBranchTreeNode* copyBranchTreeNode, Task::CSatisfiableCalculationTask* satCalcTask);
82
83 CBranchTreeNode* getParentNode();
84 CBranchTreeNode* getRootNode();
85 bool isRootNode();
86
87 cint64 getBranchingLevel();
88
89 CBranchTreeNode* branchingIncrement(CNonDeterministicDependencyTrackPoint* depTrackPoint);
90 CNonDeterministicDependencyTrackPoint* getDependencyTrackPoint();
91
92 Task::CSatisfiableCalculationTask* getSatisfiableCalculationTask();
93
94 KONCLUCE_TASK_ALGORITHM_BRANCH_STRING_INSTRUCTION(CBranchTreeNode* setBranchString(QString* string));
95
96
97 // protected methods
98 protected:
99
100
101 // protected variables
102 protected:
103 CProcessContext* mProcessContext;
104 CBranchTreeNode* mParentNode;
105 CBranchTreeNode* mRootNode;
106
107 CNonDeterministicDependencyTrackPoint* mBranchedDepTrackPoint;
108 Task::CSatisfiableCalculationTask* mSatCalcTask;
109
110 KONCLUCE_TASK_ALGORITHM_BRANCH_STRING_INSTRUCTION(QString* mBranchString);
111
112
113 // private methods
114 private:
115
116 // private variables
117 private:
118
119
120 };
121
122 }; // end namespace Dependency
123
124 }; // end namespace Process
125
126 }; // end namespace Kernel
127
128 }; // end namespace Reasoner
129
130 }; // end namespace Konclude
131
132 #endif // KONCLUDE_REASONER_KERNEL_PROCESS_DEPENDENCY_CBRANCHTREENODE_H