summaryrefslogtreecommitdiff
path: root/src/prop/cnf_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/prop/cnf_stream.h')
-rw-r--r--src/prop/cnf_stream.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/prop/cnf_stream.h b/src/prop/cnf_stream.h
index fd0ab6291..ecb0fd2fb 100644
--- a/src/prop/cnf_stream.h
+++ b/src/prop/cnf_stream.h
@@ -3,7 +3,7 @@
** \verbatim
** Original author: taking
** Major contributors: mdeters, dejan
- ** Minor contributors (to current version): cconway
+ ** Minor contributors (to current version): barrett, cconway
** This file is part of the CVC4 prototype.
** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
** Courant Institute of Mathematical Sciences
@@ -77,6 +77,24 @@ protected:
/** Top level nodes that we translated */
std::vector<TNode> d_translationTrail;
+ /**
+ * How many literals were already mapped at the top-level when we
+ * tried to convertAndAssert() something. This
+ * achieves early detection of units and leads to fewer
+ * clauses. It's motivated by the following pattern:
+ *
+ * ASSERT BIG FORMULA => x
+ * (and then later...)
+ * ASSERT BIG FORMULA
+ *
+ * With the first assert, BIG FORMULA is clausified, and a literal
+ * is assigned for the top level so that the final clause for the
+ * implication is "lit => x". But without "fortunate literal
+ * detection," when BIG FORMULA is later asserted, it is clausified
+ * separately, and "lit" is never asserted as a unit clause.
+ */
+ KEEP_STATISTIC(IntStat, d_fortunateLiterals, "prop::CnfStream::fortunateLiterals", 0);
+
/** Remove nots from the node */
TNode stripNot(TNode node) {
while (node.getKind() == kind::NOT) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback