diff options
author | Clark Barrett <barrett@cs.nyu.edu> | 2011-07-11 19:53:44 +0000 |
---|---|---|
committer | Clark Barrett <barrett@cs.nyu.edu> | 2011-07-11 19:53:44 +0000 |
commit | f65c5c4cbc59527dc0c9c57283a373ef501792c5 (patch) | |
tree | 4a5b270413a72260d404c431a27c2f01209fae21 /src/prop | |
parent | 7515ee9cda0925721c4fa7e1ba9ef3b25dc5e0d0 (diff) |
Clark's work on array theory - can now solve all QF_AX problems
Diffstat (limited to 'src/prop')
-rw-r--r-- | src/prop/cnf_stream.h | 16 | ||||
-rw-r--r-- | src/prop/prop_engine.cpp | 4 | ||||
-rw-r--r-- | src/prop/prop_engine.h | 4 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/prop/cnf_stream.h b/src/prop/cnf_stream.h index ef75e635b..e53b46d9b 100644 --- a/src/prop/cnf_stream.h +++ b/src/prop/cnf_stream.h @@ -147,14 +147,6 @@ protected: bool isTranslated(TNode node) const; /** - * Returns true if the node has an assigned literal (it might not be translated). - * Caches the pair of the node and the literal corresponding to the - * translation. - * @param node the node - */ - bool hasLiteral(TNode node) const; - - /** * Acquires a new variable from the SAT solver to represent the node * and inserts the necessary data it into the mapping tables. * @param node a formula @@ -208,6 +200,14 @@ public: TNode getNode(const SatLiteral& literal); /** + * Returns true if the node has an assigned literal (it might not be translated). + * Caches the pair of the node and the literal corresponding to the + * translation. + * @param node the node + */ + bool hasLiteral(TNode node) const; + + /** * Returns the literal that represents the given node in the SAT CNF * representation. * @param node [Presumably there are some constraints on the kind of diff --git a/src/prop/prop_engine.cpp b/src/prop/prop_engine.cpp index 4c9b66020..3aa014782 100644 --- a/src/prop/prop_engine.cpp +++ b/src/prop/prop_engine.cpp @@ -170,6 +170,10 @@ Node PropEngine::getValue(TNode node) { } } +bool PropEngine::isSatLiteral(TNode node) { + return d_cnfStream->hasLiteral(node); +} + bool PropEngine::hasValue(TNode node, bool& value) { Assert(node.getType().isBoolean()); SatLiteral lit = d_cnfStream->getLiteral(node); diff --git a/src/prop/prop_engine.h b/src/prop/prop_engine.h index f44ad16f7..f6e66bef1 100644 --- a/src/prop/prop_engine.h +++ b/src/prop/prop_engine.h @@ -114,6 +114,10 @@ public: */ Node getValue(TNode node); + /* + * Return true if node has an associated SAT literal + */ + bool isSatLiteral(TNode node); /** * Check if the node has a value and return it if yes. */ |