Skip to content

Commit 8da66da

Browse files
committed
Replace containment -> inclusion throughout
1 parent 60d683f commit 8da66da

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/goto-instrument/contracts/contracts.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ void code_contractst::instrument_assign_statement(
637637
"The first instruction of instrument_assign_statement should always be"
638638
" an assignment");
639639

640-
add_containment_check(
640+
add_inclusion_check(
641641
program, assigns_clause, instruction_it, instruction_it->assign_lhs());
642642
}
643643

@@ -678,7 +678,7 @@ void code_contractst::instrument_call_statement(
678678
}
679679
else if(callee_name == "free")
680680
{
681-
add_containment_check(
681+
add_inclusion_check(
682682
body,
683683
assigns,
684684
instruction_it,
@@ -846,12 +846,12 @@ void code_contractst::check_frame_conditions(
846846
{
847847
const exprt &havoc_argument = dereference_exprt(
848848
to_typecast_expr(instruction_it->get_other().operands().front()).op());
849-
add_containment_check(body, assigns, instruction_it, havoc_argument);
849+
add_inclusion_check(body, assigns, instruction_it, havoc_argument);
850850
}
851851
}
852852
}
853853

854-
void code_contractst::add_containment_check(
854+
void code_contractst::add_inclusion_check(
855855
goto_programt &program,
856856
const assigns_clauset &assigns,
857857
goto_programt::instructionst::iterator &instruction_it,

src/goto-instrument/contracts/contracts.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class code_contractst
134134

135135
/// Inserts an assertion into the goto program to ensure that
136136
/// an expression is within the assignable memory frame.
137-
void add_containment_check(
137+
void add_inclusion_check(
138138
goto_programt &,
139139
const assigns_clauset &,
140140
goto_programt::instructionst::iterator &,
@@ -144,19 +144,17 @@ class code_contractst
144144
/// a goto statement that jumps back.
145145
bool check_for_looped_mallocs(const goto_programt &program);
146146

147-
/// Inserts an assertion statement into program before the assignment
147+
/// Inserts an assertion into program immediately before the assignment
148148
/// instruction_it, to ensure that the left-hand-side of the assignment
149-
/// aliases some expression in original_references, unless it is contained
150-
/// in freely assignable set.
149+
/// is "included" in the (conditional address ranges in the) write set.
151150
void instrument_assign_statement(
152151
goto_programt::instructionst::iterator &,
153152
goto_programt &,
154153
assigns_clauset &);
155154

156-
/// Inserts an assertion statement into program before the function call at
157-
/// ins_it, to ensure that any memory which may be written by the call is
158-
/// aliased by some expression in assigns_references, unless it is contained
159-
/// in freely assignable set.
155+
/// Inserts an assertion into program immediately before the function call at
156+
/// instruction_it, to ensure that all memory locations written to by the
157+
// callee are "included" in the (conditional address ranges in the) write set.
160158
void instrument_call_statement(
161159
goto_programt::instructionst::iterator &,
162160
const irep_idt &,

0 commit comments

Comments
 (0)