@@ -521,9 +521,8 @@ void dfcc_instrumentt::insert_add_decl_call(
521
521
utils.make_null_check_expr (write_set), target->source_location ()));
522
522
523
523
payload.add (goto_programt::make_function_call (
524
- code_function_callt{
525
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_ADD_DECL].symbol_expr (),
526
- {write_set, address_of_exprt (symbol_expr)}},
524
+ library.write_set_add_decl_call (
525
+ write_set, address_of_exprt (symbol_expr), target->source_location ()),
527
526
target->source_location ()));
528
527
529
528
auto label_instruction =
@@ -569,9 +568,8 @@ void dfcc_instrumentt::insert_record_dead_call(
569
568
utils.make_null_check_expr (write_set), target->source_location ()));
570
569
571
570
payload.add (goto_programt::make_function_call (
572
- code_function_callt{
573
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_RECORD_DEAD].symbol_expr (),
574
- {write_set, address_of_exprt (symbol_expr)}},
571
+ library.write_set_record_dead_call (
572
+ write_set, address_of_exprt (symbol_expr), target->source_location ()),
575
573
target->source_location ()));
576
574
577
575
auto label_instruction =
@@ -716,14 +714,13 @@ void dfcc_instrumentt::instrument_lhs(
716
714
payload.add (goto_programt::make_decl (check_var, lhs_source_location));
717
715
718
716
payload.add (goto_programt::make_function_call (
719
- code_function_callt{
717
+ library. write_set_check_assignment_call (
720
718
check_var,
721
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_CHECK_ASSIGNMENT]
722
- .symbol_expr (),
723
- {write_set,
724
- typecast_exprt::conditional_cast (
725
- address_of_exprt (lhs), pointer_type (empty_typet{})),
726
- utils.make_sizeof_expr (lhs)}},
719
+ write_set,
720
+ typecast_exprt::conditional_cast (
721
+ address_of_exprt (lhs), pointer_type (empty_typet{})),
722
+ utils.make_sizeof_expr (lhs),
723
+ lhs_source_location),
727
724
lhs_source_location));
728
725
729
726
payload.add (
@@ -810,10 +807,8 @@ void dfcc_instrumentt::instrument_assign(
810
807
utils.make_null_check_expr (write_set), target_location));
811
808
812
809
payload.add (goto_programt::make_function_call (
813
- code_function_callt{
814
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_RECORD_DEALLOCATED]
815
- .symbol_expr (),
816
- {write_set, dead_ptr.value ()}},
810
+ library.write_set_record_dead_call (
811
+ write_set, dead_ptr.value (), target_location),
817
812
target_location));
818
813
819
814
auto label_instruction =
@@ -846,10 +841,7 @@ void dfcc_instrumentt::instrument_assign(
846
841
utils.make_null_check_expr (write_set), target_location));
847
842
848
843
payload.add (goto_programt::make_function_call (
849
- code_function_callt{
850
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_ADD_ALLOCATED]
851
- .symbol_expr (),
852
- {write_set, lhs}},
844
+ library.write_set_add_allocated_call (write_set, lhs, target_location),
853
845
target_location));
854
846
855
847
auto label_instruction =
@@ -987,11 +979,8 @@ void dfcc_instrumentt::instrument_deallocate_call(
987
979
const auto &ptr = target->call_arguments ().at (0 );
988
980
989
981
payload.add (goto_programt::make_function_call (
990
- code_function_callt{
991
- check_var,
992
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_CHECK_DEALLOCATE]
993
- .symbol_expr (),
994
- {write_set, ptr}},
982
+ library.write_set_check_deallocate_call (
983
+ check_var, write_set, ptr, target_location),
995
984
target_location));
996
985
997
986
// add property class on assertion source_location
@@ -1005,10 +994,7 @@ void dfcc_instrumentt::instrument_deallocate_call(
1005
994
payload.add (goto_programt::make_dead (check_var, target_location));
1006
995
1007
996
payload.add (goto_programt::make_function_call (
1008
- code_function_callt{
1009
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_RECORD_DEALLOCATED]
1010
- .symbol_expr (),
1011
- {write_set, ptr}},
997
+ library.write_set_record_deallocated_call (write_set, ptr, target_location),
1012
998
target_location));
1013
999
1014
1000
auto label_instruction =
@@ -1099,13 +1085,11 @@ void dfcc_instrumentt::instrument_other(
1099
1085
1100
1086
const auto &dest = target->get_other ().operands ().at (0 );
1101
1087
1102
- symbolt &check_fun =
1103
- library.dfcc_fun_symbol
1104
- [is_array_set ? dfcc_funt::WRITE_SET_CHECK_ARRAY_SET
1105
- : dfcc_funt::WRITE_SET_CHECK_ARRAY_COPY];
1106
1088
payload.add (goto_programt::make_function_call (
1107
- code_function_callt{
1108
- check_var, check_fun.symbol_expr (), {write_set, dest}},
1089
+ is_array_set ? library.write_set_check_array_set_call (
1090
+ check_var, write_set, dest, target_location)
1091
+ : library.write_set_check_array_copy_call (
1092
+ check_var, write_set, dest, target_location),
1109
1093
target_location));
1110
1094
1111
1095
// add property class on assertion source_location
@@ -1162,11 +1146,8 @@ void dfcc_instrumentt::instrument_other(
1162
1146
const auto &src = target->get_other ().operands ().at (1 );
1163
1147
1164
1148
payload.add (goto_programt::make_function_call (
1165
- code_function_callt{
1166
- check_var,
1167
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_CHECK_ARRAY_REPLACE]
1168
- .symbol_expr (),
1169
- {write_set, dest, src}},
1149
+ library.write_set_check_array_replace_call (
1150
+ check_var, write_set, dest, src, target_location),
1170
1151
target_location));
1171
1152
1172
1153
// add property class on assertion source_location
@@ -1217,11 +1198,8 @@ void dfcc_instrumentt::instrument_other(
1217
1198
const auto &ptr = target->get_other ().operands ().at (0 );
1218
1199
1219
1200
payload.add (goto_programt::make_function_call (
1220
- code_function_callt{
1221
- check_var,
1222
- library.dfcc_fun_symbol [dfcc_funt::WRITE_SET_CHECK_HAVOC_OBJECT]
1223
- .symbol_expr (),
1224
- {write_set, ptr}},
1201
+ library.write_set_check_havoc_object_call (
1202
+ check_var, write_set, ptr, target_location),
1225
1203
target_location));
1226
1204
1227
1205
// add property class on assertion source_location
0 commit comments