summaryrefslogtreecommitdiff
path: root/src/expr/node_algorithm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/node_algorithm.h')
-rw-r--r--src/expr/node_algorithm.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/expr/node_algorithm.h b/src/expr/node_algorithm.h
index 7b6dd4f8c..f5d9f6516 100644
--- a/src/expr/node_algorithm.h
+++ b/src/expr/node_algorithm.h
@@ -105,6 +105,20 @@ bool hasClosure(Node n);
bool getFreeVariables(TNode n,
std::unordered_set<Node, NodeHashFunction>& fvs,
bool computeFv = true);
+/**
+ * Get the free variables in n, that is, the subterms of n of kind
+ * BOUND_VARIABLE that are not bound in n or occur in scope, adds these to fvs.
+ * @param n The node under investigation
+ * @param fvs The set which free variables are added to
+ * @param scope The scope we are considering.
+ * @param computeFv If this flag is false, then we only return true/false and
+ * do not add to fvs.
+ * @return true iff this node contains a free variable.
+ */
+bool getFreeVariablesScope(TNode n,
+ std::unordered_set<Node, NodeHashFunction>& fvs,
+ std::unordered_set<TNode, TNodeHashFunction>& scope,
+ bool computeFv = true);
/**
* Get all variables in n.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback