Skip to content

Commit 906ed9a

Browse files
author
Daniel Kroening
authored
Merge pull request #111 from tautschnig/dimacs-output
Include _Bool variables in dimacs output, cleanup
2 parents 4fc8ff5 + 23d6aa9 commit 906ed9a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/cbmc/cbmc_dimacs.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ bool cbmc_dimacst::write_dimacs(std::ostream &out)
6464
s_it++)
6565
{
6666
if(s_it->second.is_constant())
67-
out << "c " << (s_it->second.is_true()?"TRUE":"FALSE") << " "
68-
<< s_it->first << "\n";
67+
out << "c " << s_it->first << " "
68+
<< (s_it->second.is_true()?"TRUE":"FALSE") << "\n";
6969
else
70-
out << "c " << s_it->second.dimacs() << " "
71-
<< s_it->first << "\n";
70+
out << "c " << s_it->first << " "
71+
<< s_it->second.dimacs() << "\n";
7272
}
7373

7474
// dump mapping for selected bit-vectors
@@ -80,7 +80,8 @@ bool cbmc_dimacst::write_dimacs(std::ostream &out)
8080
m_it++)
8181
{
8282
if(m_it->second.bvtype==IS_SIGNED ||
83-
m_it->second.bvtype==IS_UNSIGNED)
83+
m_it->second.bvtype==IS_UNSIGNED ||
84+
m_it->second.bvtype==IS_C_BOOL)
8485
{
8586
const boolbv_mapt::literal_mapt &literal_map=m_it->second.literal_map;
8687
out << "c " << m_it->first;

0 commit comments

Comments
 (0)