@@ -36,6 +36,12 @@ Date: February 2016
3636 " --apply-loop-contracts\n " \
3737 " check and use loop contracts when provided\n "
3838
39+ #define FLAG_REPLACE_PURE_CONTRACTS " replace-pure-contracts"
40+ #define HELP_REPLACE_PURE_CONTRACTS \
41+ " --replace-pure-contracts\n " \
42+ " replace calls to all functions defined as " \
43+ " pure contracts with their contracts\n "
44+
3945#define FLAG_REPLACE_CALL " replace-call-with-contract"
4046#define HELP_REPLACE_CALL \
4147 " --replace-call-with-contract <fun>\n " \
@@ -62,6 +68,10 @@ class code_contractst
6268 {
6369 }
6470
71+ // / \brief Replace all calls to functions defined pure contracts by their
72+ // / contracts
73+ void replace_pure_contracts ();
74+
6575 // / Throws an exception if some function `functions` is found in the program.
6676 void check_all_functions_found (const std::set<std::string> &functions) const ;
6777
@@ -128,6 +138,10 @@ class code_contractst
128138
129139 std::unordered_set<irep_idt> summarized;
130140
141+ // / \brief Returns true iff a function is a pure contract and must
142+ // / automatically be replaced by its contract
143+ bool is_pure_contract (const irep_idt &function_id);
144+
131145 // / \brief Enforce contract of a single function
132146 void enforce_contract (const irep_idt &function);
133147
0 commit comments