Go to the documentation of this file.
3 #ifndef CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_TERMS_H
4 #define CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_TERMS_H
42 template <
typename derivedt>
55 template <
typename derivedt>
59 std::is_base_of<irept, derivedt>::value &&
61 "Only irept based classes need to upcast smt_termt to store it.");
64 template <
typename derivedt>
67 return static_cast<irept &&
>(std::move(term));
70 template <
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 void_t<decltype(std::declval<functiont>().
indices())>> : std::true_type
157 template <
class functiont>
158 static std::vector<smt_indext>
159 indices(
const functiont &
function,
const std::false_type &has_indices)
165 template <
class functiont>
166 static std::vector<smt_indext>
167 indices(
const functiont &
function,
const std::true_type &has_indices)
169 return function.indices();
174 template <
class functiont>
175 static std::vector<smt_indext>
indices(
const functiont &
function)
182 std::vector<std::reference_wrapper<const smt_termt>>
arguments()
const;
184 template <
typename functiont>
191 template <
typename... function_type_argument_typest>
193 :
function{std::forward<function_type_argument_typest>(
arguments)...}
197 template <
typename... argument_typest>
202 auto return_sort =
function.return_sort(
arguments...);
206 {std::forward<argument_typest>(
arguments)...}};
209 template <
typename... argument_typest>
213 const auto validation_errors =
function.validation_errors(
arguments...);
214 if(!validation_errors.empty())
216 auto return_sort =
function.return_sort(
arguments...);
220 {std::forward<argument_typest>(
arguments)...}}};
231 std::vector<std::reference_wrapper<const smt_identifier_termt>>
242 std::vector<std::reference_wrapper<const smt_identifier_termt>>
250 #define TERM_ID(the_id) virtual void visit(const smt_##the_id##_termt &) = 0;
251 #include "smt_terms.def"
255 #endif // CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_TERMS_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
static std::vector< smt_indext > indices(const functiont &function)
Returns function.indices if functiont has an indices member function or returns an empty collection o...
factoryt(function_type_argument_typest &&... arguments) noexcept
Holds either a valid parsed response or response sub-tree of type.
const smt_identifier_termt & function_identifier() const
static std::vector< smt_indext > indices(const functiont &function, const std::false_type &has_indices)
Overload for when functiont does not have indices.
Stores identifiers in unescaped and unquoted form.
smt_identifier_termt(irep_idt identifier, smt_sortt sort, std::vector< smt_indext > indices={})
Constructs an identifier term with the given identifier and sort.
smt_function_application_termt(smt_identifier_termt function_identifier, std::vector< smt_termt > arguments)
Unchecked construction of function application terms.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
smt_forall_termt(std::vector< smt_identifier_termt > bound_variables, smt_termt predicate)
bool operator==(const smt_termt &) const
Class for adding the ability to up and down cast smt_sortt to and from irept.
smt_bit_vector_constant_termt(const mp_integer &value, smt_bit_vector_sortt)
const smt_termt & predicate() const
bool operator!=(const smt_termt &) const
std::vector< std::reference_wrapper< const smt_indext > > indices() const
void accept(smt_term_const_downcast_visitort &) const
response_or_errort< smt_termt > validation(argument_typest &&... arguments) const
static irept upcast(smt_termt term)
irep_idt identifier() const
const smt_sortt & get_sort() const
std::vector< std::reference_wrapper< const smt_identifier_termt > > bound_variables() const
smt_exists_termt(std::vector< smt_identifier_termt > bound_variables, smt_termt predicate)
const smt_termt & predicate() const
static const smt_termt & downcast(const irept &)
Class for adding the ability to up and down cast smt_indext to and from irept.
smt_bool_literal_termt(bool value)
Class for adding the ability to up and down cast smt_termt to and from irept.
smt_function_application_termt operator()(argument_typest &&... arguments) const
const smt_bit_vector_sortt & get_sort() const
typename detail::make_voidt< typest... >::type void_t
There are a large number of kinds of tree structured or tree-like data in CPROVER.
std::vector< std::reference_wrapper< const smt_termt > > arguments() const
static std::vector< smt_indext > indices(const functiont &function, const std::true_type &has_indices)
Overload for when functiont has indices member function.
std::vector< std::reference_wrapper< const smt_identifier_termt > > bound_variables() const