CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
smt_object_size.cpp
Go to the documentation of this file.
1// Author: Diffblue Ltd.
2
3#include "smt_object_size.h"
4
5#include <util/c_types.h>
6#include <util/config.h>
7
11
19
22 make_application{smt_command_functiont{declaration}}
23{
24}
25
27 const std::size_t unique_id,
28 smt_termt size) const
29{
30 const auto id_sort =
32 INVARIANT(id_sort, "Object identifiers are expected to have bit vector sort");
33 const auto bit_vector_of_id =
36 make_application(std::vector<smt_termt>{bit_vector_of_id}),
37 std::move(size))};
38}
configt config
Definition config.cpp:25
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
struct configt::bv_encodingt bv_encoding
A function generated from a command.
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_sortt convert_type_to_smt_sort(const bool_typet &type)
static smt_declare_function_commandt make_object_size_function_declaration()
Data structure for smt sorts.
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
Definition invariant.h:423
make_applicationt make_application
smt_commandt make_definition(std::size_t unique_id, smt_termt size) const
Makes the command to define the resulting size of calling the object size function with unique_id.
smt_declare_function_commandt declaration
The command for declaring the object size function.
#define size_type
Definition unistd.c:186