using and building an automatic program verifier
Download
Skip this Video
Download Presentation
Using and Building an Automatic Program Verifier

Loading in 2 Seconds...

play fullscreen
1 / 12

Using and Building an Automatic Program Verifier - PowerPoint PPT Presentation


  • 140 Views
  • Uploaded on

Using and Building an Automatic Program Verifier. K. Rustan M. Leino Research in Software Engineering ( RiSE ) Microsoft Research, Redmond. Lecture 0 Marktoberdorf Summer School 2011 Bayrischzell , BY, Germany 4 August 2011. Reasoning about programs. Central to any programming task

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Using and Building an Automatic Program Verifier' - diallo


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
using and building an automatic program verifier

Using and Building an Automatic Program Verifier

K. Rustan M. Leino

Research in Software Engineering (RiSE)

Microsoft Research, Redmond

Lecture 0

Marktoberdorf Summer School 2011

Bayrischzell, BY, Germany

4 August 2011

reasoning about programs
Reasoning about programs
  • Central to any programming task
    • From safety critical applications to scripting
    • From initial development to maintenance to debugging
  • Minimizes faults, security problems, time/cost to market
  • Thinking skill
program verifier
Program verifier
  • A verification tool can be used
    • to establish the correctness of a program
    • as a vehicle for learning to reason about programs
program verification
Program verification

hand proofs (or hand waving)

traditional mechanical program verification

Dafnyand others

functional correctness

assurance level

extended static checking

limited checking

human effort

automaticdecisionprocedures

(SMT solvers)

interactiveproof assistants

no

machine assistance

technology:

dafny
Dafny
  • Object-based language
    • generic classes, no subclassing
    • object references, dynamic allocation
    • sequential control
  • Built-in specifications
    • pre- and postconditions
    • framing
    • loop invariants, inline assertions
    • termination
  • Specification support
    • Sets, sequences, inductive datatypes, …
    • User-defined recursive functions
    • Ghost variables
basics assert ensures bvd assume requires call testing specs debugging specs

Basics(assert, ensures, BVD, assume, requires, call, testing specs, debugging specs)

demo

Swap (parameters, globals, fields)

when do tools kick in
When do tools kick in?
  • Run time
  • Compile time
  • Design time

 closer to the time of program construction

reasoning about loops
Reasoning about loops
  • A loop invariant
    • holds at the top of every iteration
    • is the only thing the verifier remembers from one iteration to another (about the variables being modified)

while (B){ S;}

Loop invariant holds here

loops

Loops

demo

Iterative Fibonacci, Binary Search

exercises
Exercises
  • Cubes
    • http://rise4fun.com/Dafny/Qch
  • Cubes, recursive
    • http://rise4fun.com/Dafny/6xO
links
Links
  • Dafny
    • research.microsoft.com/dafny
  • rise4fun
    • rise4fun.com
  • Verification Corner
    • research.microsoft.com/verificationcorner
ad