1 Proving program termination Lecture 5 · February 4 th, 2008 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A.

Slides:



Advertisements
Similar presentations
Quantified Invariant Generation using an Interpolating Saturation Prover Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Quantified Invariant Generation using an Interpolating Saturation Prover Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
Automated Verification with HIP and SLEEK Asankhaya Sharma.
Semantics Static semantics Dynamic semantics attribute grammars
A System to Generate Test Data and Symbolically Execute Programs Lori A. Clarke September 1976.
SPEED: Precise & Efficient Static Estimation of Symbolic Computational Complexity Sumit Gulwani MSR Redmond TexPoint fonts used in EMF. Read the TexPoint.
A Program Transformation For Faster Goal-Directed Search Akash Lal, Shaz Qadeer Microsoft Research.
Programming Languages and Paradigms
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Lecture #21 Software Model Checking: predicate abstraction Thomas Ball Testing, Verification and Measurement Microsoft Research.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
Automatic Predicate Abstraction of C-Programs T. Ball, R. Majumdar T. Millstein, S. Rajamani.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 19: Minding Ps & Qs: Axiomatic.
ISBN Chapter 3 Describing Syntax and Semantics.
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
1/22 Programs : Semantics and Verification Charngki PSWLAB Programs: Semantics and Verification Mordechai Ben-Ari Mathematical Logic for Computer.
Termination Proofs for Systems Code Andrey Rybalchenko, EPFL/MPI joint work with Byron Cook, MSR and Andreas Podelski, MPI PLDI’2006, Ottawa.
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
1 Predicate Abstraction of ANSI-C Programs using SAT Edmund Clarke Daniel Kroening Natalia Sharygina Karen Yorav (modified by Zaher Andraus for presentation.
Analysis of Software Eric Feron From "Semantic Foundations of Program Analysis" by P. Cousot in "Program Flow Analysis Theory and Applications" Muchnik.
A Numerical Abstract Domain based on Expression Abstraction + Max Operator with Application in Timing Analysis Sumit Gulwani (MSR Redmond) Bhargav Gulavani.
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
Testing an individual module
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Describing Syntax and Semantics
Floyd Hoare Logic. Semantics A programming language specification consists of a syntactic description and a semantic description. Syntactic description:symbols.
Invisible Invariants: Underapproximating to Overapproximate Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
1/25 Pointer Logic Changki PSWLAB Pointer Logic Daniel Kroening and Ofer Strichman Decision Procedure.
Proving termination conditions Name Country, City, University Omer Subasi Turkey, Istanbul, Koc University Anton Dergunov
1 Hardware synthesis 2.0 Byron Cook and Satnam Singh with Ashutosh Gupta, Stephen Magill, Andrey Rybalchenko, Jiri Simsa, and Viktor Vafeiadis TexPoint.
5.3 Machine-Independent Compiler Features
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 14: Numerical Abstractions Roman Manevich Ben-Gurion University.
Program Analysis and Verification Spring 2014 Program Analysis and Verification Lecture 14: Numerical Abstractions Roman Manevich Ben-Gurion University.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
CS 363 Comparative Programming Languages Semantics.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Computer Science School of Computing Clemson University Discrete Math and Reasoning about Software Correctness Joseph E. Hollingsworth
Synthesis, Analysis, and Verification Lecture 05a Lectures: Viktor Kuncak Programs with Data Structures: Assertions for Accesses. Dynamic Allocation.
CSE 425: Data Types I Data and Data Types Data may be more abstract than their representation –E.g., integer (unbounded) vs. 64-bit int (bounded) A language.
Programming Languages and Paradigms Imperative Programming.
Variance Analyses from Invariance Analyses Josh Berdine Microsoft Research, Cambridge Joint work with Aziem Chawdhary, Byron Cook, Dino.
Formal verification of skiplist algorithms Student: Trinh Cong Quy Supervisor: Bengt Jonsson Reviewer: Parosh Abdulla.
Page 1 5/2/2007  Kestrel Technology LLC A Tutorial on Abstract Interpretation as the Theoretical Foundation of CodeHawk  Arnaud Venet Kestrel Technology.
Convergence of Model Checking & Program Analysis Philippe Giabbanelli CMPT 894 – Spring 2008.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Chapter 3 Part II Describing Syntax and Semantics.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 842: Specification and Verification of Reactive Systems Lecture INTRO-Examples: Simple BIR-Lite Examples Copyright 2004, Matt Dwyer, John Hatcliff,
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
Lightweight Support for Magic Wands in an Automatic Verifier Malte Schwerhoff and Alexander J. Summers 10 th July 2015, ECOOP, Prague.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
This Week Lecture on relational semantics Exercises on logic and relations Labs on using Isabelle to do proofs.
Adaptive Shape Analysis Thomas Wies joint work with Josh Berdine Cristiano Calcagno TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
1 Numeric Abstract Domains Mooly Sagiv Tel Aviv University Adapted from Antoine Mine.
Chapter 15: Recursion. Recursive Definitions Recursion: solving a problem by reducing it to smaller versions of itself – Provides a powerful way to solve.
CS 5150 Software Engineering Lecture 21 Reliability 2.
Spring 2017 Program Analysis and Verification
Tutorial: Proving termination and liveness
Shape Analysis Termination Analysis Linear Time
Spring 2016 Program Analysis and Verification
September 4, 1997 Programming Languages (CS 550) Lecture 6 Summary Operational Semantics of Scheme using Substitution Jeremy R. Johnson TexPoint fonts.
PDAs Accept Context-Free Languages
Automatic Verification
Over-Approximating Boolean Programs with Unbounded Thread Creation
Radu Rugina and Martin Rinard Laboratory for Computer Science
Presentation transcript:

1 Proving program termination Lecture 5 · February 4 th, 2008 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A

2 Notes No new homework for now Remember: no class next week

3 Review Proving termination of mathematical relations  Program termination = WF transition relation  Subrelations of WF-relations are WF-relations  Proving WF can be reduced to finding a larger ranking relation  Accurate transition relations often too hard to compute  Supporting invariants needed to establish termination  Unions of WF-relations not WF, but transitive closure can be used to offset the problem  Local termination lemmas useful when proving structured relations WF

4 Review Synthesis for mathematical relations  Linear ranking functions ranging over simple types (i.e. not the ordinals) can be reliably synthesized for certain classes of relations  Synthesis is possible for more complex settings, but not very reliable

5 Review But what about programs?

6 Review But what about programs? Complex control-flow graphs (e.g., gotos, nested loops, etc) Procedures and recursion Arrays and pointers Dynamically allocated (and deallocated) memory Concurrency

7 Review But what about programs? Complex control-flow graphs (e.g., gotos, nested loops, etc) Procedures and recursion Arrays and pointers Dynamically allocated (and deallocated) memory Concurrency

8 Today Today: Programs and existing tools for proving invariance/safety

9 Today Today: Programs and existing tools for proving invariance/safety

10 Programs

11 Programs

12 Programs

13 Programs

14 Programs

15 Programs

16 Programs

17 Programs

18 Programs

19 Programs

20 Programs

21 Programs

22 Programs

23 Programs

24 Programs

25 Programs

26 Programs

27 Programs

28 Programs

29 Programs

30 Programs

31 Programs

32 Programs

33 Verification and analysis tools for invariance Great progress has been made in the last 5 years in tools for proving invariance properties of programs Automatic invariance analysis  Not property driven  Facts derived from a given abstract domain  Termination (of the tool) usually guaranteed Automatic invariance verification  Usually property driven  Termination (of the tool) not guaranteed Today: a very operational summary of some example tools

34 Verification and analysis tools for invariance Great progress has been made in the last 5 years in tools for proving invariance properties of programs Automatic invariance analysis  Not property driven  Facts derived from a given abstract domain  Termination (of the tool) usually guaranteed Automatic invariance verification  Usually property driven  Termination (of the tool) not guaranteed Today: a very operational summary of some example tools

35 Invariance analysis

36 Invariance analysis

37 Invariance analysis

38 Invariance analysis

39 Invariance analysis

40 Invariance analysis

41 Invariance analysis

42 Invariance analysis

43 Invariance analysis

44 Invariance analysis

45 Invariance analysis

46 Invariance analysis

47 Invariance analysis

48 Invariance analysis

49 Invariance analysis

50 Invariance analysis

51 Abstract domains Provide standard operations  Assign, assume,  Emptiness check  Abstract version of union, intersect  Widening, narrowing Popular domain: Octagon represents convex sets expressed as conjunction of two variable inequalities with unit co-effecients Implementation based on difference bound matrices

52 Abstract domains Provide standard operations  Assign, assume,  Emptiness check  Abstract version of union, intersect  Widening, narrowing Popular domain: Octagon represents convex sets expressed as conjunction of two variable inequalities with unit co-effecients Implementation based on difference bound matrices

53 Abstract domains Provide standard operations  Assign, assume,  Emptiness check  Abstract version of union, intersect  Widening, narrowing Popular domain: Octagon represents convex sets expressed as conjunction of two variable inequalities with unit co-effecients Implementation based on difference bound matrices

54 Abstract domains Provide standard operations  Assign, assume,  Emptiness check  Abstract version of union, intersect  Widening, narrowing Popular domain: Octagon represents convex sets expressed as conjunction of two variable inequalities with unit co-effecients Implementation based on difference bound matrices

55 Abstract domains Provide standard operations  Assign, assume,  Emptiness check  Abstract version of union, intersect  Widening, narrowing Popular domain: Octagon represents convex sets expressed as conjunction of two variable inequalities with unit co-effecients Implementation based on difference bound matrices

56 Abstract domains Provide standard operations  Assign, assume,  Emptiness check  Abstract version of union, intersect  Widening, narrowing Popular domain: Octagon represents convex sets expressed as conjunction of two variable inequalities with unit co-effecients Implementation based on difference bound matrices

57 Verification and analysis tools for invariance Great progress has been made in the last 5 years in tools for proving invariance properties of programs Automatic invariance analysis  Not property driven  Facts derived from a given abstract domain  Termination (of the tool) usually guaranteed Automatic invariance verification  Usually property driven  Termination (of the tool) not guaranteed Today: a very operational summary of some example tools

58 Verification and analysis tools for invariance Great progress has been made in the last 5 years in tools for proving invariance properties of programs Automatic invariance analysis  Not property driven  Facts derived from a given abstract domain  Termination (of the tool) usually guaranteed Automatic invariance verification  Usually property driven  Termination (of the tool) not guaranteed Today: a very operational summary of some example tools

59 Invariance verification for invariance

60 Invariance verification for invariance

61 Symbolic execution based on decision procedure SLAM Driver passes rule Rule violation found Rule Example: SLAM Refine Step Abstract Step Check Step Instrumen t Step Construction of abstract programs w/ WPs for commands and a decision procedure Reachability for abstract programs Code

62 Example: SLAM

63 Example: SLAM

64 Example: SLAM

65 Example: SLAM

66 Example: SLAM

67 Example: SLAM

68 Example: SLAM

69 Example: SLAM

70 Example: SLAM

71 Example: SLAM

72 Example: SLAM

73 Example: SLAM

74 Example: SLAM

75 Example: SLAM

76 Example: SLAM

77 Example: SLAM

78 Example: SLAM

79 Example: SLAM

80 Example: SLAM

81 Example: SLAM

82 Example: SLAM

83 Example: SLAM

84 Example: SLAM

85 Example: SLAM

86 Example: SLAM

87 Example: SLAM

88 Example: SLAM

89 Verification and analysis tools for invariance Great progress has been made in the last 5 years in tools for proving invariance properties of programs Automatic invariance analysis  Not property driven  Facts derived from a given abstract domain  Termination (of the tool) usually guaranteed Automatic invariance verification  Usually property driven  Termination (of the tool) not guaranteed Today: a very operational summary of some example tools

90 Verification and analysis tools for invariance Great progress has been made in the last 5 years in tools for proving invariance properties of programs Automatic invariance analysis  Not property driven  Facts derived from a given abstract domain  Termination (of the tool) usually guaranteed Automatic invariance verification  Usually property driven  Termination (of the tool) not guaranteed Today: a very operational summary of some example tools