summaryrefslogtreecommitdiff
path: root/src/prop
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-07-22 21:55:28 +0000
committerMorgan Deters <mdeters@gmail.com>2010-07-22 21:55:28 +0000
commit62ec86743289b26241d69b1701d4b3f547ee2bed (patch)
treefc4d460a9326eaae1e481cf0f48ff6c15738150e /src/prop
parent27a24d7f553a0b3981e18418a67edb3c4bfa52e9 (diff)
incorporate a fix from smtcomp2010 version for handling CNF of (= bool bool); also make theoryOf(= t1 t2) return theoryOf(t1.getType()), rather than theoryOf(t1), as the latter gives different results for (= (geq x1 x2) (leq x2 x1)) and (= a (leq x2 x1)), which is strange and causes problems. should discuss at tuesday meeting. resolves bug 187.
Diffstat (limited to 'src/prop')
-rw-r--r--src/prop/cnf_stream.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/prop/cnf_stream.cpp b/src/prop/cnf_stream.cpp
index 9136a73c3..e95322348 100644
--- a/src/prop/cnf_stream.cpp
+++ b/src/prop/cnf_stream.cpp
@@ -364,6 +364,13 @@ SatLiteral TseitinCnfStream::toCNF(TNode node, bool negated) {
case AND:
nodeLit = handleAnd(node);
break;
+ case EQUAL:
+ if(node[0].getType().isBoolean() && node[1].getType().isBoolean()) {
+ nodeLit = handleIff(node[0].iffNode(node[1]));
+ } else {
+ nodeLit = convertAtom(node);
+ }
+ break;
default:
{
//TODO make sure this does not contain any boolean substructure
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback