Debian Codegraph @

Source/Reasoner/Classifier/COptimizedClassExtractedSaturationSubsumptionClassifierThread.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_COPTIMIZEDCLASSEXTRACTEDSATURATIONSUBSUMPTIONCLASSIFIERTHREAD_H
22 #define KONCLUDE_REASONER_CLASSIFIER_COPTIMIZEDCLASSEXTRACTEDSATURATIONSUBSUMPTIONCLASSIFIERTHREAD_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ClassifierSettings.h"
29 #include "CSubsumptionClassifier.h"
30 #include "CSubsumptionClassifierThread.h"
31 #include "CPartialPruningTaxonomy.h"
32 #include "CPrecomputedSaturationSubsumerExtractor.h"
33 #include "COptimizedClassExtractedSaturationOntologyClassificationItem.h"
34
35 // Other includes
36 #include "Reasoner/Revision/COntologyRevision.h"
37
38 #include "Reasoner/Ontology/CConceptProcessData.h"
39 #include "Reasoner/Ontology/CConceptSaturationReferenceLinkingData.h"
40
41
42 #include "KoncludeSettings.h"
43
44 // Logger includes
45 #include "Logger/CLogger.h"
46 #include "Logger/CLogIdentifier.h"
47
48 #include <iostream>
49
50 using namespace std;
51
52
53 namespace Konclude {
54
55
56 namespace Reasoner {
57
58 using namespace Revision;
59 using namespace Ontology;
60
61 using namespace Kernel;
62
63 namespace Classifier {
64
65
66 /*!
67 *
68 * \class COptimizedClassExtractedSaturationSubsumptionClassifierThread
69 * \author Andreas Steigmiller
70 * \version 0.1
71 * \brief TODO
72 *
73 */
74 class COptimizedClassExtractedSaturationSubsumptionClassifierThread : public CSubsumptionClassifierThread, public CLogIdentifier {
75 // public methods
76 public:
77 //! Constructor
78 COptimizedClassExtractedSaturationSubsumptionClassifierThread(CReasonerManager *reasonerManager);
79
80 //! Destructor
81 virtual ~COptimizedClassExtractedSaturationSubsumptionClassifierThread();
82
83 virtual QString getStatusString();
84 virtual CClassificationProgress* getClassificationProgress();
85
86 // protected methods
87 protected:
88 virtual bool finishOntologyClassification(COntologyClassClassificationItem *ontClassItem);
89 virtual CSubsumptionClassifierThread *scheduleOntologyClassification(CConcreteOntology *ontology, CClassificationCalculationSupport *classificationSupport, CConfigurationBase *config);
90
91 virtual void readCalculationConfig(CCalculationConfigurationExtension *config);
92
93 virtual bool interpreteTestResults(CTestCalculatedCallbackEvent *testResult);
94
95 virtual bool createNextSubsumtionTest();
96 virtual CTaxonomy *createEmptyTaxonomyForOntology(CConcreteOntology *ontology, CConfigurationBase *config);
97
98
99 virtual bool processCustomsEvents(QEvent::Type type, CCustomEvent *event);
100
101 void readSubsumptionFromPrecomputedSaturation(COptimizedClassExtractedSaturationOntologyClassificationItem* ontClassItem);
102
103 cint64 makeParentAddPredeccessors(COptimizedClassExtractedSaturationSatisfiableTestingItem* conceptItem, COptimizedClassExtractedSaturationSatisfiableTestingItem* subsumedConceptItem, cint64 remainingSubsumingResolvingCount, bool firstResolve);
104
105
106 // protected variables
107 protected:
108 QString statusString;
109 QMutex statUpdateMutex;
110
111 bool mTransitiveReductionAddAllPredecessors;
112
113 CClassificationProgress mClassifyProgess;
114 QTime classStartTime;
115
116 cint64 satTestedCount;
117 cint64 totalToTestCount;
118
119 // private methods
120 private:
121
122 // private variables
123 private:
124
125 };
126
127 }; // end namespace Classifier
128
129 }; // end namespace Reasoner
130
131 }; // end namespace Konclude
132
133 #endif // KONCLUDE_REASONER_CLASSIFIER_COPTIMIZEDCLASSEXTRACTEDSATURATIONSUBSUMPTIONCLASSIFIERTHREAD_H