@@ -38,7 +38,6 @@ Author: Remi Delmas, delmasrd@amazon.com
3838#include " dfcc_instrument.h"
3939#include " dfcc_library.h"
4040#include " dfcc_lift_memory_predicates.h"
41- #include " dfcc_loop_contract_mode.h"
4241#include " dfcc_spec_functions.h"
4342#include " dfcc_swap_and_wrap.h"
4443
@@ -96,9 +95,7 @@ class invalid_function_contract_pair_exceptiont : public cprover_exception_baset
9695// / \param to_check function to check against its contract
9796// / \param allow_recursive_calls Allow the checked function to be recursive
9897// / \param to_replace set of functions to replace with their contract
99- // / \param apply_loop_contracts apply loop contract transformations iff true
100- // / \param unwind_transformed_loops unwind transformed loops after applying loop
101- // / contracts.
98+ // / \param loop_contract_config configuration for applying loop contracts
10299// / \param to_exclude_from_nondet_static set of symbols to exclude when havocing
103100// / static program symbols.
104101// / \param message_handler used for debug/warning/error messages
@@ -109,41 +106,7 @@ void dfcc(
109106 const std::optional<irep_idt> &to_check,
110107 const bool allow_recursive_calls,
111108 const std::set<irep_idt> &to_replace,
112- const bool apply_loop_contracts,
113- const bool unwind_transformed_loops,
114- const std::set<std::string> &to_exclude_from_nondet_static,
115- message_handlert &message_handler);
116-
117- // / \ingroup dfcc-module
118- // / \brief Applies function contracts and loop contracts transformation to GOTO
119- // / model, using the dynamic frame condition checking approach.
120- // /
121- // / Functions to check/replace are explicitly mapped to contracts.
122- // / When checking function `foo` against contract `bar`, we require the
123- // / actual contract symbol to exist as `contract::bar` in the symbol table.
124- // /
125- // / \param options CLI options (used to lookup options for language config when
126- // / re-defining the model's entry point)
127- // / \param goto_model GOTO model to transform
128- // / \param harness_id Proof harness name, must be the entry point of the model
129- // / \param to_check (function,contract) pair for contract checking
130- // / \param allow_recursive_calls Allow the checked function to be recursive
131- // / \param to_replace Functions-to-contract mapping for replacement
132- // / \param apply_loop_contracts Apply loop contract transformations iff true
133- // / \param unwind_transformed_loops unwind transformed loops after applying loop
134- // / contracts.
135- // / \param to_exclude_from_nondet_static Set of symbols to exclude when havocing
136- // / static program symbols.
137- // / \param message_handler used for debug/warning/error messages
138- void dfcc (
139- const optionst &options,
140- goto_modelt &goto_model,
141- const irep_idt &harness_id,
142- const std::optional<std::pair<irep_idt, irep_idt>> &to_check,
143- const bool allow_recursive_calls,
144- const std::map<irep_idt, irep_idt> &to_replace,
145- const bool apply_loop_contracts,
146- const bool unwind_transformed_loops,
109+ const loop_contract_configt loop_contract_config,
147110 const std::set<std::string> &to_exclude_from_nondet_static,
148111 message_handlert &message_handler);
149112
@@ -160,7 +123,7 @@ class dfcct
160123 // / \param to_check (function,contract) pair for contract checking
161124 // / \param allow_recursive_calls Allow the checked function to be recursive
162125 // / \param to_replace functions-to-contract mapping for replacement
163- // / \param loop_contract_mode mode to use for loop contracts
126+ // / \param loop_contract_config configuration for applying loop contracts
164127 // / \param message_handler used for debug/warning/error messages
165128 // / \param to_exclude_from_nondet_static set of symbols to exclude when
166129 dfcct (
@@ -170,7 +133,7 @@ class dfcct
170133 const std::optional<std::pair<irep_idt, irep_idt>> &to_check,
171134 const bool allow_recursive_calls,
172135 const std::map<irep_idt, irep_idt> &to_replace,
173- const dfcc_loop_contract_modet loop_contract_mode ,
136+ const loop_contract_configt loop_contract_config ,
174137 message_handlert &message_handler,
175138 const std::set<std::string> &to_exclude_from_nondet_static);
176139
@@ -207,7 +170,7 @@ class dfcct
207170 const std::optional<std::pair<irep_idt, irep_idt>> &to_check;
208171 const bool allow_recursive_calls;
209172 const std::map<irep_idt, irep_idt> &to_replace;
210- const dfcc_loop_contract_modet loop_contract_mode ;
173+ const loop_contract_configt loop_contract_config ;
211174 const std::set<std::string> &to_exclude_from_nondet_static;
212175 message_handlert &message_handler;
213176 messaget log;
0 commit comments