Skip to content

Commit 9f894ae

Browse files
authored
Merge pull request #7619 from tautschnig/features/bvt-output
Add bvt output helper
2 parents 79df541 + 8df4c9e commit 9f894ae

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/solvers/prop/literal.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,14 @@ std::ostream &operator << (std::ostream &out, literalt l)
2020
else
2121
return out << (l.sign()?"-":"") << l.var_no();
2222
}
23+
24+
std::ostream &operator<<(std::ostream &out, const bvt &bv)
25+
{
26+
for(auto it = bv.begin(); it != bv.end(); ++it)
27+
{
28+
out << *it;
29+
if(std::next(it) != bv.end())
30+
out << ' ';
31+
}
32+
return out;
33+
}

src/solvers/prop/literal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,6 @@ inline bool is_true (const literalt &l) { return (l.is_true()); }
200200
// bit-vectors
201201
typedef std::vector<literalt> bvt;
202202

203+
std::ostream &operator<<(std::ostream &out, const bvt &bv);
204+
203205
#endif // CPROVER_SOLVERS_PROP_LITERAL_H

0 commit comments

Comments
 (0)