@@ -35,6 +35,11 @@ Date: February 2016
3535  "  --apply-loop-contracts\n " 
3636  "                               check and use loop contracts when provided\n " 
3737
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+ 
3843#define  FLAG_REPLACE_CALL  " replace-call-with-contract" 
3944#define  HELP_REPLACE_CALL                                                       \
4045  "  --replace-call-with-contract <function>[/contract]\n " 
@@ -75,7 +80,7 @@ class code_contractst
7580  // / with an assertion that the `requires` clause holds followed by an
7681  // / assumption that the `ensures` clause holds. In order to ensure that `F`
7782  // / 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
7984  // / it using `cbmc --function F`.
8085  void  replace_calls (const  std::set<std::string> &to_replace);
8186
@@ -139,6 +144,9 @@ class code_contractst
139144
140145  namespacet ns;
141146
147+   //  Unwind transformed loops after applying loop contracts or not.
148+   bool  unwind_transformed_loops = true ;
149+ 
142150protected: 
143151  goto_modelt &goto_model;
144152  symbol_tablet &symbol_table;
@@ -159,7 +167,7 @@ class code_contractst
159167  std::unordered_map<goto_programt::const_targett, unsigned , const_target_hash>
160168    original_loop_number_map;
161169
162-   // / Loop havoc instructions instrumneted  during applying loop contracts.
170+   // / Loop havoc instructions instrumented  during applying loop contracts.
163171  std::unordered_set<goto_programt::const_targett, const_target_hash>
164172    loop_havoc_set;
165173
0 commit comments