Object-Oriented Software: Specification and Verification

Slide Note
Embed
Share

This resource delves into theory, techniques, and architectures for verifying object-oriented software, focusing on a basic program verifier for dynamically allocated objects. It covers specification styles, verification conditions, modeling execution traces, states, and commands in a variety of languages like Spec#, Java, ML, Haskell, and more. The content explores verification architectures using tools like Dafny, Boogie, and SMT solvers, emphasizing correctness and error detection.


Uploaded on Sep 30, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Specification and Verification of Object-Oriented Software K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond, WA part 0 International Summer School Marktoberdorf Marktoberdorf, Germany 6 August 2008

  2. Contents Theory and techniques for building a basic program verifier for a language with references to dynamically allocated objects A specification style and encoding thereof

  3. Motivation: Spec# demo

  4. Basic verifier architecture Source language Intermediate verification language Verification condition (logical formula)

  5. Verification architecture Spec# Dafny C C Spec# compiler Dafny verifier HAVOC vcc MSIL Bytecode translator Static program verifier (Boogie) Inference engine Boogie V.C. generator verification condition SMT solver (Z3) correct or list of errors

  6. Modeling execution traces terminates diverges goes wrong

  7. States and execution traces State Cartesian product of variables Execution trace Nonempty finite sequence of states Infinite sequence of states Nonempty finite sequence of states followed by special error state (x: int, y: int, z: bool)

  8. Commands A command describes a set of execution traces A command is deterministic if it describes at most one trace from every initial state Spec#, sequential Java, ML, Haskell otherwise, it is nondeterministic C, Modula-3, Erlang, Occam A command is total if it describes at least one trace from every initial state Dijkstra sLaw of the Excluded Miracle otherwise, it is partial Juno-2, LIM, Boogie Note, example languages do not necessarily fall squarely into the shown category.

  9. Command language x := E x := x + 1 assert P P P assume P x := 10 P havoc x Solid lines indicate traces whose length is 1 Dotted lines indicate traces whose length may be greater than 1

  10. Command language x := E x := x + 1 assert P P P assume P x := 10 P havoc x S ; T Solid lines indicate traces whose length is 1 Dotted lines indicate traces whose length may be greater than 1

  11. Command language x := E x := x + 1 assert P P P assume P x := 10 P havoc x S T S ; T Solid lines indicate traces whose length is 1 Dotted lines indicate traces whose length may be greater than 1

Related


More Related Content