Weak Arithmetic Completeness of Object-Oriented First-Order Assertion Networks 1 28-01-2013 Stijn de Gouw, Frank S. de Boer, Richard Bubel, Wolfgang Ahrendt.

Slides:



Advertisements
Similar presentations
Functional Decompositions for Hardware Verification With a few speculations on formal methods for embedded systems Ken McMillan.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 12.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 10.
Software Model Checking with SMT Ken McMillan Microsoft Research TexPoint fonts used in EMF: A A A A A.
Synthesis, Analysis, and Verification Lecture 04c Lectures: Viktor Kuncak VC Generation for Programs with Data Structures “Beyond Integers”
ICE1341 Programming Languages Spring 2005 Lecture #6 Lecture #6 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 19: Minding Ps & Qs: Axiomatic.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
ISBN Chapter 3 Describing Syntax and Semantics.
Dynamic semantics Precisely specify the meanings of programs. Why? –programmers need to understand the meanings of programs they read –programmers need.
Simple Example {i = 0} j := i * i {j < 100} Can we ‘verify’ this triple? Only if we know the semantics of assignment.
Copyright © 2006 Addison-Wesley. All rights reserved. 3.5 Dynamic Semantics Meanings of expressions, statements, and program units Static semantics – type.
1 Discrete Structures Lecture 29 Predicates and Programming Read Ch
Predicate Transformers
1/22 Programs : Semantics and Verification Charngki PSWLAB Programs: Semantics and Verification Mordechai Ben-Ari Mathematical Logic for Computer.
ESC Java. Static Analysis Spectrum Power Cost Type checking Data-flow analysis Model checking Program verification AutomatedManual ESC.
Axiomatic Semantics Dr. M Al-Mulhem ICS
Computing Fundamentals 1 Lecture 1 Lecturer: Patrick Browne Room K308 Based on Chapter 1. A Logical approach to Discrete.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
PSUCS322 HM 1 Languages and Compiler Design II Formal Semantics Material provided by Prof. Jingke Li Stolen with pride and modified by Herb Mayer PSU Spring.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Software Verification Bertrand Meyer Chair of Software Engineering Lecture 2: Axiomatic semantics.
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Describing Syntax and Semantics
Invisible Invariants: Underapproximating to Overapproximate Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
Proving Program Correctness The Axiomatic Approach.
Proving Program Correctness The Axiomatic Approach.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Crowfoot: a verifier for higher order store programs Billiejoe (Nathaniel) Charlton Ben Horsfall Bernhard Reus University of Sussex VMCAI 2012.
Pre/Post Condition Logic 03/06/2013. Agenda Hoare’s Logic Overview Application to Pre/Post Conditions.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
1 Inference Rules and Proofs (Z); Program Specification and Verification Inference Rules and Proofs (Z); Program Specification and Verification.
1 Formal Semantics of Programming Languages “Program testing can be used to show the presence of bugs, but never to show their absence!” --Dijkstra.
Checking Reachability using Matching Logic Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
Course Overview and Road Map Computability and Logic.
Logical Reasoning:Proof Prove the theorem using the basic axioms of algebra.
Semantics In Text: Chapter 3.
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
COP4020 Programming Languages Introduction to Axiomatic Semantics Prof. Robert van Engelen.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
From Hoare Logic to Matching Logic Reachability Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
1 Use graphs and not pure logic Variables represented by nodes and dependencies by edges. Common in our language: “threads of thoughts”, “lines of reasoning”,
Principle of Programming Lanugages 3: Compilation of statements Statements in C Assertion Hoare logic Department of Information Science and Engineering.
All-Path Reachability Logic Andrei Stefanescu 1, Stefan Ciobaca 2, Radu Mereuta 1,2, Brandon Moore 1, Traian Serbanuta 3, Grigore Rosu 1 1 University of.
Quantified Data Automata on Skinny Trees: an Abstract Domain for Lists Pranav Garg 1, P. Madhusudan 1 and Gennaro Parlato 2 1 University of Illinois at.
1 Section 8.2 Program Correctness (for imperative programs) A theory of program correctness needs wffs, axioms, and inference rules. Wffs (called Hoare.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
June 21, Reasoning about explicit strictness in a lazy language using mixed lazy/strict semantics Marko van Eekelen Maarten de Mol Nijmegen University,
Formal Methods in Software Engineering 1
Ontology.
Mathematical Structures for Computer Science Chapter 1
Lecture 5 Floyd-Hoare Style Verification
Programming Languages and Compilers (CS 421)
Programming Languages 2nd edition Tucker and Noonan
Number Properties Magic Book Foldable
Logic for Computer Security Protocols
Ontology.
Predicate Transformers
Formal Methods in software development
Towards a Unified Theory of Operational and Axiomatic Semantics
OBJ first-order functional language based on equational logic
Program correctness Axiomatic semantics
Lecture 2: Axiomatic semantics
Programming Languages and Compilers (CS 421)
Programming Languages 2nd edition Tucker and Noonan
COP4020 Programming Languages
Presentation transcript:

Weak Arithmetic Completeness of Object-Oriented First-Order Assertion Networks Stijn de Gouw, Frank S. de Boer, Richard Bubel, Wolfgang Ahrendt

Completeness: Hoare Logic Example Hoare triple: {x=0} x := x+3 {x>0} Completeness if S |= {p} Stmt {q} then {p} Stmt {q} is provable 1.Proof system (rules + axioms) for statements 2.Proof system (rules + axioms) for assertions 3.Expressiveness : strongest postcondition (in the example: x=3) 2

Existing Res u l t s Harel: completeness for arithmetical structures (incl. finite ADTs) Assertion language: first-order, addition and multiplication Tucker & Zucker: completeness for arbitrary structures Assertion language: (weak) second-order Apt: decidable assertions suffice, but only with auxiliary variables 2

Our result 3 z.val := 2

Arrays as Objects 4 Semantics: many-sorted structure S = (N, D 1, …, D n, I) where I(op) is a function/relation and op is a function/relation symbol

Proof sketch of our result Uniform instrumentation with auxiliary variables For each computation step, record if and how the state changes Example: field assignment e.x := e’. Add array variables pc[i] = j if line j was executed in i-th computation step x’’[i]=true if in the i-th step, the field x of some object was changed x’[i]= if in the i-th step, the value v was assigned to field x of object o j: pc[|pc|] := j; x’[|pc] := ; e.x := e’; x’’[|pc|] := true; |pc| := |pc| + 1 Instrumentation allows ‘recovering’ computation in an assertion, and consequently can define ‘reachable states’ 5

Conclusion Express heap properties with auxiliary variables, only Presburger needed (decidable) Uniform instrumentation, but ‘heavy’: can do better in special cases (example) KeY Java theorem prover available, reasoning of object creation at abstraction level of prog language: 6