@@ -35,6 +35,11 @@ Date: February 2016
35
35
" --apply-loop-contracts\n " \
36
36
" check and use loop contracts when provided\n "
37
37
38
+ #define FLAG_LOOP_CONTRACTS_NO_UNWIND " loop-contracts-no-unwind"
39
+ #define HELP_LOOP_CONTRACTS_NO_UNWIND \
40
+ " --loop-contracts-no-unwind\n " \
41
+ " do not unwind transformed loops\n "
42
+
38
43
#define FLAG_REPLACE_CALL " replace-call-with-contract"
39
44
#define HELP_REPLACE_CALL \
40
45
" --replace-call-with-contract <function>[/contract]\n " \
@@ -75,7 +80,7 @@ class code_contractst
75
80
// / with an assertion that the `requires` clause holds followed by an
76
81
// / assumption that the `ensures` clause holds. In order to ensure that `F`
77
82
// / actually abides by its `ensures` and `requires` clauses, you should
78
- // / separately call `code_constractst ::enforce_contracts()` on `F` and verify
83
+ // / separately call `code_contractst ::enforce_contracts()` on `F` and verify
79
84
// / it using `cbmc --function F`.
80
85
void replace_calls (const std::set<std::string> &to_replace);
81
86
@@ -139,6 +144,9 @@ class code_contractst
139
144
140
145
namespacet ns;
141
146
147
+ // Unwind transformed loops after applying loop contracts or not.
148
+ bool unwind_transformed_loops = true ;
149
+
142
150
protected:
143
151
goto_modelt &goto_model;
144
152
symbol_tablet &symbol_table;
@@ -159,7 +167,7 @@ class code_contractst
159
167
std::unordered_map<goto_programt::const_targett, unsigned , const_target_hash>
160
168
original_loop_number_map;
161
169
162
- // / Loop havoc instructions instrumneted during applying loop contracts.
170
+ // / Loop havoc instructions instrumented during applying loop contracts.
163
171
std::unordered_set<goto_programt::const_targett, const_target_hash>
164
172
loop_havoc_set;
165
173
0 commit comments