- 7. Refined Verification
Condition Generation
Program Verification ETH Zurich, Spring Semester 2018 Alexander J. Summers
158
7. Refined Verification Condition Generation Program Verification - - PowerPoint PPT Presentation
7. Refined Verification Condition Generation Program Verification ETH Zurich, Spring Semester 2018 Alexander J. Summers 158 Weakest Preconditions So Far Weakest preconditions provide a means of reducing the question: does a program have
Program Verification ETH Zurich, Spring Semester 2018 Alexander J. Summers
158
does a program have any failing traces (under a specified precondition)?
to an SMT problem: is unsatisfiable?
159
causes duplication of formulas and expressions
might not persist, due to assignments in
160
with
takes
would become : introduces inconsistency
to survive/be “factored out”
(fresh atom )
161
loops first (as was explained in slide 152)
is in DSA form (but not in SSA form)
, , , …
could become
statements with but increment the version of the variable
162
a version unused in both branches; assign latest value to this in each branch
could become ( is new version of )
by replacing with
163
DSA form consisting of only the following constructs:
to checking the program has no failing traces
is unsatisfiable
generates formulas which are linear in the size of the program
is found to be satisfiable
164
to fail – report this as one error
165
statement could cause a failure (if could be false)
could be false)
statements with
working on multisets of assertions
⋃
)
166
definition is as follows:
⋃ ⋃
we check a set of entailments:
for each
multisets originated, we can now easily report error locations
statement could fail
167
idea outlined here is a simple way to localise errors
168
statements:
statement, pick a fresh propositional atom , and replace the statement with
above, then take a similar model in which is false
statement can only lead to a failing trace if its label is made false
)
)
169
This slide was not covered in the lecture; the material here is not examinable
the solver will only make false once it’s already managed to make false, at which point making false gives a failing trace
170
This slide was not covered in the lecture; the material here is not examinable
returned will identify a failing assertion
171
This slide was not covered in the lecture; the material here is not examinable
172
Saxe (2001)
James B. Saxe (2005)
173