@@ -553,10 +553,14 @@ void dfcc_wrapper_programt::encode_requires_clauses()
553553 // translate each requires clause
554554 for (const auto &r : contract_code_type.c_requires ())
555555 {
556- exprt requires = to_lambda_expr (r).application (contract_lambda_parameters);
557- requires .add_source_location () = r.source_location ();
558- if (has_subexpr (requires , ID_exists) || has_subexpr (requires , ID_forall))
559- add_quantified_variable (goto_model.symbol_table , requires , language_mode);
556+ exprt requires_lmbd =
557+ to_lambda_expr (r).application (contract_lambda_parameters);
558+ requires_lmbd.add_source_location () = r.source_location ();
559+ if (
560+ has_subexpr (requires_lmbd, ID_exists) ||
561+ has_subexpr (requires_lmbd, ID_forall))
562+ add_quantified_variable (
563+ goto_model.symbol_table , requires_lmbd, language_mode);
560564
561565 source_locationt sl (r.source_location ());
562566 if (statement_type == ID_assert)
@@ -566,7 +570,7 @@ void dfcc_wrapper_programt::encode_requires_clauses()
566570 " Check requires clause of contract " + id2string (contract_symbol.name ) +
567571 " for function " + id2string (wrapper_id));
568572 }
569- codet requires_statement (statement_type, {std::move (requires )}, sl);
573+ codet requires_statement (statement_type, {std::move (requires_lmbd )}, sl);
570574 converter.goto_convert (requires_statement, requires_program, language_mode);
571575 }
572576
0 commit comments