1 (* Title: HOL/SMT_Examples/Boogie.thy
2 Author: Sascha Boehme, TU Muenchen
5 section \<open>Proving Boogie-generated verification conditions\<close>
9 (*WAS "boogie_file" :: thy_load ("b2i") *)
10 keywords "boogie_file" :: thy_load
14 HOL-Boogie and its applications are described in:
17 \item Sascha B"ohme, K. Rustan M. Leino, and Burkhart Wolff.
18 HOL-Boogie --- An Interactive Prover for the Boogie Program-Verifier.
19 Theorem Proving in Higher Order Logics, 2008.
21 \item Sascha B"ohme, Micha{\l} Moskal, Wolfram Schulte, and Burkhart Wolff.
22 HOL-Boogie --- An Interactive Prover-Backend for the Verifying C Compiler.
23 Journal of Automated Reasoning, 2009.
30 section \<open>Built-in types and functions of Boogie\<close>
32 subsection \<open>Integer arithmetics\<close>
35 The operations \<open>div\<close> and \<open>mod\<close> are built-in in Boogie, but
36 without a particular semantics due to different interpretations in
37 programming languages. We assume that each application comes with a
38 proper axiomatization.
42 boogie_div :: "int \<Rightarrow> int \<Rightarrow> int" (infixl "div'_b" 70) and
43 boogie_mod :: "int \<Rightarrow> int \<Rightarrow> int" (infixl "mod'_b" 70)
47 section \<open>Setup\<close>
49 ML_file \<open>boogie.ML\<close>
53 section \<open>Verification condition proofs\<close>
55 declare [[smt_oracle = false]]
56 declare [[smt_read_only_certificates = true]]
59 external_file \<open>Boogie_Max.certs\<close>
60 declare [[smt_certificates = "Boogie_Max.certs"]]
62 (*WAS \<open>Boogie_Max\<close> *)
63 boogie_file \<open>Boogie_Max.b2i\<close>
66 external_file \<open>Boogie_Dijkstra.certs\<close>
67 declare [[smt_certificates = "Boogie_Dijkstra.certs"]]
69 (*WAS \<open>Boogie_Dijkstra\<close> *)
70 boogie_file \<open>Boogie_Dijkstra.b2i\<close>
73 declare [[z3_extensions = true]]
74 external_file \<open>VCC_Max.certs\<close>
75 declare [[smt_certificates = "VCC_Max.certs"]]
77 (*WAS \<open>VCC_Max\<close> *)
78 boogie_file \<open>VCC_Max.b2i\<close>