summaryrefslogtreecommitdiff
path: root/src/expr/node_algorithm.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-02-03 16:57:54 -0600
committerGitHub <noreply@github.com>2020-02-03 16:57:54 -0600
commit35cf275a068f28c518acaab456ece16e19b6959c (patch)
tree71c8aecf13f5006db21c4058b8925f158a82bca9 /src/expr/node_algorithm.h
parent1c55227e6ef30149e6a008fdea56573f67244a61 (diff)
Utility function for getting component types (#3703)
Diffstat (limited to 'src/expr/node_algorithm.h')
-rw-r--r--src/expr/node_algorithm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/expr/node_algorithm.h b/src/expr/node_algorithm.h
index e5a21d565..03d77a2f9 100644
--- a/src/expr/node_algorithm.h
+++ b/src/expr/node_algorithm.h
@@ -151,6 +151,16 @@ Node substituteCaptureAvoiding(TNode n,
std::vector<Node>& src,
std::vector<Node>& dest);
+/**
+ * Get component types in type t. This adds all types that are subterms of t
+ * when viewed as a term. For example, if t is (Array T1 T2), then
+ * (Array T1 T2), T1 and T2 are component types of t.
+ * @param t The type node under investigation
+ * @param types The set which component types are added to.
+ */
+void getComponentTypes(
+ TypeNode t, std::unordered_set<TypeNode, TypeNodeHashFunction>& types);
+
} // namespace expr
} // namespace CVC4
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback