Debian Codegraph @

Source/Reasoner/Answerer/CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController.cpp

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 #include "CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController.h"
22
23 namespace Konclude {
24
25 namespace Reasoner {
26
27 namespace Answerer {
28
29
30 CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController::CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController(COptimizedComplexVariableAbsorptionBasedHandlingExtensionItem* absorptionPropagationItem) {
31 mAbsorptionPropagationItem = absorptionPropagationItem;
32 }
33
34
35 CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController::~CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController() {
36 }
37
38
39
40
41 bool CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController::finalizeWithClashing() {
42 return true;
43 }
44
45 bool CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController::finalizeWithBindingExtraction() {
46 return false;
47 }
48
49 bool CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController::isPreparationBindingNominalIndividual(CVariable* variable, CIndividual* indi) {
50 QSet<CIndividualReference>* individualBindingSet = mAbsorptionPropagationItem->getVariableSteeringIndividualBindingSet(variable);
51 if (individualBindingSet) {
52 return individualBindingSet->contains(indi);
53 }
54 return false;
55 }
56
57
58 bool CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController::isPreparationBindingNominalIndividual(CVariable* variable, cint64 indiId) {
59 QSet<CIndividualReference>* individualBindingSet = mAbsorptionPropagationItem->getVariableSteeringIndividualBindingSet(variable);
60 if (individualBindingSet) {
61 return individualBindingSet->contains(indiId);
62 }
63 return false;
64 }
65
66
67 bool CAnsweringPropagationSteeringAbsorptionExtensionItemEntailmentController::isPreparationBindingAllIndividuals(CVariable* variable) {
68 COptimizedComplexVariableAbsorptionBasedHandlingQueryPartData* absorptionData = mAbsorptionPropagationItem->getAbsorptionBasedHandlingData();
69 CExpressionVariable* expVariable = absorptionData->getExpressionVariableVariableHash()->value(variable);
70 if (absorptionData->getPrepareVariableSet()->contains(expVariable)) {
71 return false;
72 }
73 return true;
74 }
75
76
77
78 }; // end namespace Answerer
79
80 }; // end namespace Reasoner
81
82 }; // end namespace Konclude