1 (* Title: HOL/Boogie/Boogie.thy
2 Author: Sascha Boehme, TU Muenchen
5 header {* Integration of the Boogie program verifier *}
10 ("Tools/boogie_vcs.ML")
11 ("Tools/boogie_loader.ML")
12 ("Tools/boogie_tactics.ML")
13 ("Tools/boogie_commands.ML")
17 HOL-Boogie and its applications are described in:
20 \item Sascha B"ohme, K. Rustan M. Leino, and Burkhart Wolff.
21 HOL-Boogie --- An Interactive Prover for the Boogie Program-Verifier.
22 Theorem Proving in Higher Order Logics, 2008.
24 \item Sascha B"ohme, Micha{\l} Moskal, Wolfram Schulte, and Burkhart Wolff.
25 HOL-Boogie --- An Interactive Prover-Backend for the Verifying C Compiler.
26 Journal of Automated Reasoning, 2009.
33 section {* Built-in types and functions of Boogie *}
35 subsection {* Labels *}
38 See "Generating error traces from verification-condition counterexamples"
39 by Leino e.a. (2004) for a description of Boogie's labelling mechanism and
43 definition assert_at :: "bool \<Rightarrow> bool \<Rightarrow> bool" where "assert_at l P = P"
44 definition block_at :: "bool \<Rightarrow> bool \<Rightarrow> bool" where "block_at l P = P"
46 lemmas labels = assert_at_def block_at_def
49 subsection {* Integer arithmetics *}
52 The operations @{text div} and @{text mod} are built-in in Boogie, but
53 without a particular semantics due to different interpretations in
54 programming languages. We assume that each application comes with a
55 proper axiomatization.
59 boogie_div :: "int \<Rightarrow> int \<Rightarrow> int" (infixl "div'_b" 70) and
60 boogie_mod :: "int \<Rightarrow> int \<Rightarrow> int" (infixl "mod'_b" 70)
64 section {* Boogie environment *}
67 Proving Boogie-generated verification conditions happens inside
70 boogie_open "b2i file without extension"
71 boogie_vc "verification condition 1" ...
72 boogie_vc "verification condition 2" ...
73 boogie_vc "verification condition 3" ...
76 See the Boogie examples for more details.
78 At most one Boogie environment should occur per theory,
79 otherwise unexpected effects may arise.
87 structure Boogie_Axioms = Named_Thms
91 "Boogie background axioms loaded along with Boogie verification conditions"
94 setup Boogie_Axioms.setup
96 use "Tools/boogie_vcs.ML"
97 use "Tools/boogie_loader.ML"
98 use "Tools/boogie_tactics.ML"
99 setup Boogie_Tactics.setup
101 use "Tools/boogie_commands.ML"
102 setup Boogie_Commands.setup