Logical Abduction and its Applications in Program Verification. Isil Dillig MSR Cambridge
|
|
- Miles Wells
- 5 years ago
- Views:
Transcription
1 Logical Abduction and its Applications in Program Verification? Isil Dillig MSR Cambridge
2 What is Abduction? Abduction: Opposite of deduction 2 / 21
3 What is Abduction? Abduction: Opposite of deduction Deduction: Infers valid conclusion from premises 2 / 21
4 What is Abduction? Abduction: Opposite of deduction Deduction: Infers valid conclusion from premises Abduction: Infers missing premise to explain a given conclusion 2 / 21
5 What is Abduction? Abduction: Opposite of deduction Deduction: Infers valid conclusion from premises Abduction: Infers missing premise to explain a given conclusion Given known facts Γ and desired outcome φ, abductive inference finds simple explanatory hypothesis ψ such that Γ ψ = φ and SAT(Γ ψ) 2 / 21
6 Simple Example Facts: If it rains, then it is wet and cloudy, If it is wet, then it is slippery : R W C W S 3 / 21
7 Simple Example Facts: If it rains, then it is wet and cloudy, If it is wet, then it is slippery : R W C W S Conclusion: It is cloudy and slippery, i.e., C S 3 / 21
8 Simple Example Facts: If it rains, then it is wet and cloudy, If it is wet, then it is slippery : R W C W S Conclusion: It is cloudy and slippery, i.e., C S Abductive explanation: R, i.e., It is rainy 3 / 21
9 Arithmetic Example int x = 0; int y = 0; while(x < n) { x = x+1; y = y+2; } assert( x + y >= 3*n); 4 / 21
10 Arithmetic Example int x = 0; int y = 0; Suppose we know x n e.g., from loop termination condition while(x < n) { x = x+1; y = y+2; } assert( x + y >= 3*n); 4 / 21
11 Arithmetic Example int x = 0; int y = 0; while(x < n) { x = x+1; y = y+2; } Suppose we know x n e.g., from loop termination condition Desired conclusion x + y 3n property we want to prove assert( x + y >= 3*n); 4 / 21
12 Arithmetic Example int x = 0; int y = 0; while(x < n) { x = x+1; y = y+2; } assert( x + y >= 3*n); Suppose we know x n e.g., from loop termination condition Desired conclusion x + y 3n property we want to prove Abductive explanation: y 2x corresponds to missing loop invariant 4 / 21
13 Abduction vs. Interpolation 5 / 21
14 Abduction vs. Interpolation Abduction is flip-side of Craig interpolation Abduction explains why a formula is invalid; interpolation explains why it is valid 5 / 21
15 Abduction vs. Interpolation Abduction is flip-side of Craig interpolation Abduction explains why a formula is invalid; interpolation explains why it is valid In abduction, given invalid Γ φ, find ψ that explains why. 5 / 21
16 Abduction vs. Interpolation Abduction is flip-side of Craig interpolation Abduction explains why a formula is invalid; interpolation explains why it is valid In abduction, given invalid Γ φ, find ψ that explains why. In interpolation, given valid Γ φ, if we can find ψ s.t. Γ ψ and ψ φ, then ψ constitutes proof of validity. 5 / 21
17 Abduction vs. Interpolation Abduction is flip-side of Craig interpolation Abduction explains why a formula is invalid; interpolation explains why it is valid In abduction, given invalid Γ φ, find ψ that explains why. In interpolation, given valid Γ φ, if we can find ψ s.t. Γ ψ and ψ φ, then ψ constitutes proof of validity. Abduction + Interpolation: Yin-and-Yang of logical inference 5 / 21
18 Road Map 1 Properties of desired solutions 6 / 21
19 Road Map 1 Properties of desired solutions 2 Algorithm for performing abduction in logics that admit QE 6 / 21
20 Road Map 1 Properties of desired solutions 2 Algorithm for performing abduction in logics that admit QE 3 Applications of abduction in program analysis/verification 6 / 21
21 Road Map 1 Properties of desired solutions 2 Algorithm for performing abduction in logics that admit QE 3 Applications of abduction in program analysis/verification 4 Thoughts on abduction vs. interpolation in verification 6 / 21
22 Properties of Desired Solutions In general, the abduction problem Γ? = φ has infinitely many solutions 7 / 21
23 Properties of Desired Solutions In general, the abduction problem Γ? = φ has infinitely many solutions Trivial solution: φ, but not useful because does not take into account what we know 7 / 21
24 Properties of Desired Solutions In general, the abduction problem Γ? = φ has infinitely many solutions Trivial solution: φ, but not useful because does not take into account what we know So, what kind of solutions do want to compute? 7 / 21
25 Which Abductive Explanations Are Good? Guiding Principle: Occam s Razor 8 / 21
26 Which Abductive Explanations Are Good? Guiding Principle: Occam s Razor If there are multiple competing hypotheses, select the one that makes fewest assumptions 8 / 21
27 Which Abductive Explanations Are Good? Guiding Principle: Occam s Razor If there are multiple competing hypotheses, select the one that makes fewest assumptions Generality: If explanation A is logically weaker than explanation B, always prefer A 8 / 21
28 Which Abductive Explanations Are Good? Guiding Principle: Occam s Razor If there are multiple competing hypotheses, select the one that makes fewest assumptions Generality: If explanation A is logically weaker than explanation B, always prefer A Simplicity: Not clear-cut, but we use number of variables 8 / 21
29 Which Abductive Explanations Are Good? Guiding Principle: Occam s Razor If there are multiple competing hypotheses, select the one that makes fewest assumptions Generality: If explanation A is logically weaker than explanation B, always prefer A Simplicity: Not clear-cut, but we use number of variables This simplicity criterion makes sense in verification because we want proof subgoals to be local and refer to few variables 8 / 21
30 Solutions We Will Compute Want to compute logically weakest solutions with fewest variables 9 / 21
31 Solutions We Will Compute Want to compute logically weakest solutions with fewest variables First talk about how to compute solutions with fewest variables 9 / 21
32 Solutions We Will Compute Want to compute logically weakest solutions with fewest variables First talk about how to compute solutions with fewest variables Then talk about how to obtain most general solution containing these variables 9 / 21
33 Minimum Satisfying Assignments To find solutions with fewest variables, we use minimum satisfying assignments of formulas 10 / 21
34 Minimum Satisfying Assignments To find solutions with fewest variables, we use minimum satisfying assignments of formulas Minimum satisfying assignment (MSA): assigns values to a subset of variables in formula sufficient to make formula true Among all other partial satisfying assignments, contains fewest variables 10 / 21
35 Example Consider the following formula in linear integer arithmetic: x + y + w > 0 x + y + z + w < 5 11 / 21
36 Example Consider the following formula in linear integer arithmetic: x + y + w > 0 x + y + z + w < 5 Minimum satisfying assignment: z = 0 11 / 21
37 Example Consider the following formula in linear integer arithmetic: x + y + w > 0 x + y + z + w < 5 Minimum satisfying assignment: z = 0 Note: Algorithm for computing MSAs given in our CAV 12 paper, Minimum Satisfying Assignments for SMT by Dillig & McMillan 11 / 21
38 Why Are MSAs Useful for Abduction? Recall: Want to find ψ such that Γ ψ = φ 12 / 21
39 Why Are MSAs Useful for Abduction? Recall: Want to find ψ such that Γ ψ = φ This entailment can be rewritten as: ψ = Γ φ 12 / 21
40 Why Are MSAs Useful for Abduction? Recall: Want to find ψ such that Γ ψ = φ This entailment can be rewritten as: ψ = Γ φ Hence, MSA of Γ φ consistent with Γ is a solution to abduction problem 12 / 21
41 Why Are MSAs Useful for Abduction? Recall: Want to find ψ such that Γ ψ = φ This entailment can be rewritten as: ψ = Γ φ Hence, MSA of Γ φ consistent with Γ is a solution to abduction problem Furthermore, it makes assumptions about as few variables as possible 12 / 21
42 Why Are MSAs Useful for Abduction? Recall: Want to find ψ such that Γ ψ = φ This entailment can be rewritten as: ψ = Γ φ Hence, MSA of Γ φ consistent with Γ is a solution to abduction problem Furthermore, it makes assumptions about as few variables as possible But it is not the most general solution 12 / 21
43 Finding Most General Solutions Key idea: Quantifier elimination To find most general solution containing variables in the MSA, universally quantify all other variables V and apply quantifier elimination to V. Γ φ 13 / 21
44 Finding Most General Solutions Key idea: Quantifier elimination To find most general solution containing variables in the MSA, universally quantify all other variables V and apply quantifier elimination to V. Γ φ The resulting formula captures all satisfying assignments containing only MSA variables 13 / 21
45 Abduction Algorithm abduce yields formula E such that I E = φ and E is consistent with I 14 / 21
46 Abduction Algorithm abduce yields formula E such that I E = φ and E is consistent with I First, compute all variables in MSA of I φ consistent with I, θ 14 / 21
47 Abduction Algorithm abduce yields formula E such that I E = φ and E is consistent with I First, compute all variables in MSA of I φ consistent with I, θ -quantify variables not in the MSA and apply quantifier elimination 14 / 21
48 Abduction Algorithm abduce yields formula E such that I E = φ and E is consistent with I First, compute all variables in MSA of I φ consistent with I, θ -quantify variables not in the MSA and apply quantifier elimination Remove subparts of ψ implied by I 14 / 21
49 Abduction Algorithm abduce yields formula E such that I E = φ and E is consistent with I First, compute all variables in MSA of I φ consistent with I, θ -quantify variables not in the MSA and apply quantifier elimination Remove subparts of ψ implied by I uses algorithm from SAS 10 paper Small Formulas for Large Programs:... ) 14 / 21
50 Abduction in Program Analysis Useful technique to add to our bag of tricks; lots of applications! Abduction interpolation CEGAR Abstract interpretation 15 / 21
51 Abduction in Program Analysis Useful technique to add to our bag of tricks; lots of applications! Abduction Loop invariant generation interpolation CEGAR Abstract interpretation 15 / 21
52 Abduction in Program Analysis Useful technique to add to our bag of tricks; lots of applications! Abduction Loop invariant generation Synthesis of compositional program proofs interpolation CEGAR Abstract interpretation 15 / 21
53 Abduction in Program Analysis Useful technique to add to our bag of tricks; lots of applications! Abduction Loop invariant generation Synthesis of compositional program proofs interpolation CEGAR Inference of missing library specifications Abstract interpretation 15 / 21
54 Abduction in Program Analysis Useful technique to add to our bag of tricks; lots of applications! Abduction Loop invariant generation Synthesis of compositional program proofs interpolation CEGAR Abstract interpretation Inference of missing library specifications Explaining static analysis warnings to programmers 15 / 21
55 Abduction in Program Analysis Useful technique to add to our bag of tricks; lots of applications! Abduction Loop invariant generation Synthesis of compositional program proofs interpolation CEGAR Abstract interpretation Inference of missing library specifications Explaining static analysis warnings to programmers Modular shape analysis using SL 15 / 21
56 Abduction in Program Analysis Useful technique to add to our bag of tricks; lots of applications! Abduction Loop invariant generation Synthesis of compositional program proofs interpolation CEGAR Abstract interpretation Inference of missing library specifications Explaining static analysis warnings to programmers Modular shape analysis using SL 15 / 21
57 Using Abduction for Loop Invariant Generation Key idea: Perform backtracking search combining Hoare logic with abduction 16 / 21
58 Using Abduction for Loop Invariant Generation Key idea: Perform backtracking search combining Hoare logic with abduction Starting with true, iteratively strengthen loop invariants 16 / 21
59 Using Abduction for Loop Invariant Generation Key idea: Perform backtracking search combining Hoare logic with abduction Starting with true, iteratively strengthen loop invariants At every step, use current set of invariants to generate VCs: Inductive : I C wp(s, I ) Sufficient : I C Q 16 / 21
60 Using Abduction for Loop Invariant Generation Key idea: Perform backtracking search combining Hoare logic with abduction Starting with true, iteratively strengthen loop invariants At every step, use current set of invariants to generate VCs: Inductive : I C wp(s, I ) Sufficient : I C Q If all VCs are valid, found inductive invariants sufficient to verify program 16 / 21
61 Using Abduction for Loop Invariant Generation Key idea: Perform backtracking search combining Hoare logic with abduction Starting with true, iteratively strengthen loop invariants At every step, use current set of invariants to generate VCs: Inductive : I C wp(s, I ) Sufficient : I C Q If all VCs are valid, found inductive invariants sufficient to verify program Otherwise, strengten LHS using abduction 16 / 21
62 Using Abduction for Loop Invariant Generation, cont. If I C Q is invalid, abduction produces auxiliary invariant ψ such that I ψ is strong enough to show Q 17 / 21
63 Using Abduction for Loop Invariant Generation, cont. If I C Q is invalid, abduction produces auxiliary invariant ψ such that I ψ is strong enough to show Q If I C wp(s, I ) is invalid, abduction produces auxiliary invariant ψ such that I is inductive relative to ψ 17 / 21
64 Using Abduction for Loop Invariant Generation, cont. If I C Q is invalid, abduction produces auxiliary invariant ψ such that I ψ is strong enough to show Q If I C wp(s, I ) is invalid, abduction produces auxiliary invariant ψ such that I is inductive relative to ψ In either case, strengthen invariant to I ψ and try to prove correctness 17 / 21
65 Using Abduction for Loop Invariant Generation, cont. Since new invariant is a speculation, need to re-check VCs and might have to backtrack. 18 / 21
66 Using Abduction for Loop Invariant Generation, cont. Since new invariant is a speculation, need to re-check VCs and might have to backtrack. Current invariants Backtrack! VCGen Strengthened invariant Done Abduction No solution Solution 18 / 21
67 Some Experimental Results Evaluated this technique on 46 loop invariant benchmarks 19 / 21
68 Some Experimental Results Evaluated this technique on 46 loop invariant benchmarks Compared our results against BLAST, InvGen, and Interproc: 19 / 21
69 Some Experimental Results Evaluated this technique on 46 loop invariant benchmarks Compared our results against BLAST, InvGen, and Interproc: HOLA BLAST Inv Gen Inter proc 19 / 21
70 Some Experimental Results Evaluated this technique on 46 loop invariant benchmarks Compared our results against BLAST, InvGen, and Interproc: HOLA BLAST Inv Gen Inter proc But not strictly better: cannot prove two benchmarks at least one tool can show 19 / 21
71 Abduction vs. Interpolation in Program Verification 20 / 21
72 Abduction vs. Interpolation in Program Verification Interpolation approaches utilize underapproximations generalize from concrete traces speculate invariants implied by underapproximations 20 / 21
73 Abduction vs. Interpolation in Program Verification Interpolation approaches utilize underapproximations generalize from concrete traces speculate invariants implied by underapproximations Abduction-based approach uses only overapproximations speculate invariants that are consistent with overapproximations and sufficient to show desired goal 20 / 21
74 Abduction vs. Interpolation in Program Verification Interpolation approaches utilize underapproximations generalize from concrete traces speculate invariants implied by underapproximations Abduction-based approach uses only overapproximations speculate invariants that are consistent with overapproximations and sufficient to show desired goal Dual concepts, so their combination could be synergistic combine model checking with Hoare-style reasoning? 20 / 21
75 Questions?
Explain: A Tool for Performing Abductive Inference
Explain: A Tool for Performing Abductive Inference Isil Dillig and Thomas Dillig {idillig, tdillig}@cs.wm.edu Computer Science Department, College of William & Mary Abstract. This paper describes a tool
More informationHoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples
Hoare Logic I Introduction to Deductive Program Verification Işıl Dillig Program Spec Deductive verifier FOL formula Theorem prover valid contingent Example specs: safety (no crashes), absence of arithmetic
More informationFloyd-Hoare Style Program Verification
Floyd-Hoare Style Program Verification Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 9 Feb 2017 Outline of this talk 1 Overview 2 Hoare Triples 3
More informationNon-linear Interpolant Generation and Its Application to Program Verification
Non-linear Interpolant Generation and Its Application to Program Verification Naijun Zhan State Key Laboratory of Computer Science, Institute of Software, CAS Joint work with Liyun Dai, Ting Gan, Bow-Yaw
More informationAxiomatic Semantics. Lecture 9 CS 565 2/12/08
Axiomatic Semantics Lecture 9 CS 565 2/12/08 Axiomatic Semantics Operational semantics describes the meaning of programs in terms of the execution steps taken by an abstract machine Denotational semantics
More informationHoare Logic and Model Checking
Hoare Logic and Model Checking Kasper Svendsen University of Cambridge CST Part II 2016/17 Acknowledgement: slides heavily based on previous versions by Mike Gordon and Alan Mycroft Introduction In the
More informationDeductive Verification
Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant
More informationTopics in Model-Based Reasoning
Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational
More informationSimplifying Loop Invariant Generation Using Splitter Predicates
Simplifying Loop Invariant Generation Using Splitter Predicates Rahul Sharma, Isil Dillig, Thomas Dillig, and Alex Aiken Department of Computer Science Stanford University {sharmar,isil,tdillig,aiken}@cs.stanford.edu
More informationSimplifying Loop Invariant Generation Using Splitter Predicates
Simplifying Loop Invariant Generation Using Splitter Predicates Rahul Sharma, Isil Dillig, Thomas Dillig, and Alex Aiken Department of Computer Science Stanford University {sharmar,isil,tdillig,aiken}@cs.stanford.edu
More informationHoare Logic: Part II
Hoare Logic: Part II COMP2600 Formal Methods for Software Engineering Jinbo Huang Australian National University COMP 2600 Hoare Logic II 1 Factorial {n 0} fact := 1; i := n; while (i >0) do fact := fact
More informationIn this episode of The Verification Corner, Rustan Leino talks about Loop Invariants. He gives a brief summary of the theoretical foundations and
In this episode of The Verification Corner, Rustan Leino talks about Loop Invariants. He gives a brief summary of the theoretical foundations and shows how a program can sometimes be systematically constructed
More informationA Short Introduction to Hoare Logic
A Short Introduction to Hoare Logic Supratik Chakraborty I.I.T. Bombay June 23, 2008 Supratik Chakraborty (I.I.T. Bombay) A Short Introduction to Hoare Logic June 23, 2008 1 / 34 Motivation Assertion checking
More informationSolving Constrained Horn Clauses using Interpolation
Solving Constrained Horn Clauses using Interpolation MSR-TR-2013-6 Kenneth L. McMillan Micrsoft Research Andrey Rybalchenko Technische Universität München Abstract We present an interpolation-based method
More informationThe Impact of Craig s Interpolation Theorem. in Computer Science
The Impact of Craig s Interpolation Theorem in Computer Science Cesare Tinelli tinelli@cs.uiowa.edu The University of Iowa Berkeley, May 2007 p.1/28 The Role of Logic in Computer Science Mathematical logic
More informationProgram verification. Hoare triples. Assertional semantics (cont) Example: Semantics of assignment. Assertional semantics of a program
Program verification Assertional semantics of a program Meaning of a program: relation between its inputs and outputs; specified by input assertions (pre-conditions) and output assertions (post-conditions)
More informationProof Calculus for Partial Correctness
Proof Calculus for Partial Correctness Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 7, 2016 Bow-Yaw Wang (Academia Sinica) Proof Calculus for Partial Correctness September
More informationLogic. Propositional Logic: Syntax
Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about
More informationAxiomatic Semantics: Verification Conditions. Review of Soundness and Completeness of Axiomatic Semantics. Announcements
Axiomatic Semantics: Verification Conditions Meeting 12, CSCI 5535, Spring 2009 Announcements Homework 4 is due tonight Wed forum: papers on automated testing using symbolic execution 2 Questions? Review
More informationLecture Notes: Axiomatic Semantics and Hoare-style Verification
Lecture Notes: Axiomatic Semantics and Hoare-style Verification 17-355/17-665/17-819O: Program Analysis (Spring 2018) Claire Le Goues and Jonathan Aldrich clegoues@cs.cmu.edu, aldrich@cs.cmu.edu It has
More informationCS256/Winter 2009 Lecture #6. Zohar Manna
CS256/Winter 2009 Lecture #6 Zohar Manna Chapter 1 Invariance: Proof Methods For assertion q and SPL program P show P Õ ¼ q (i.e., q is P-invariant) 6-1 Proving Invariances Definitions Recall: the variables
More informationComputational Logic Lecture 3. Logical Entailment. Michael Genesereth Autumn Logical Reasoning
Computational Logic Lecture 3 Logical Entailment Michael Genesereth Autumn 2010 Logical Reasoning Logical Reasoning relates premises and conclusion does not say whether conclusion is true in general says
More informationSAT-Based Verification with IC3: Foundations and Demands
SAT-Based Verification with IC3: Foundations and Demands Aaron R. Bradley ECEE, CU Boulder & Summit Middle School SAT-Based Verification with IC3:Foundations and Demands 1/55 Induction Foundation of verification
More informationAxiomatic Semantics: Verification Conditions. Review of Soundness of Axiomatic Semantics. Questions? Announcements
Axiomatic Semantics: Verification Conditions Meeting 18, CSCI 5535, Spring 2010 Announcements Homework 6 is due tonight Today s forum: papers on automated testing using symbolic execution Anyone looking
More informationRewriting for Satisfiability Modulo Theories
1 Dipartimento di Informatica Università degli Studi di Verona Verona, Italy July 10, 2010 1 Joint work with Chris Lynch (Department of Mathematics and Computer Science, Clarkson University, NY, USA) and
More informationMid-Semester Quiz Second Semester, 2012
THE AUSTRALIAN NATIONAL UNIVERSITY Mid-Semester Quiz Second Semester, 2012 COMP2600 (Formal Methods for Software Engineering) Writing Period: 1 hour duration Study Period: 10 minutes duration Permitted
More informationInterpolant-based Transition Relation Approximation
Interpolant-based Transition Relation Approximation Ranjit Jhala and K. L. McMillan 1 University of California, San Diego 2 Cadence Berkeley Labs Abstract. In predicate abstraction, exact image computation
More informationFormal Methods in Software Engineering
Formal Methods in Software Engineering An Introduction to Model-Based Analyis and Testing Vesal Vojdani Department of Computer Science University of Tartu Fall 2014 Vesal Vojdani (University of Tartu)
More informationUsing Dynamic Analysis to Generate Disjunctive Invariants
Using Dynamic Analysis to Generate Disjunctive Invariants ABSTRACT ThanhVu Nguyen Computer Science University of New Mexico New Mexico, USA tnguyen@cs.unm.edu Westley Weimer Computer Science University
More informationIntegrating Induction, Deduction and Structure for Synthesis
Integrating Induction, Deduction and Structure for Synthesis Sanjit A. Seshia Associate Professor EECS Department UC Berkeley Students & Postdocs: S. Jha, W.Li, A. Donze, L. Dworkin, B. Brady, D. Holcomb,
More informationAxiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 CSE
Axiomatic Semantics Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 CSE 6341 1 Outline Introduction What are axiomatic semantics? First-order logic & assertions about states Results (triples)
More informationProgram Verification as Probabilistic Inference
Program Verification as Probabilistic Inference Sumit Gulwani Microsoft Research, Redmond sumitg@microsoft.com Nebojsa Jojic Microsoft Research, Redmond jojic@microsoft.com Abstract In this paper, we propose
More informationSoundness and Completeness of Axiomatic Semantics
#1 Soundness and Completeness of Axiomatic Semantics #2 One-Slide Summary A system of axiomatic semantics is sound if everything we can prove is also true: if ` { A } c { B } then ² { A } c { B } We prove
More informationIntegrating Induction and Deduction for Verification and Synthesis
Integrating Induction and Deduction for Verification and Synthesis Sanjit A. Seshia Associate Professor EECS Department UC Berkeley DATE 2013 Tutorial March 18, 2013 Bob s Vision: Exploit Synergies between
More informationClassical Program Logics: Hoare Logic, Weakest Liberal Preconditions
Chapter 1 Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions 1.1 The IMP Language IMP is a programming language with an extensible syntax that was developed in the late 1960s. We will
More informationProgram verification using Hoare Logic¹
Program verification using Hoare Logic¹ Automated Reasoning - Guest Lecture Petros Papapanagiotou Part 2 of 2 ¹Contains material from Mike Gordon s slides: Previously on Hoare Logic A simple while language
More informationAnnouncements. CS243: Discrete Structures. Sequences, Summations, and Cardinality of Infinite Sets. More on Midterm. Midterm.
Announcements CS43: Discrete Structures Sequences, Summations, and Cardinality of Infinite Sets Işıl Dillig Homework is graded, scores on Blackboard Graded HW and sample solutions given at end of this
More informationIC3 and Beyond: Incremental, Inductive Verification
IC3 and Beyond: Incremental, Inductive Verification Aaron R. Bradley ECEE, CU Boulder & Summit Middle School IC3 and Beyond: Incremental, Inductive Verification 1/62 Induction Foundation of verification
More information[read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] General-to-specific ordering over hypotheses
1 CONCEPT LEARNING AND THE GENERAL-TO-SPECIFIC ORDERING [read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] Learning from examples General-to-specific ordering over hypotheses Version spaces and
More informationTHE AUSTRALIAN NATIONAL UNIVERSITY Second Semester COMP2600 (Formal Methods for Software Engineering)
THE AUSTRALIAN NATIONAL UNIVERSITY Second Semester 2012 COMP2600 (Formal Methods for Software Engineering) Writing Period: 3 hours duration Study Period: 15 minutes duration Permitted Materials: One A4
More informationVinter: A Vampire-Based Tool for Interpolation
Vinter: A Vampire-Based Tool for Interpolation Kryštof Hoder 1, Andreas Holzer 2, Laura Kovács 2, and Andrei Voronkov 1 1 University of Manchester 2 TU Vienna Abstract. This paper describes the Vinter
More informationLearning Goals of CS245 Logic and Computation
Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction
More informationBeyond Quantifier-Free Interpolation in Extensions of Presburger Arithmetic
Beyond Quantifier-Free Interpolation in Extensions of Presburger Arithmetic Angelo Brillout, 1 Daniel Kroening, 2 Philipp Rümmer, 3 Thomas Wahl 2 1 ETH Zurich 2 Oxford University 3 Uppsala University Deduction
More informationHoare Logic (I): Axiomatic Semantics and Program Correctness
Hoare Logic (I): Axiomatic Semantics and Program Correctness (Based on [Apt and Olderog 1991; Gries 1981; Hoare 1969; Kleymann 1999; Sethi 199]) Yih-Kuen Tsay Dept. of Information Management National Taiwan
More informationConstraint Solving for Program Verification: Theory and Practice by Example
Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions
More informationPredicate Abstraction: A Tutorial
Predicate Abstraction: A Tutorial Predicate Abstraction Daniel Kroening May 28 2012 Outline Introduction Existential Abstraction Predicate Abstraction for Software Counterexample-Guided Abstraction Refinement
More informationIntroduction to Axiomatic Semantics
#1 Introduction to Axiomatic Semantics #2 How s The Homework Going? Remember that you can t just define a meaning function in terms of itself you must use some fixed point machinery. #3 Observations A
More informationDiscrete Mathematics
Slides for Part IA CST 2015/16 Discrete Mathematics Prof Marcelo Fiore Marcelo.Fiore@cl.cam.ac.uk What are we up to? Learn to read and write, and also work with,
More informationNatural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson
Natural Deduction Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. An example 1. Validity by truth table 2. Validity by proof 2. What s a proof 1. Proof checker 3. Rules of
More informationTableaux, Abduction and Truthlikeness RESEARCH REPORT
Section of Logic and Cognitive Science Institute of Psychology Adam Mickiewicz University in Poznań Mariusz Urbański Tableaux, Abduction and Truthlikeness RESEARCH REPORT Szamarzewskiego 89, 60-589 Poznań,
More informationImplementing Proof Systems for the Intuitionistic Propositional Logic
Implementing Proof Systems for the Intuitionistic Propositional Logic Veronica Zammit Supervisor: Dr. Adrian Francalanza Faculty of ICT University of Malta May 27, 2011 Submitted in partial fulfillment
More informationSymbolic Computation and Theorem Proving in Program Analysis
Symbolic Computation and Theorem Proving in Program Analysis Laura Kovács Chalmers Outline Part 1: Weakest Precondition for Program Analysis and Verification Part 2: Polynomial Invariant Generation (TACAS
More informationOutline. 1. Define likelihood 2. Interpretations of likelihoods 3. Likelihood plots 4. Maximum likelihood 5. Likelihood ratio benchmarks
Outline 1. Define likelihood 2. Interpretations of likelihoods 3. Likelihood plots 4. Maximum likelihood 5. Likelihood ratio benchmarks Likelihood A common and fruitful approach to statistics is to assume
More informationLecture Notes on Quantification
Lecture Notes on Quantification 15-317: Constructive Logic Frank Pfenning Lecture 5 September 8, 2009 1 Introduction In this lecture, we introduce universal and existential quantification As usual, we
More informationHoare Logic: Reasoning About Imperative Programs
Hoare Logic: Reasoning About Imperative Programs COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2018 Programming Paradigms Functional. (Haskell, SML, OCaml,... ) main paradigm:
More informationCSC 7101: Programming Language Structures 1. Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11.
Axiomatic Semantics Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 1 Overview We ll develop proof rules, such as: { I b } S { I } { I } while b do S end { I b } That allow us to verify
More informationAxiomatic Semantics. Hoare s Correctness Triplets Dijkstra s Predicate Transformers
Axiomatic Semantics Hoare s Correctness Triplets Dijkstra s Predicate Transformers Goal of a program = IO Relation Problem Specification Properties satisfied by the input and expected of the output (usually
More informationCISC 876: Kolmogorov Complexity
March 27, 2007 Outline 1 Introduction 2 Definition Incompressibility and Randomness 3 Prefix Complexity Resource-Bounded K-Complexity 4 Incompressibility Method Gödel s Incompleteness Theorem 5 Outline
More informationPropositional Logic: Syntax
Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic
More informationReasoning About Imperative Programs. COS 441 Slides 10b
Reasoning About Imperative Programs COS 441 Slides 10b Last time Hoare Logic: { P } C { Q } Agenda If P is true in the initial state s. And C in state s evaluates to s. Then Q must be true in s. Program
More informationProof Methods for Propositional Logic
Proof Methods for Propositional Logic Logical equivalence Two sentences are logically equivalent iff they are true in the same models: α ß iff α β and β α Russell and Norvig Chapter 7 CS440 Fall 2015 1
More informationUnderstanding IC3. Aaron R. Bradley. ECEE, CU Boulder & Summit Middle School. Understanding IC3 1/55
Understanding IC3 Aaron R. Bradley ECEE, CU Boulder & Summit Middle School Understanding IC3 1/55 Further Reading This presentation is based on Bradley, A. R. Understanding IC3. In SAT, June 2012. http://theory.stanford.edu/~arbrad
More informationLecture Notes on Software Model Checking
15-414: Bug Catching: Automated Program Verification Lecture Notes on Software Model Checking Matt Fredrikson André Platzer Carnegie Mellon University Lecture 19 1 Introduction So far we ve focused on
More informationCOMP2411 Lecture 6: Soundness and Completeness. Reading: Huth and Ryan, Sections 1.4
COMP2411 Lecture 6: Soundness and Completeness Reading: Huth and Ryan, Sections 14 Arithmetic is useful in the world because it is an example of the diagram: symbols - symbolic manipulation -> symbols
More informationLogic. Propositional Logic: Syntax. Wffs
Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about
More informationHoare Logic: Reasoning About Imperative Programs
Hoare Logic: Reasoning About Imperative Programs COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2017 Catch Up / Drop in Lab When Fridays, 15.00-17.00 Where N335, CSIT Building
More informationLogic, Human Logic, and Propositional Logic. Human Logic. Fragments of Information. Conclusions. Foundations of Semantics LING 130 James Pustejovsky
Logic, Human Logic, and Propositional Logic Foundations of Semantics LING 3 James Pustejovsky Human Logic Thanks to Michael Genesereth of Stanford for use of some slides Fragments of Information Conclusions
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method
Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL
More informationIvy: Safety Verification by Interactive Generalization
Ivy: Safety Verification by Interactive Generalization Oded Padon Verification Day 1-June-2016 [PLDI 16] Oded Padon, Kenneth McMillan, Aurojit Panda, Mooly Sagiv, Sharon Shoham. Ivy: Safety Verification
More informationGeometric Quantifier Elimination Heuristics for Automatically Generating Octagonal and Max-plus Invariants
Geometric Quantifier Elimination Heuristics for Automatically Generating Octagonal and Max-plus Invariants Deepak Kapur 1 Zhihai Zhang 2 Matthias Horbach 1 Hengjun Zhao 3 Qi Lu 1 and ThanhVu Nguyen 1 1
More informationSpring 2015 Program Analysis and Verification. Lecture 6: Axiomatic Semantics III. Roman Manevich Ben-Gurion University
Spring 2015 Program Analysis and Verification Lecture 6: Axiomatic Semantics III Roman Manevich Ben-Gurion University Tentative syllabus Semantics Static Analysis Abstract Interpretation fundamentals Analysis
More informationVerification Constraint Problems with Strengthening
Verification Constraint Problems with Strengthening Aaron R. Bradley and Zohar Manna Computer Science Department Stanford University Stanford, CA 94305-9045 {arbrad,manna}@cs.stanford.edu Abstract. The
More informationSpring 2015 Program Analysis and Verification. Lecture 4: Axiomatic Semantics I. Roman Manevich Ben-Gurion University
Spring 2015 Program Analysis and Verification Lecture 4: Axiomatic Semantics I Roman Manevich Ben-Gurion University Agenda Basic concepts of correctness Axiomatic semantics (pages 175-183) Hoare Logic
More informationSpatial Interpolants
Spatial Interpolants Aws Albargouthi 1, Josh Berdine 2, Byron Cook 3, and Zachary Kincaid 4 University of Wisconsin-Madison 1, Microsoft Research 2, University College London 3, University of Toronto 4
More informationThe Eager Approach to SMT. Eager Approach to SMT
The Eager Approach to SMT Sanjit A. Seshia UC Berkeley Slides based on ICCAD 09 Tutorial Eager Approach to SMT Input Formula Satisfiability-preserving Boolean Encoder Boolean Formula SAT Solver SAT Solver
More informationMathematics 114L Spring 2018 D.A. Martin. Mathematical Logic
Mathematics 114L Spring 2018 D.A. Martin Mathematical Logic 1 First-Order Languages. Symbols. All first-order languages we consider will have the following symbols: (i) variables v 1, v 2, v 3,... ; (ii)
More informationBilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft)
Bilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft) Jayadev Misra December 18, 2015 Contents 1 Introduction 3 2 Program and Execution Model 4 2.1 Program Structure..........................
More informationAxiomatic Verification II
Axiomatic Verification II Software Testing and Verification Lecture Notes 18 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Axiomatic Verification II Reasoning about iteration (while loops)
More informationProbabilistic Guarded Commands Mechanized in HOL
Probabilistic Guarded Commands Mechanized in HOL Joe Hurd joe.hurd@comlab.ox.ac.uk Oxford University Joint work with Annabelle McIver (Macquarie University) and Carroll Morgan (University of New South
More informationConstraint Solving for Program Verification: Theory and Practice by Example
Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions
More informationTHE AUSTRALIAN NATIONAL UNIVERSITY Second Semester COMP2600 (Formal Methods for Software Engineering)
THE AUSTRALIAN NATIONAL UNIVERSITY Second Semester 2010 COMP2600 (Formal Methods for Software Engineering) Writing Period: 3 hours duration Study Period: 15 minutes duration Permitted Materials: One A4
More informationICS141: Discrete Mathematics for Computer Science I
ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Jan Stelovsky based on slides by Dr. Baek and Dr. Still Originals by Dr. M. P. Frank and Dr. J.L. Gross Provided by
More informationFirst-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms
First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO
More informationStability and Stabilization of polynomial dynamical systems. Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder
Stability and Stabilization of polynomial dynamical systems Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder Proving Asymptotic Stability: Lyapunov Functions Lyapunov Function:
More informationCS 6110 Lecture 21 The Fixed-Point Theorem 8 March 2013 Lecturer: Andrew Myers. 1 Complete partial orders (CPOs) 2 Least fixed points of functions
CS 6110 Lecture 21 The Fixed-Point Theorem 8 March 2013 Lecturer: Andrew Myers We saw that the semantics of the while command are a fixed point. We also saw that intuitively, the semantics are the limit
More informationCS156: The Calculus of Computation Zohar Manna Autumn 2008
Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)
More informationCSE 331 Software Design & Implementation
CSE 331 Software Design & Implementation Kevin Zatloukal Summer 2017 Lecture 2 Reasoning About Code With Logic (Based on slides by Mike Ernst, Dan Grossman, David Notkin, Hal Perkins, Zach Tatlock) Recall
More informationRefinement of Trace Abstraction
Refinement of Trace Abstraction Matthias Heizmann, Jochen Hoenicke, and Andreas Podelski University of Freiburg, Germany Abstract. We present a new counterexample-guided abstraction refinement scheme.
More informationarxiv: v1 [cs.lo] 29 May 2014
Under consideration for publication in Theory and Practice of Logic Programming 1 arxiv:1405.7739v1 [cs.lo] 29 May 2014 (Quantified) Horn Constraint Solving for Program Verification and Synthesis Andrey
More informationSpring 2016 Program Analysis and Verification. Lecture 3: Axiomatic Semantics I. Roman Manevich Ben-Gurion University
Spring 2016 Program Analysis and Verification Lecture 3: Axiomatic Semantics I Roman Manevich Ben-Gurion University Warm-up exercises 1. Define program state: 2. Define structural semantics configurations:
More informationOn sequent calculi vs natural deductions in logic and computer science
On sequent calculi vs natural deductions in logic and computer science L. Gordeev Uni-Tübingen, Uni-Ghent, PUC-Rio PUC-Rio, Rio de Janeiro, October 13, 2015 1. Sequent calculus (SC): Basics -1- 1. Sequent
More informationCS280, Spring 2004: Final
CS280, Spring 2004: Final 1. [4 points] Which of the following relations on {0, 1, 2, 3} is an equivalence relation. (If it is, explain why. If it isn t, explain why not.) Just saying Yes or No with no
More informationThe Assignment Axiom (Hoare)
The Assignment Axiom (Hoare) Syntax: V := E Semantics: value of V in final state is value of E in initial state Example: X:=X+ (adds one to the value of the variable X) The Assignment Axiom {Q[E/V ]} V
More informationLecture Notes on Loop Variants and Convergence
15-414: Bug Catching: Automated Program Verification Lecture Notes on Loop Variants and Convergence Matt Fredrikson Ruben Martins Carnegie Mellon University Lecture 9 1 Introduction The move to total correctness
More informationScalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa
Scalable and Accurate Verification of Data Flow Systems Cesare Tinelli The University of Iowa Overview AFOSR Supported Research Collaborations NYU (project partner) Chalmers University (research collaborator)
More informationA Termination Checker for Isabelle Hoare Logic
A Termination Checker for Isabelle Hoare Logic Jia Meng 1, Lawrence C. Paulson 2, and Gerwin Klein 3 1 National ICT Australia jia.meng@nicta.com.au 2 Computer Laboratory, University of Cambridge lp15@cam.ac.uk
More informationProperty Checking By Logic Relaxation
Property Checking By Logic Relaxation Eugene Goldberg eu.goldberg@gmail.com arxiv:1601.02742v1 [cs.lo] 12 Jan 2016 Abstract We introduce a new framework for Property Checking (PC) of sequential circuits.
More informationLast Time. Inference Rules
Last Time When program S executes it switches to a different state We need to express assertions on the states of the program S before and after its execution We can do it using a Hoare triple written
More informationMathematical Induction. Defining Functions. Overview. Notation for recursive functions. Base case Sn(0) = 0 S(n) = S(n 1) + n for n > 0
Readings on induction. Mathematical Induction (a) Weiss, Sec. 7.2, page 233 (b) Course slides f lecture and notes recitation. Every criticism from a good man is of value to me. What you hint at generally
More information