15#define TERM_ID(the_id) \
16 const irep_idt ID_smt_##the_id##_term{"smt_" #the_id "_term"};
17#include "smt_terms.def"
33 return !(*
this == other);
56 static const std::regex valid{
"[^\\|]*"};
57 return std::regex_match(
id2string(identifier), valid);
63 std::vector<smt_indext> indices)
72 R
"(Identifiers may not contain | characters.)");
86std::vector<std::reference_wrapper<const smt_indext>>
102 "value must fit in number of bits available.");
104 !
value.is_negative(),
105 "Negative numbers are not supported by bit vector constants.");
111 std::size_t bit_width)
130 std::vector<smt_termt> arguments)
135 std::make_move_iterator(
arguments.begin()),
136 std::make_move_iterator(
arguments.end()),
147std::vector<std::reference_wrapper<const smt_termt>>
156 std::vector<smt_identifier_termt> bound_variables,
162 "A forall term should bind at least one variable.");
172 "Predicate of forall quantifier is expected to have bool sort.");
181std::vector<std::reference_wrapper<const smt_identifier_termt>>
190 std::vector<smt_identifier_termt> bound_variables,
196 "A exists term should bind at least one variable.");
206 "Predicate of exists quantifier is expected to have bool sort.");
215std::vector<std::reference_wrapper<const smt_identifier_termt>>
223template <
typename visitort>
226#define TERM_ID(the_id) \
227 if(id == ID_smt_##the_id##_term) \
228 return visitor.visit(static_cast<const smt_##the_id##_termt &>(term));
231#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.
bool get_bool(const irep_idt &name) const
bool operator==(const irept &other) const
const irept & find(const irep_idt &name) const
const irep_idt & get(const irep_idt &name) const
void set(const irep_idt &name, const irep_idt &value)
const smt_bit_vector_sortt & get_sort() const
smt_bit_vector_constant_termt(const mp_integer &value, smt_bit_vector_sortt)
smt_bool_literal_termt(bool value)
const smt_termt & predicate() 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)
smt_forall_termt(std::vector< smt_identifier_termt > bound_variables, smt_termt predicate)
const smt_termt & predicate() const
std::vector< std::reference_wrapper< const smt_identifier_termt > > bound_variables() const
const smt_identifier_termt & function_identifier() const
smt_function_application_termt(smt_identifier_termt function_identifier, std::vector< smt_termt > arguments)
Unchecked construction of function application terms.
std::vector< std::reference_wrapper< const smt_termt > > arguments() const
Stores identifiers in unescaped and unquoted form.
irep_idt identifier() const
smt_identifier_termt(irep_idt identifier, smt_sortt sort, std::vector< smt_indext > indices={})
Constructs an identifier term with the given identifier and sort.
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.
static irept upcast(smt_sortt sort)
static const smt_sortt & 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
const std::string & id2string(const irep_idt &d)
Ranges: pair of begin and end iterators, which can be initialized from containers,...
ranget< iteratort > make_range(iteratort begin, iteratort end)
Data structure for smt sorts.
void accept(const smt_termt &term, const irep_idt &id, visitort &&visitor)
static bool is_valid_smt_identifier(irep_idt identifier)
#define UNREACHABLE
This should be used to mark dead code.
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.