Skip to content

Commit e35a5a6

Browse files
committed
Rename define_object_sizes to define_object_properties
Because this now covers both the size and the definition of whether the object is dynamic or not.
1 parent 49a5eae commit e35a5a6

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

src/solvers/smt2_incremental/smt2_incremental_decision_procedure.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,16 +549,16 @@ static decision_proceduret::resultt lookup_decision_procedure_result(
549549
UNREACHABLE;
550550
}
551551

552-
void smt2_incremental_decision_proceduret::define_object_sizes()
552+
void smt2_incremental_decision_proceduret::define_object_properties()
553553
{
554-
object_size_defined.resize(object_map.size());
554+
object_properties_defined.resize(object_map.size());
555555
for(const auto &key_value : object_map)
556556
{
557557
const decision_procedure_objectt &object = key_value.second;
558-
if(object_size_defined[object.unique_id])
558+
if(object_properties_defined[object.unique_id])
559559
continue;
560560
else
561-
object_size_defined[object.unique_id] = true;
561+
object_properties_defined[object.unique_id] = true;
562562
define_dependent_functions(object.size);
563563
solver_process->send(object_size_function.make_definition(
564564
object.unique_id, convert_expr_to_smt(object.size)));
@@ -570,7 +570,7 @@ void smt2_incremental_decision_proceduret::define_object_sizes()
570570
decision_proceduret::resultt smt2_incremental_decision_proceduret::dec_solve()
571571
{
572572
++number_of_solver_calls;
573-
define_object_sizes();
573+
define_object_properties();
574574
const smt_responset result = get_response_to_command(
575575
*solver_process, smt_check_sat_commandt{}, identifier_table);
576576
if(const auto check_sat_response = result.cast<smt_check_sat_responset>())

src/solvers/smt2_incremental/smt2_incremental_decision_procedure.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ class smt2_incremental_decision_proceduret final
9393
/// \note This function is non-const because it mutates the object_map.
9494
smt_termt convert_expr_to_smt(const exprt &expr);
9595
void define_index_identifiers(const exprt &expr);
96-
/// Sends the solver the definitions of the object sizes.
97-
void define_object_sizes();
96+
/// Sends the solver the definitions of the object sizes and dynamic memory
97+
/// statuses.
98+
void define_object_properties();
9899

99100
/// Namespace for looking up the expressions which symbol_exprts relate to.
100101
/// This includes the symbols defined outside of the decision procedure but
@@ -150,12 +151,12 @@ class smt2_incremental_decision_proceduret final
150151
/// This map is used to track object related state. See documentation in
151152
/// object_tracking.h for details.
152153
smt_object_mapt object_map;
153-
/// The size of each object is separately defined as a pre-solving step.
154-
/// `object_size_defined[object ID]` is set to true for objects where the size
155-
/// has been defined. This is used to avoid defining the size of the same
156-
/// object multiple times in the case where multiple rounds of solving are
157-
/// carried out.
158-
std::vector<bool> object_size_defined;
154+
/// The size of each object and the dynamic object stus is separately defined
155+
/// as a pre-solving step. `object_properties_defined[object ID]` is set to
156+
/// true for objects where the size has been defined. This is used to avoid
157+
/// defining the size of the same object multiple times in the case where
158+
/// multiple rounds of solving are carried out.
159+
std::vector<bool> object_properties_defined;
159160
/// Implementation of the SMT formula for the object size function. This is
160161
/// stateful because it depends on the configuration of the number of object
161162
/// bits and how many bits wide the size type is configured to be.

0 commit comments

Comments
 (0)