1 /******************************************************************************
2 * Top contributors (to current version):
5 * This file is part of the cvc5 project.
7 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8 * in the top-level source directory and their institutional affiliations.
9 * All rights reserved. See the file COPYING in the top-level source
10 * directory for licensing information.
11 * ****************************************************************************
13 * Variadic trie utility
16 #include "cvc5_private.h"
18 #ifndef CVC5__EXPR__VARIADIC_TRIE_H
19 #define CVC5__EXPR__VARIADIC_TRIE_H
24 #include "expr/node.h"
29 * A trie that stores data at undetermined depth. Storing data at
30 * undetermined depth is in contrast to the NodeTrie (expr/node_trie.h), which
31 * assumes all data is stored at a fixed depth.
33 * Since data can be stored at any depth, we require both a d_children field
39 /** the children of this node */
40 std::map
<Node
, VariadicTrie
> d_children
;
41 /** the data at this node */
44 * Add data with identifier n indexed by i, return true if data is not already
45 * stored at the node indexed by i.
47 bool add(Node n
, const std::vector
<Node
>& i
);
48 /** Is there any data in this trie that is indexed by any subset of is? */
49 bool hasSubset(const std::vector
<Node
>& is
) const;
54 #endif /* CVC5__EXPR__VARIADIC_TRIE_H */