Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Jan 14, 2025
1 parent b75d2a7 commit 96c176a
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/smt/check_models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,28 @@ void getTheoriesOf(Env& env, const Node& n, std::vector<TheoryId>& theories)
std::vector<TNode> visit;
TNode cur;
visit.push_back(n);
do {
do
{
cur = visit.back();
visit.pop_back();
if (visited.find(cur) == visited.end()) {
if (visited.find(cur) == visited.end())
{
visited.insert(cur);
TheoryId tid = env.theoryOf(cur);
if (std::find(theories.begin(), theories.end(), tid)==theories.end())
if (std::find(theories.begin(), theories.end(), tid) == theories.end())
{
theories.push_back(tid);
}
tid = env.theoryOf(cur.getType());
if (std::find(theories.begin(), theories.end(), tid)==theories.end())
if (std::find(theories.begin(), theories.end(), tid) == theories.end())
{
theories.push_back(tid);
}
visit.insert(visit.end(), cur.begin(), cur.end());
}
} while (!visit.empty());
}

CheckModels::CheckModels(Env& e) : EnvObj(e) {}

void CheckModels::checkModel(TheoryModel* m,
Expand Down Expand Up @@ -163,20 +165,21 @@ void CheckModels::checkModel(TheoryModel* m,
ss << "SolverEngine::checkModel(): "
<< "ERRORS SATISFYING ASSERTIONS WITH MODEL";
std::stringstream ssdet;
ssdet << ":" << std::endl << "assertion: " << assertion << std::endl
<< "simplifies to: " << nval << std::endl
<< "expected `true'." << std::endl
<< "Run with `--check-models -v' for additional diagnostics.";
ssdet << ":" << std::endl
<< "assertion: " << assertion << std::endl
<< "simplifies to: " << nval << std::endl
<< "expected `true'." << std::endl
<< "Run with `--check-models -v' for additional diagnostics.";
if (hardFailure)
{
// compute the theories involved
// to ensure minimality, if this is a topmost AND, miniscope
Node nmin = n;
while (nmin.getKind()==Kind::AND)
while (nmin.getKind() == Kind::AND)
{
for (const Node& nc : nmin)
{
if (m->getValue(nc)==nval)
if (m->getValue(nc) == nval)
{
nmin = nc;
break;
Expand All @@ -190,7 +193,7 @@ void CheckModels::checkModel(TheoryModel* m,
ss << " {";
for (TheoryId tid : theories)
{
if (tid!=THEORY_BOOL)
if (tid != THEORY_BOOL)
{
ss << " " << tid;
}
Expand Down

0 comments on commit 96c176a

Please sign in to comment.