Debian Codegraph @

Source/Reasoner/Kernel/Cache/COccurrenceUnsatisfiableCacheEntry.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_CACHE_COCCURRENCEUNSATISFIABLECACHEENTRY_H
22 #define KONCLUDE_REASONER_KERNEL_CACHE_COCCURRENCEUNSATISFIABLECACHEENTRY_H
23
24 // Libraries includes
25 #include <QHash>
26 #include <QList>
27
28 // Namespace includes
29 #include "CCacheEntry.h"
30 #include "CCacheValue.h"
31 #include "COccurrenceUnsatisfiableCacheEntriesHash.h"
32
33 // Other includes
34
35
36 // Logger includes
37 #include "Logger/CLogger.h"
38
39
40 namespace Konclude {
41
42 namespace Reasoner {
43
44 namespace Kernel {
45
46 namespace Cache {
47
48 /*!
49 *
50 * \class COccurrenceUnsatisfiableCacheEntry
51 * \author Andreas Steigmiller
52 * \version 0.1
53 * \brief TODO
54 *
55 */
56 class COccurrenceUnsatisfiableCacheEntry : public CCacheEntry {
57 // public methods
58 public:
59 //! Constructor
60 COccurrenceUnsatisfiableCacheEntry(const CCacheValue &cacheValue, COccurrenceUnsatisfiableCacheEntry *prevUnsatCacheEntry, qint64 writeUpdateSlotCount, qint64 currentActiveSlot, qint64 readCountVecSize = 1);
61
62 //! Destructor
63 virtual ~COccurrenceUnsatisfiableCacheEntry();
64
65 bool isUnsatisfiableTermination();
66
67 void setMinimumCandidate(qint64 value);
68 void setMaximumCandidate(qint64 value);
69
70 void setActiveSlot(qint64 slotIndex);
71
72 COccurrenceUnsatisfiableCacheEntriesHash *setCacheEntriesHashSlotGetPrevious(qint64 slotIndex, COccurrenceUnsatisfiableCacheEntriesHash *entriesHash);
73 void removeSlotCacheEntriesHash(qint64 slotIndex);
74
75 qint64 getMaxTag();
76 qint64 getMinTag();
77
78 COccurrenceUnsatisfiableCacheEntriesHash *getCacheEntriesHash();
79 COccurrenceUnsatisfiableCacheEntriesHash *getSlotCacheEntriesHash(qint64 slotIndex);
80
81 COccurrenceUnsatisfiableCacheEntriesHash *updateSlotCacheHashGetPrevious(qint64 slotIndex);
82
83 CCacheValue getCacheValue();
84
85 qint64 getTotalReadCount();
86 void incReadCount(qint64 readCountIndex);
87
88 COccurrenceUnsatisfiableCacheEntry *getPreviousUnsatisfiableCacheEntry();
89
90 bool isSerialized();
91
92 COccurrenceUnsatisfiableCacheEntry *setCacheTerminationValuesList(QList<CCacheValue> *cacheTerminationValuesList);
93 COccurrenceUnsatisfiableCacheEntry *copyCacheTerminationValuesList(QList<CCacheValue> *cacheTerminationValuesList);
94 QList<CCacheValue> *getCacheTerminationValuesList();
95
96
97 // protected methods
98 protected:
99
100 // private methods
101 private:
102
103 // private variables
104 private:
105 COccurrenceUnsatisfiableCacheEntry *prevEntry;
106
107 qint64 updateSlotCount;
108 qint64 activeSlot;
109 COccurrenceUnsatisfiableCacheEntriesHash **cacheEntriesHashes;
110 COccurrenceUnsatisfiableCacheEntriesHash *lastCacheEntriesHash;
111
112 qint64 maxItemEntry;
113 qint64 minItemEntry;
114
115 bool unsatTerm;
116 bool serialized;
117
118 qint64 readCountCount;
119 qint64 *readCountVec;
120
121 CCacheValue cacheVal;
122
123 QList<CCacheValue> *cacheTermValuesList;
124
125 };
126
127 }; // end namespace Cache
128
129 }; // end namespace Kernel
130
131 }; // end namespace Reasoner
132
133 }; // end namespace Konclude
134
135 #endif // KONCLUDE_REASONER_KERNEL_CACHE_COCCURRENCEUNSATISFIABLECACHEENTRY_H