@@ -629,7 +629,9 @@ void code_contractst::apply_function_contract(
629629 // If the function does return a value, but the return value is
630630 // disregarded, check if the postcondition includes the return value.
631631 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) {
633635 return has_symbol_expr (
634636 to_lambda_expr (e).where (), CPROVER_PREFIX " return_value" , true );
635637 }))
@@ -674,7 +676,7 @@ void code_contractst::apply_function_contract(
674676 is_fresh.add_memory_map_decl (new_program);
675677
676678 // Generate: assert(requires)
677- for (const auto &clause : type.requires ())
679+ for (const auto &clause : type.c_requires ())
678680 {
679681 auto instantiated_clause =
680682 to_lambda_expr (clause).application (instantiation_values);
@@ -690,16 +692,16 @@ void code_contractst::apply_function_contract(
690692 converter,
691693 instantiated_clause,
692694 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 );
695697 },
696698 new_program,
697699 _location);
698700 }
699701
700702 // Generate all the instructions required to initialize history variables
701703 exprt::operandst instantiated_ensures_clauses;
702- for (auto clause : type.ensures ())
704+ for (auto clause : type.c_ensures ())
703705 {
704706 auto instantiated_clause =
705707 to_lambda_expr (clause).application (instantiation_values);
@@ -712,7 +714,7 @@ void code_contractst::apply_function_contract(
712714 // ASSIGNS clause should not refer to any quantified variables,
713715 // and only refer to the common symbols to be replaced.
714716 exprt::operandst targets;
715- for (auto &target : type.assigns ())
717+ for (auto &target : type.c_assigns ())
716718 targets.push_back (to_lambda_expr (target).application (instantiation_values));
717719
718720 // Create a sequence of non-deterministic assignments ...
@@ -1138,7 +1140,7 @@ void code_contractst::check_frame_conditions_function(const irep_idt &function)
11381140 instantiation_values.push_back (
11391141 ns.lookup (param.get_identifier ()).symbol_expr ());
11401142 }
1141- for (auto &target : get_contract (function, ns).assigns ())
1143+ for (auto &target : get_contract (function, ns).c_assigns ())
11421144 {
11431145 goto_programt payload;
11441146 instrument_spec_assigns.track_spec_target (
@@ -1299,7 +1301,7 @@ void code_contractst::add_contract_check(
12991301 visitor.add_memory_map_decl (check);
13001302
13011303 // Generate: assume(requires)
1302- for (const auto &clause : code_type.requires ())
1304+ for (const auto &clause : code_type.c_requires ())
13031305 {
13041306 auto instantiated_clause =
13051307 to_lambda_expr (clause).application (instantiation_values);
@@ -1318,16 +1320,16 @@ void code_contractst::add_contract_check(
13181320 converter,
13191321 instantiated_clause,
13201322 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 );
13231325 },
13241326 check,
13251327 _location);
13261328 }
13271329
13281330 // Generate all the instructions required to initialize history variables
13291331 exprt::operandst instantiated_ensures_clauses;
1330- for (auto clause : code_type.ensures ())
1332+ for (auto clause : code_type.c_ensures ())
13311333 {
13321334 auto instantiated_clause =
13331335 to_lambda_expr (clause).application (instantiation_values);
0 commit comments