Debian Codegraph @

Source/Reasoner/Kernel/Process/Dependency/CDependencyNode.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_CDEPENDENCYNODE_H
22 #define KONCLUDE_REASONER_KERNEL_PROCESS_DEPENDENCY_CDEPENDENCYNODE_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "DependencySettings.h"
29 #include "CDependency.h"
30 #include "CDependencyTrackPoint.h"
31 #include "CDependencyIterator.h"
32
33
34 // Other includes
35 #include "Reasoner/Kernel/Process/Marker/CMarker.h"
36 #include "Reasoner/Kernel/Process/CProcessingTag.h"
37
38 #include "Reasoner/Kernel/Process/CConceptDescriptor.h"
39
40
41 // Logger includes
42 #include "Logger/CLogger.h"
43
44
45
46 namespace Konclude {
47
48 namespace Reasoner {
49
50 using namespace Ontology;
51
52 namespace Kernel {
53
54 namespace Process {
55
56 using namespace Marker;
57
58 namespace Dependency {
59
60 /*!
61 *
62 * \class CDependencyNode
63 * \author Andreas Steigmiller
64 * \version 0.1
65 * \brief TODO
66 *
67 */
68 class CDependencyNode : public CProcessingTag {
69 // public methods
70 public:
71 //! Constructor
72 CDependencyNode(CProcessContext* processContext = nullptr);
73
74
75 enum DEPENDENCNODEYTYPE { DNTUNDEFINED, DNTINDEPENDENTBASE, DNTANDDEPENDENCY, DNTAUTOMATCHOOSEDEPENDENCY, DNTORDEPENDENCY,
76 DNTALLDEPENDENCY, DNTAUTOMATTRANSACTIONDEPENDENCY, DNTSOMEDEPENDENCY, DNTSELFDEPENDENCY, DNTVALUEDEPENDENCY,
77 DNTNEGVALUEDEPENDENCY, DNTDISTINCTDEPENDENCY, DNTATLEASTDEPENDENCY, DNTMERGEDCONCEPT, DNTMERGEDLINK, DNTMERGEDINDIVIDUAL,
78 DNTMERGEDEPENDENCY, DNTATMOSTDEPENDENCY, DNTQUALIFYDEPENDENCY, DNTFUNCTIONALDEPENDENCY, DNTNOMINALDEPENDENCY,
79 DNTIMPLICATIONDEPENDENCY, DNTEXPANDEDDEPENDENCY, DNTCONNECTIONDEPENDENCY, DNTREUSEINDIVIDUALDEPENDENCY,
80 DNTREUSECONCEPTSDEPENDENCY, DNTREUSECOMPLETIONGRAPHDEPENDENCY, DNTDATATYPETRIGGERDEPENDENCY, DNTDATATYPECONNECTIONDEPENDENCY,
81 DNTROLEASSERTIONDEPENDENCY, DNTDATAASSERTIONDEPENDENCY, DNTMERGEPOSSIBLEINSTANCEINDIVIDUALDEPENDENCY, DNTSAMEINDIVIDUALSMERGEDEPENDENCY,
82 DNTORONLYOPTIONDEPENDENCY,
83
84 DNTBINDVARIABLEDEPENDENCY, DNTPROPAGATEBINDINGDEPENDENCY, DNTBINDPROPAGATEAND, DNTBINDPROPAGATEIMPLICATION,
85 DNTPROPAGATEBINDINGSUCCESSORDEPENDENCY, DNTBINDPROPAGATEALL, DNTBINDPROPAGATECYCLE, DNTPROPAGATECONNECTIONDEPENDENCY,
86 DNTPROPAGATECONNECTIONAWAYDEPENDENCY, DNTBINDPROPAGATEGROUNDINGDEPENDENCY,
87
88 DNTVARBINDPROPAGATEAND, DNTPROPAGATEVARIABLEBINDINGDEPENDENCY, DNTVARBINDPROPAGATEALL, DNTPROPAGATEVARIABLEBINDINGSUCCESSORDEPENDENCY,
89 DNTVARBINDVARIABLEDEPENDENCY, DNTVARBINDPROPAGATEJOIN, DNTVARBINDPROPAGATEGROUNDINGDEPENDENCY, DNTPROPAGATEVARIABLECONNECTIONDEPENDENCY,
90 DNTVARBINDPROPAGATEIMPLICATION,
91
92 DNTRESOLVEREPRESENTATIVE, DNTREPRESENTATIVEAND, DNTREPRESENTATIVEALL, DNTREPRESENTATIVEIMPLICATION, DNTREPRESENTATIVEBINDVARIABLE,
93 DNTREPRESENTATIVEJOIN, DNTREPRESENTATIVEGROUNDING,
94
95 DNTREUSEBACKENDEXPANSIONMODESDEPENDENCY, DNTREUSEBACKENDFIXEDINDIVIDUALEXPANSIONDEPENDENCY, DNTREUSEBACKENDPRIORITIZEDINDIVIDUALEXPANSIONDEPENDENCY,
96 DNTREUSEBACKENDVALUEDEPENDENCY
97 };
98
99
100 CDependencyNode* initDependencyNode(DEPENDENCNODEYTYPE depType, CConceptDescriptor* conceptDescriptor = nullptr);
101 CDependencyNode* initDependencyNode(DEPENDENCNODEYTYPE depType, CIndividualProcessNode* individualNode, CConceptDescriptor* conceptDescriptor = nullptr);
102
103 CConceptDescriptor* getConceptDescriptor();
104 CDependencyNode* setConceptDescriptor(CConceptDescriptor* conceptDescriptor);
105
106 CDependencyTrackPoint* getPreviousDependencyTrackPoint();
107
108 virtual CDependencyTrackPoint* getContinueDependencyTrackPoint() = 0;
109
110 virtual bool isDeterministiDependencyNode() = 0;
111 bool isNonDeterministiDependencyNode();
112
113
114 //CMarker* getMarker();
115 //CDependencyNode* setMarker(CMarker* depMarker);
116 //CDependencyNode* addMarker(CMarker* depMarker);
117
118
119 CDependencyIterator getAdditionalDependencyIterator(bool aheadDependencies = true, bool afterDependencies = true);
120 //CDependency* getAdditionalAheadDependencies();
121 CDependency* getAdditionalAfterDependencies();
122 cint64 getAdditionalDependencyCount();
123 bool hasAdditionalDependencies();
124
125 //bool hasAdditionalAheadDependencies();
126 bool hasAdditionalAfterDependencies();
127
128 bool hasDependencies();
129 cint64 getDependencyCount();
130
131 cint64 getDependedBranchingTag();
132 cint64 getDependedBranchingLevel();
133
134 DEPENDENCNODEYTYPE getDependencyType();
135 bool isDependencyType(DEPENDENCNODEYTYPE depType);
136 bool isIndependentBaseDependencyType();
137 bool isUndefinedDependencyType();
138
139 CIndividualProcessNode* getAppropriateIndividualNode();
140 bool hasAppropriateIndividualNode();
141 CDependencyNode* setAppropriateIndividualNode(CIndividualProcessNode* indiNode);
142
143 virtual bool isRepresentativeResolveDependencyNode();
144 virtual bool isRepresentativeSelectDependencyNode();
145
146 // protected methods
147 protected:
148 //CDependencyNode* addAheadDependency(CDependency* conceptDependency);
149 CDependencyNode* addAfterDependency(CDependency* linkDependency);
150
151 bool updateDependencyTrackPointBranchingTag(CDependencyTrackPoint* depTrackPoint, cint64 branchinLevelTag);
152
153 // protected variables
154 protected:
155 CProcessContext* mProcessContext;
156 CConceptDescriptor* mConceptDescriptor;
157 CIndividualProcessNode* mIndividualNode;
158 DEPENDENCNODEYTYPE mDepNodeType;
159
160 //CMarker* mMarker;
161
162 CDependencyTrackPoint* mDepTrackPoint;
163 //CDependency* mAdditionalAheadDepLinker;
164 CDependency* mAdditionalAfterDepLinker;
165
166
167 // private methods
168 private:
169
170 // private variables
171 private:
172
173
174 };
175
176 }; // end namespace Dependency
177
178 }; // end namespace Process
179
180 }; // end namespace Kernel
181
182 }; // end namespace Reasoner
183
184 }; // end namespace Konclude
185
186 #endif // KONCLUDE_REASONER_KERNEL_PROCESS_DEPENDENCY_CDEPENDENCYNODE_H