CBMC
smt_is_dynamic_object.cpp
Go to the documentation of this file.
1 // Author: Diffblue Ltd.
2 
4 
5 #include <util/config.h>
6 
8 
11 {
13  smt_identifier_termt{"is_dynamic_object", smt_bool_sortt{}},
15 }
16 
19  make_application{smt_command_functiont{declaration}}
20 {
21 }
22 
24  std::size_t unique_id,
25  bool is_dynamic_object) const
26 {
27  const auto id_sort =
28  declaration.parameter_sorts().at(0).get().cast<smt_bit_vector_sortt>();
29  INVARIANT(id_sort, "Object identifiers are expected to have bit vector sort");
30  const auto bit_vector_of_id =
31  smt_bit_vector_constant_termt{unique_id, *id_sort};
33  make_application(std::vector<smt_termt>{bit_vector_of_id}),
34  smt_bool_literal_termt{is_dynamic_object})};
35 }
configt config
Definition: config.cpp:25
struct configt::bv_encodingt bv_encoding
A function generated from a command.
Definition: smt_commands.h:147
static const smt_function_application_termt::factoryt< equalt > equal
std::vector< std::reference_wrapper< const smt_sortt > > parameter_sorts() const
Stores identifiers in unescaped and unquoted form.
Definition: smt_terms.h:93
static smt_declare_function_commandt make_is_dynamic_object_function_declaration()
std::size_t object_bits
Definition: config.h:352
make_applicationt make_application
smt_declare_function_commandt declaration
The command for declaring the is_dynamic_object function.
smt_commandt make_definition(std::size_t unique_id, bool is_dynamic_object) const
Makes the command to define the resulting is_dynamic_object status for calls to the is_dynamic_object...