Call Girls in Majnu Ka Tilla Delhi 🔝9711014705🔝 Genuine
Reasoning Loops over Arrays using Vampire
1. Reasoning Loops over Arrays using Vampire
First-Order Theorem Prover for Loop Invariant Generation
Jeff Chen1
1Master Thesis in Formal Methods
Chalmers University
Thesis Presentation April 2016
2. Research Motivation
Why Invariants?
Software Eng. Using Formal Methods course
Model Checking (SPIN and JML) ⇒ KeY Verification
Verification of loops ⇒ Loop Invariant exercise by hand (GCD)
Loop Invariants
Tricky boundaries.
Obligation of programmer.
Essence of loops.
3. Existing System
Loop Invariant Gen. with Vampire
L. Kovcs and A. and A. Voronkov (2009).
”Finding Loop Invariants for Programs
over Arrays Using a Theorem Prover”
Static program analysis.
static properties (e.g
monotonic).
Invariants generation using
consequences finding.
Symbol elimination.
Alternating quantifiers.
W. Ahrendt, L. Kovcs and S. Robillard
(2015). ”Reasoning About Loops Using
Vampire in KeY”
Simple guarded language:
generic interface of
imperative languages.
Pre- Post-Conditions for
filtering and correctness.
Direct proof:
Post-condition inference.
Integration with KeY
framework.
4. Previously Failed Example: swap
1 int [] a, b, olda , oldb;
int i, alength , blength;
requires blength == alength , i == 0;
6 requires forall int i, 0 <= i
& i < blength ==> b[i] == oldb[i];
ensures forall int i, 0 <= i
& i < blength ==> a[i] == oldb[i];
11
while (i < alength) do
:: true -> a[i] = b[i];
b[i] = a[i];
i = i + 1;
16 od
8. Conclusion
Vampire is a robust FO theorem prover, but much of the
complexity is dedicated for maintaining completeness.
Theory Reasoning does help the theorem prover in the case of
arrays, but also burdened superposition algorithm.
One can reuse/improve the static analysis part for better
reasoning.
AVATAR architecture is powerful and highly adoptive.
Programming should start from Correctness.
Future work of this project:
Boolean arrays reasoning (Vampire with FOOL).
Vampire + Z3 (SMT for arithmetics).