summaryrefslogtreecommitdiff
path: root/src/smt/ite_removal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/smt/ite_removal.h')
-rw-r--r--src/smt/ite_removal.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/smt/ite_removal.h b/src/smt/ite_removal.h
index c0a46c316..e629c93d7 100644
--- a/src/smt/ite_removal.h
+++ b/src/smt/ite_removal.h
@@ -35,15 +35,15 @@ namespace theory {
typedef std::hash_map<Node, unsigned, NodeHashFunction> IteSkolemMap;
-class RemoveITE {
- typedef context::CDInsertHashMap< std::pair<Node, bool>, Node, PairHashFunction<Node, bool, NodeHashFunction, BoolHashFunction> > ITECache;
+class RemoveTermFormulas {
+ typedef context::CDInsertHashMap< std::pair<Node, int>, Node, PairHashFunction<Node, int, NodeHashFunction, BoolHashFunction> > ITECache;
ITECache d_iteCache;
-
+ static inline int cacheVal( bool inQuant, bool inTerm ) { return (inQuant ? 1 : 0) + 2*(inTerm ? 1 : 0); }
public:
- RemoveITE(context::UserContext* u);
- ~RemoveITE();
+ RemoveTermFormulas(context::UserContext* u);
+ ~RemoveTermFormulas();
/**
* Removes the ITE nodes by introducing skolem variables. All
@@ -65,13 +65,13 @@ public:
* ite created in conjunction with that skolem variable.
*/
Node run(TNode node, std::vector<Node>& additionalAssertions,
- IteSkolemMap& iteSkolemMap, bool inQuant);
+ IteSkolemMap& iteSkolemMap, bool inQuant, bool inTerm);
/**
* Substitute under node using pre-existing cache. Do not remove
* any ITEs not seen during previous runs.
*/
- Node replace(TNode node, bool inQuant = false) const;
+ Node replace(TNode node, bool inQuant = false, bool inTerm = false) const;
/** Returns true if e contains a term ite. */
bool containsTermITE(TNode e) const;
@@ -82,7 +82,7 @@ public:
/** Garbage collects non-context dependent data-structures. */
void garbageCollect();
- /** Return the RemoveITE's containsVisitor. */
+ /** Return the RemoveTermFormulas's containsVisitor. */
theory::ContainsTermITEVisitor* getContainsVisitor();
private:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback