@@ -629,7 +629,9 @@ void code_contractst::apply_function_contract(
629
629
// If the function does return a value, but the return value is
630
630
// disregarded, check if the postcondition includes the return value.
631
631
if (std::any_of (
632
- type.ensures ().begin (), type.ensures ().end (), [](const exprt &e) {
632
+ type.c_ensures ().begin (),
633
+ type.c_ensures ().end (),
634
+ [](const exprt &e) {
633
635
return has_symbol_expr (
634
636
to_lambda_expr (e).where (), CPROVER_PREFIX " return_value" , true );
635
637
}))
@@ -674,7 +676,7 @@ void code_contractst::apply_function_contract(
674
676
is_fresh.add_memory_map_decl (new_program);
675
677
676
678
// Generate: assert(requires)
677
- for (const auto &clause : type.requires ())
679
+ for (const auto &clause : type.c_requires ())
678
680
{
679
681
auto instantiated_clause =
680
682
to_lambda_expr (clause).application (instantiation_values);
@@ -690,16 +692,16 @@ void code_contractst::apply_function_contract(
690
692
converter,
691
693
instantiated_clause,
692
694
mode,
693
- [&is_fresh](goto_programt &requires ) {
694
- is_fresh.update_requires (requires );
695
+ [&is_fresh](goto_programt &c_requires ) {
696
+ is_fresh.update_requires (c_requires );
695
697
},
696
698
new_program,
697
699
_location);
698
700
}
699
701
700
702
// Generate all the instructions required to initialize history variables
701
703
exprt::operandst instantiated_ensures_clauses;
702
- for (auto clause : type.ensures ())
704
+ for (auto clause : type.c_ensures ())
703
705
{
704
706
auto instantiated_clause =
705
707
to_lambda_expr (clause).application (instantiation_values);
@@ -712,7 +714,7 @@ void code_contractst::apply_function_contract(
712
714
// ASSIGNS clause should not refer to any quantified variables,
713
715
// and only refer to the common symbols to be replaced.
714
716
exprt::operandst targets;
715
- for (auto &target : type.assigns ())
717
+ for (auto &target : type.c_assigns ())
716
718
targets.push_back (to_lambda_expr (target).application (instantiation_values));
717
719
718
720
// Create a sequence of non-deterministic assignments ...
@@ -1138,7 +1140,7 @@ void code_contractst::check_frame_conditions_function(const irep_idt &function)
1138
1140
instantiation_values.push_back (
1139
1141
ns.lookup (param.get_identifier ()).symbol_expr ());
1140
1142
}
1141
- for (auto &target : get_contract (function, ns).assigns ())
1143
+ for (auto &target : get_contract (function, ns).c_assigns ())
1142
1144
{
1143
1145
goto_programt payload;
1144
1146
instrument_spec_assigns.track_spec_target (
@@ -1299,7 +1301,7 @@ void code_contractst::add_contract_check(
1299
1301
visitor.add_memory_map_decl (check);
1300
1302
1301
1303
// Generate: assume(requires)
1302
- for (const auto &clause : code_type.requires ())
1304
+ for (const auto &clause : code_type.c_requires ())
1303
1305
{
1304
1306
auto instantiated_clause =
1305
1307
to_lambda_expr (clause).application (instantiation_values);
@@ -1318,16 +1320,16 @@ void code_contractst::add_contract_check(
1318
1320
converter,
1319
1321
instantiated_clause,
1320
1322
function_symbol.mode ,
1321
- [&visitor](goto_programt &requires ) {
1322
- visitor.update_requires (requires );
1323
+ [&visitor](goto_programt &c_requires ) {
1324
+ visitor.update_requires (c_requires );
1323
1325
},
1324
1326
check,
1325
1327
_location);
1326
1328
}
1327
1329
1328
1330
// Generate all the instructions required to initialize history variables
1329
1331
exprt::operandst instantiated_ensures_clauses;
1330
- for (auto clause : code_type.ensures ())
1332
+ for (auto clause : code_type.c_ensures ())
1331
1333
{
1332
1334
auto instantiated_clause =
1333
1335
to_lambda_expr (clause).application (instantiation_values);
0 commit comments