summaryrefslogtreecommitdiff
path: root/src/theory/arith/arith_utilities.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/arith/arith_utilities.h')
-rw-r--r--src/theory/arith/arith_utilities.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/theory/arith/arith_utilities.h b/src/theory/arith/arith_utilities.h
index 2053379d9..59b4e9bef 100644
--- a/src/theory/arith/arith_utilities.h
+++ b/src/theory/arith/arith_utilities.h
@@ -224,6 +224,18 @@ struct RightHandRationalLT
}
};
+inline Node negateConjunctionAsClause(TNode conjunction){
+ Assert(conjunction.getKind() == kind::AND);
+ NodeBuilder<> orBuilder(kind::OR);
+
+ for(TNode::iterator i = conjunction.begin(), end=conjunction.end(); i != end; ++i){
+ TNode child = *i;
+ Node negatedChild = NodeBuilder<1>(kind::NOT)<<(child);
+ orBuilder << negatedChild;
+ }
+ return orBuilder;
+}
+
}; /* namesapce arith */
}; /* namespace theory */
}; /* namespace CVC4 */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback