summaryrefslogtreecommitdiff
path: root/src/prop
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-03-05 08:26:37 +0000
committerMorgan Deters <mdeters@gmail.com>2010-03-05 08:26:37 +0000
commit88b52c971b43248e6ceacf1c8140a06427d0418d (patch)
tree4ee443c898a858fcdd658f3f043e4180eddd8784 /src/prop
parent29cc307cdf2c42bebf4f5615874a864783f47fd0 (diff)
* public/private code untangled (smt/smt_engine.h no longer #includes
expr/node.h). This removes the warnings we had during compilation, and heads off a number of potential linking errors due to improper inlining of private (library-only) stuff in client (out-of-library) code. * "configure" now takes some options as part of a "bare-option" build type (e.g., "./configure debug-coverage" or "./configure production-muzzle"). * split cdo.h, cdlist.h, cdmap.h, and cdset.h from context.h * split cdlist_black unit test from context_black * implement CDMap<>. * give ExprManagers ownership of the context (and have SmtEngine share that one) * fix main driver to properly report file-not-found * fix MemoryMappedInputBuffer class to report reasons for "errno"-returned system errors * src/expr/attribute.h: context-dependent attribute kinds now supported * test/unit/expr/node_white.h: context-dependent attribute tests * src/prop/cnf_conversion.h and associated parts of src/util/options.h and src/main/getopt.cpp: obsolete command-line option, removed. * src/util/Assert.h: assertions are now somewhat more useful (in debug builds, anyway) during stack unwinding. * test/unit/theory/theory_black.h: test context-dependent behavior of registerTerm() attribute for theories * src/expr/node_builder.h: formatting, fixes for arithmetic convenience node builders, check memory allocations * test/unit/expr/node_builder_black.h: add tessts for addition, subtraction, unary minus, and multiplication convenience node builders * src/expr/attribute.h: more comments * (various) code formatting, comment cleanup, added throws specifier to some destructors * contrib/code-checker: prototype perl script to test (some) code policy * contrib/indent-settings: command line for GNU indent to indent using CVC4 style (sort of; this is a work in progress) * COPYING: legal stuff * DESIGN_QUESTIONS: obsolete, removed
Diffstat (limited to 'src/prop')
-rw-r--r--src/prop/cnf_conversion.h51
-rw-r--r--src/prop/cnf_stream.cpp8
2 files changed, 4 insertions, 55 deletions
diff --git a/src/prop/cnf_conversion.h b/src/prop/cnf_conversion.h
deleted file mode 100644
index d66e721db..000000000
--- a/src/prop/cnf_conversion.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************* */
-/** cnf_conversion.h
- ** Original author: taking
- ** Major contributors: none
- ** Minor contributors (to current version): dejan, mdeters
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
- ** See the file COPYING in the top-level source directory for licensing
- ** information.
- **
- ** A type for describing possible CNF conversions.
- **/
-
-#include "cvc4_private.h"
-
-#ifndef __CVC4__CNF_CONVERSION_H
-#define __CVC4__CNF_CONVERSION_H
-
-namespace CVC4 {
-
-enum CnfConversion {
- /** TODO: explanation of DIRECT_EXPONENTIAL (is this implemented?) */
- CNF_DIRECT_EXPONENTIAL = 0,
- /** Explanation of CNF_VAR_INTRODUCTION */
- CNF_VAR_INTRODUCTION = 1
-};
-
-inline std::ostream& operator<<(std::ostream&, CVC4::CnfConversion) CVC4_PUBLIC;
-
-inline std::ostream& operator<<(std::ostream& out, CVC4::CnfConversion c) {
- using namespace CVC4;
-
- switch(c) {
- case CNF_DIRECT_EXPONENTIAL:
- out << "CNF_DIRECT_EXPONENTIAL";
- break;
- case CNF_VAR_INTRODUCTION:
- out << "CNF_VAR_INTRODUCTION";
- break;
- default:
- out << "UNKNOWN-CONVERTER!" << int(c);
- }
-
- return out;
-}
-
-}/* CVC4 namespace */
-
-#endif /* __CVC4__CNF_CONVERSION_H */
diff --git a/src/prop/cnf_stream.cpp b/src/prop/cnf_stream.cpp
index 6e3b6ae2f..612b00bcf 100644
--- a/src/prop/cnf_stream.cpp
+++ b/src/prop/cnf_stream.cpp
@@ -320,21 +320,21 @@ SatLiteral TseitinCnfStream::toCNF(const TNode& node) {
void TseitinCnfStream::convertAndAssert(const TNode& node) {
Debug("cnf") << "convertAndAssert(" << node << ")" << endl;
// If the node is a conjuntion, we handle each conjunct separatelu
- if (node.getKind() == AND) {
+ if(node.getKind() == AND) {
TNode::const_iterator conjunct = node.begin();
TNode::const_iterator node_end = node.end();
- while (conjunct != node_end) {
+ while(conjunct != node_end) {
convertAndAssert(*conjunct);
++ conjunct;
}
return;
}
// If the node is a disjunction, we construct a clause and assert it
- if (node.getKind() == OR) {
+ if(node.getKind() == OR) {
int nChildren = node.getNumChildren();
SatClause clause(nChildren);
TNode::const_iterator disjunct = node.begin();
- for (int i = 0; i < nChildren; ++ disjunct, ++ i) {
+ for(int i = 0; i < nChildren; ++ disjunct, ++ i) {
clause[i] = toCNF(*disjunct);
}
assertClause(clause);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback