Skip to content

Commit 118750e

Browse files
committed
Renamed internal MainSolver::firstNotSimplifiedFrame and insertedFormulasCount
1 parent e575257 commit 118750e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/api/MainSolver.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ bool MainSolver::pop() {
9393
frames.pop();
9494
preprocessor.pop();
9595
termNames.popScope();
96-
firstNotSimplifiedFrame = std::min(firstNotSimplifiedFrame, frames.frameCount());
96+
firstNotPreprocessedFrame = std::min(firstNotPreprocessedFrame, frames.frameCount());
9797
if (not isLastFrameUnsat()) { getSMTSolver().restoreOK(); }
9898
return true;
9999
}
@@ -115,15 +115,15 @@ void MainSolver::insertFormula(PTRef fla) {
115115
// formulas,
116116
// thus we need the old value of count. TODO: Find a good interface for this so it cannot be broken this
117117
// easily
118-
unsigned int partition_index = insertedFormulasCount++;
118+
unsigned int partition_index = insertedAssertionsCount++;
119119
pmanager.assignTopLevelPartitionIndex(partition_index, fla);
120120
assert(pmanager.getPartitionIndex(fla) != -1);
121121
} else {
122-
++insertedFormulasCount;
122+
++insertedAssertionsCount;
123123
}
124124

125125
frames.add(fla);
126-
firstNotSimplifiedFrame = std::min(firstNotSimplifiedFrame, frames.frameCount() - 1);
126+
firstNotPreprocessedFrame = std::min(firstNotPreprocessedFrame, frames.frameCount() - 1);
127127
}
128128

129129
bool MainSolver::tryAddNamedAssertion(PTRef fla, std::string const & name) {
@@ -140,12 +140,12 @@ bool MainSolver::tryAddTermNameFor(PTRef fla, std::string const & name) {
140140

141141
sstat MainSolver::simplifyFormulas() {
142142
status = s_Undef;
143-
for (std::size_t i = firstNotSimplifiedFrame; i < frames.frameCount(); ++i) {
143+
for (std::size_t i = firstNotPreprocessedFrame; i < frames.frameCount(); ++i) {
144144
auto & frame = frames[i];
145145
FrameId const frameId = frame.getId();
146146
PreprocessingContext context{.frameCount = i, .perPartition = trackPartitions()};
147147
preprocessor.prepareForProcessingFrame(i);
148-
firstNotSimplifiedFrame = i + 1;
148+
firstNotPreprocessedFrame = i + 1;
149149

150150
if (not context.perPartition) {
151151
PTRef frameFormula = preprocessFormulasDefault(frame.formulas, context);
@@ -161,8 +161,8 @@ sstat MainSolver::simplifyFormulas() {
161161
}
162162

163163
if (status == s_False) {
164-
assert(firstNotSimplifiedFrame > 0);
165-
rememberUnsatFrame(firstNotSimplifiedFrame - 1);
164+
assert(firstNotPreprocessedFrame > 0);
165+
rememberUnsatFrame(firstNotPreprocessedFrame - 1);
166166
}
167167

168168
return status;

src/api/MainSolver.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class MainSolver {
8989
void insertFormula(PTRef fla);
9090
// Alias for `insertFormula`, reserved for future use
9191
void addAssertion(PTRef fla) { return insertFormula(fla); }
92-
std::size_t getInsertedFormulasCount() const { return insertedFormulasCount; }
92+
std::size_t getInsertedFormulasCount() const { return insertedAssertionsCount; }
9393
// Alias for `getInsertedFormulasCount`, reserved for future use
9494
std::size_t getAssertionsCount() const { return getInsertedFormulasCount(); }
9595

@@ -332,8 +332,8 @@ class MainSolver {
332332
int check_called = 0; // A counter on how many times check was called.
333333

334334
vec<PTRef> frameTerms;
335-
std::size_t firstNotSimplifiedFrame = 0;
336-
unsigned int insertedFormulasCount = 0;
335+
std::size_t firstNotPreprocessedFrame = 0;
336+
std::size_t insertedAssertionsCount = 0;
337337
};
338338

339339
bool MainSolver::trackPartitions() const {

0 commit comments

Comments
 (0)