Skip to content

Commit 7dbb203

Browse files
author
Daniel Kroening
authored
Merge pull request #1040 from tautschnig/fix-1032
Add empty() to grapht as it implements size()
2 parents dd8ed06 + 7039018 commit 7dbb203

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/solvers/sat/satcheck_minisat2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ propt::resultt satcheck_minisat2_baset<T>::prop_solve()
155155
{
156156
messaget::status() <<
157157
"SAT checker: instance is SATISFIABLE" << eom;
158-
assert(!solver->model.empty());
158+
CHECK_RETURN(solver->model.size()>0);
159159
status=statust::SAT;
160160
return resultt::P_SATISFIABLE;
161161
}

src/util/graph.h

+5
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ class grapht
150150
return nodes.size();
151151
}
152152

153+
bool empty() const
154+
{
155+
return nodes.empty();
156+
}
157+
153158
const edgest &in(node_indext n) const
154159
{
155160
return nodes[n].in;

0 commit comments

Comments
 (0)