Debian Codegraph @

Source/Reasoner/Classifier/COptimizedSubClassSatisfiableTestingItem.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_CLASSIFIER_COPTIMIZEDSUBCLASSSATISFIABLETESTINGITEM_H
22 #define KONCLUDE_REASONER_CLASSIFIER_COPTIMIZEDSUBCLASSSATISFIABLETESTINGITEM_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ClassifierSettings.h"
29 #include "CConceptSubsumerObserver.h"
30 #include "CClassificationSatisfiableCalculationConceptReferenceLinking.h"
31
32
33 // Other includes
34 #include "Reasoner/Ontology/CConcept.h"
35 #include "Reasoner/Ontology/CConceptProcessData.h"
36 #include "Reasoner/Ontology/CConceptSatisfiableReferenceLinkingData.h"
37
38 #include "Reasoner/Consistiser/CIndividualDependenceTrackingMarker.h"
39
40 #include "Reasoner/Taxonomy/CHierarchyNode.h"
41
42 #include "Reasoner/Kernel/Cache/CCacheEntry.h"
43
44 // Logger includes
45 #include "Logger/CLogger.h"
46
47
48 namespace Konclude {
49
50 namespace Reasoner {
51
52 using namespace Ontology;
53 using namespace Taxonomy;
54 using namespace Consistiser;
55 using namespace Kernel::Cache;
56
57 namespace Classifier {
58
59
60 /*!
61 *
62 * \class COptimizedSubClassSatisfiableTestingItem
63 * \author Andreas Steigmiller
64 * \version 0.1
65 * \brief TODO
66 *
67 */
68 class COptimizedSubClassSatisfiableTestingItem : public CClassificationSatisfiableCalculationConceptReferenceLinking, public CConceptSubsumerObserver, public CIndividualDependenceTrackingMarker {
69 // public methods
70 public:
71 //! Constructor
72 COptimizedSubClassSatisfiableTestingItem();
73
74
75 COptimizedSubClassSatisfiableTestingItem* initSatisfiableTestingItem(CConcept* satTestConcept);
76 CConcept* getSatisfiableConcept();
77
78 CHierarchyNode* getSatisfiableConceptHierarchyNode();
79 COptimizedSubClassSatisfiableTestingItem* setSatisfiableConceptHierarchyNode(CHierarchyNode* hierNode);
80
81 QSet<COptimizedSubClassSatisfiableTestingItem*>* getSubsumingConceptItemSet();
82 QList<COptimizedSubClassSatisfiableTestingItem*>* getSubsumingConceptItemList();
83 cint64 getSubsumingConceptItemCount() const;
84
85 QList<COptimizedSubClassSatisfiableTestingItem*>* getSuccessorItemList();
86 cint64 getUnprocessedPredecessorItemCount();
87
88 bool hasOnlyProcessedPredecessorItems();
89 COptimizedSubClassSatisfiableTestingItem* decUnprocessedPredecessorItems(cint64 decCount = 1);
90 COptimizedSubClassSatisfiableTestingItem* incUnprocessedPredecessorItems(cint64 incCount = 1);
91 COptimizedSubClassSatisfiableTestingItem* setUnprocessedPredecessorItems(cint64 count);
92
93 COptimizedSubClassSatisfiableTestingItem* addSuccessorSatisfiableTestItem(COptimizedSubClassSatisfiableTestingItem* succItem);
94
95 bool isSatisfiableTestOrdered();
96 bool isSatisfiableTested();
97 bool isResultUnsatisfiableDerivated();
98 bool isResultSatisfiableDerivated();
99 bool getSatisfiableTestedResult();
100
101 COptimizedSubClassSatisfiableTestingItem* setSatisfiableTestOrdered(bool satTestOrdered);
102 COptimizedSubClassSatisfiableTestingItem* setSatisfiableTested(bool satTested);
103 COptimizedSubClassSatisfiableTestingItem* setResultUnsatisfiableDerivated(bool unsatDerivated);
104 COptimizedSubClassSatisfiableTestingItem* setResultSatisfiableDerivated(bool satDerivated);
105 COptimizedSubClassSatisfiableTestingItem* setSatisfiableTestedResult(bool satTestedResult);
106
107
108 COptimizedSubClassSatisfiableTestingItem* addSubsumingConceptItem(COptimizedSubClassSatisfiableTestingItem* subsumingItem);
109 CConceptSubsumerObserver* tellConceptSupsumption(CConcept* subsumedConcept, CConcept* subsumerConcept);
110
111
112 QList<COptimizedSubClassSatisfiableTestingItem*>* sortSubsumingConceptItemList();
113
114 bool isEquivalentItem();
115 COptimizedSubClassSatisfiableTestingItem* setEquivalentItem(bool equivalent);
116
117 bool isPredecessorItem();
118 COptimizedSubClassSatisfiableTestingItem* setPredecessorItem(bool isPredecessorOfOneItem);
119
120 bool isMoreConceptClassificationInformationRequired();
121
122
123
124 CCacheEntry* getFastSatisfiabilityTestedSaturationCacheEntry();
125 COptimizedSubClassSatisfiableTestingItem* setFastSatisfiabilityTestedSaturationCacheEntry(CCacheEntry* cacheEntry);
126
127 bool hasSuccessfullyFastSatisfiabilityTested();
128 COptimizedSubClassSatisfiableTestingItem* setSuccessfullyFastSatisfiabilityTested(bool successfullyTested);
129
130 virtual CIndividualDependenceTrackingMarker* setIndividualDependenceTracked();
131 bool hasIndividualDependenceTracked();
132
133 // protected methods
134 protected:
135
136 // protected variables
137 protected:
138 CConcept* mConceptSat;
139 CHierarchyNode* mConSatHierNode;
140
141 QSet<COptimizedSubClassSatisfiableTestingItem*> mSubsumingConceptItemSet;
142 QList<COptimizedSubClassSatisfiableTestingItem*> mSubsumingConceptItemList;
143
144 QList<COptimizedSubClassSatisfiableTestingItem*> mSuccList;
145 cint64 mPredCounter;
146
147 bool mSatTestOrdered;
148 bool mTestedSat;
149 bool mUnsatDerivated;
150 bool mSatDerivated;
151 bool mSatTestedResult;
152
153 bool mEquiItem;
154 bool mPredOfItem;
155
156 //QString mSubsumingConceptString;
157
158 CCacheEntry* mFastSatCacheEntry;
159 bool mSuccFastSatTested;
160
161 bool mIndiDepTracked;
162
163 // private methods
164 private:
165
166 // private variables
167 private:
168
169 };
170
171 }; // end namespace Classifier
172
173 }; // end namespace Reasoner
174
175 }; // end namespace Konclude
176
177 #endif // KONCLUDE_REASONER_CLASSIFIER_COPTIMIZEDSUBCLASSSATISFIABLETESTINGITEM_H