3#ifndef CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_TERMS_H
4#define CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_TERMS_H
42 template <
typename derivedt>
55template <
typename derivedt>
59 std::is_base_of<irept, derivedt>::value &&
60 std::is_base_of<storert<derivedt>,
derivedt>::value,
61 "Only irept based classes need to upcast smt_termt to store it.");
64template <
typename derivedt>
67 return static_cast<irept &&
>(std::move(term));
70template <
typename derivedt>
73 return static_cast<const smt_termt &
>(irep);
111 std::vector<smt_indext>
indices = {});
113 std::vector<std::reference_wrapper<const smt_indext>>
indices()
const;
144 template <
class functiont,
class =
void>
149 template <
class functiont>
152 std::
void_t<decltype(std::declval<functiont>().indices())>> : std::true_type
158 template <
class functiont>
162 return function.indices();
169 std::vector<std::reference_wrapper<const smt_termt>>
arguments()
const;
171 template <
typename functiont>
193 {std::forward<argument_typest>(
arguments)...}};
201 if(!validation_errors.empty())
207 {std::forward<argument_typest>(
arguments)...}}};
218 std::vector<std::reference_wrapper<const smt_identifier_termt>>
229 std::vector<std::reference_wrapper<const smt_identifier_termt>>
237#define TERM_ID(the_id) virtual void visit(const smt_##the_id##_termt &) = 0;
238#include "smt_terms.def"
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
There are a large number of kinds of tree structured or tree-like data in CPROVER.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
const smt_bit_vector_sortt & get_sort() const
const smt_termt & predicate() const
std::vector< std::reference_wrapper< const smt_identifier_termt > > bound_variables() const
const smt_termt & predicate() const
std::vector< std::reference_wrapper< const smt_identifier_termt > > bound_variables() const
factoryt(function_type_argument_typest &&...arguments) noexcept
response_or_errort< smt_termt > validation(argument_typest &&...arguments) const
smt_function_application_termt operator()(argument_typest &&...arguments) const
const smt_identifier_termt & function_identifier() const
static std::vector< smt_indext > indices(const functiont &function)
Returns function.indices() if functiont has an indices member function or returns an empty collection...
std::vector< std::reference_wrapper< const smt_termt > > arguments() const
Stores identifiers in unescaped and unquoted form.
irep_idt identifier() const
std::vector< std::reference_wrapper< const smt_indext > > indices() const
Class for adding the ability to up and down cast smt_indext to and from irept.
Class for adding the ability to up and down cast smt_sortt to and from irept.
Class for adding the ability to up and down cast smt_termt to and from irept.
static irept upcast(smt_termt term)
static const smt_termt & downcast(const irept &)
const smt_sortt & get_sort() const
bool operator==(const smt_termt &) const
void accept(smt_term_const_downcast_visitort &) const
bool operator!=(const smt_termt &) const
Data structure for smt sorts.