Program Verification Using

Slides:



Advertisements
Similar presentations
Demand-driven inference of loop invariants in a theorem prover
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Static Contract Checking for Haskell Dana N. Xu University of Cambridge Ph.D. Supervisor: Simon Peyton Jones Microsoft Research Cambridge.
Acceptance Testing.
Catching Bugs in Software Rajeev Alur Systems Design Research Lab University of Pennsylvania
Automated Verification with HIP and SLEEK Asankhaya Sharma.
Proofs and Programs Wei Hu 11/01/2007. Outline  Motivation  Theory  Lambda calculus  Curry-Howard Isomorphism  Dependent types  Practice  Coq Wei.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Working with Discourse Representation Theory Patrick Blackburn & Johan Bos Lecture 3 DRT and Inference.
Software Engineering & Automated Deduction Willem Visser Stellenbosch University With Nikolaj Bjorner (Microsoft Research, Redmond) Natarajan Shankar (SRI.
1 Dependent Types for Termination Verification Hongwei Xi University of Cincinnati.
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Automated and Modular Refinement Reasoning for Concurrent Programs Collaborators: Chris Hawblitzel (Microsoft) Erez Petrank (Technion) Serdar Tasiran (Koc.
Functional Design and Programming Lecture 11: Functional reasoning.
Technology from seed Weakest Precondition Synthesis for Compiler Optimizations Nuno Lopes and José Monteiro.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
Technology from seed Automatic Synthesis of Weakest Preconditions for Compiler Optimizations Nuno Lopes Advisor: José Monteiro.
VeriML: Revisiting the Foundations of Proof Assistants Zhong Shao Yale University MacQueen Fest May 13, 2012 (Joint work with Antonis Stampoulis)
The Design and Implementation of a Certifying Compiler [Necula, Lee] A Certifying Compiler for Java [Necula, Lee et al] David W. Hill CSCI
An Integration of Program Analysis and Automated Theorem Proving Bill J. Ellis & Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond, WA part 0 International Summer School Marktoberdorf Marktoberdorf,
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
Chapter 4: Security Policies Overview The nature of policies What they cover Policy languages The nature of mechanisms Types Secure vs. precise Underlying.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer (Nadia Polikarpova) Verification tools.
VIDE Integrated Environment for Development and Verification of Programs.
K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond, WA part 0 Summer School on Logic and Theorem-Proving in Programming.
Using and Building an Automatic Program Verifier K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond Lecture 0 LASER.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
From last time S1: l := new Cons p := l S2: t := new Cons *p := t p := t l p S1 l p tS2 l p S1 t S2 l t S1 p S2 l t S1 p S2 l t S1 p L2 l t S1 p S2 l t.
Chair of Software Engineering Automatic Verification of Computer Programs.
Have Your Verified Compiler And Extend It Too Zachary Tatlock Sorin Lerner UC San Diego.
VeriML DARPA CRASH Project Progress Report Antonis Stampoulis October 5 th, 2012 A language-based, dependently-typed, user-extensible approach to proof.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
Introduction to Our Research on Certifying Compiler Zhaopeng Li (In Chinese: 李兆鹏 ) Certifying Compiler Group USTC-Yale Joint.
An overview of Coq Xinyu Feng USTC Erasmus Mundus NordSecMob Scholar at DTU.
Page 1 Advanced Technology Center HCSS 03 – April 2003 vFaat: von Neumann Formal Analysis and Annotation Tool David Greve Dr. Matthew Wilding Rockwell.
Certifying Intermediate Programming Zhaopeng Li
Using and Building an Automatic Program Verifier K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond Lecture 0 Marktoberdorf.
Safe to the Last Instruction: Automated Verification of a Type-Safe Operating System Jean Yang MIT CSAIL Chris Hawblitzel Microsoft Research.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Formal Verification – Robust and Efficient Code 1 iCSC2016, Kim Albertsson, LTU Formal Verification – Robust and Efficient Code Lecture 2 Why FV? Kim Albertsson.
Formal Verification – Robust and Efficient Code Lecture 1
Mostly-Automated Verification of Low-Level Programs in Computational Separation Logic Adam Chlipala Harvard University PLDI 2011.
1 Interactive Computer Theorem Proving CS294-9 October 19, 2006 Adam Chlipala UC Berkeley Lecture 9: Beyond Primitive Recursion.
Dafny An automatic program verifier for functional correctness
Types for Programs and Proofs
Formal Methods in Software Engineering 1
Automating Induction for Solving Horn Clauses
B (The language of B-Method )
A Verified DSL for MPC in
Advanced Compilation and Automatic Programming
Lecture 5 Floyd-Hoare Style Verification
TS*: Taming the Un-typed Adversary in JavaScript
Programming Languages 2nd edition Tucker and Noonan
Knowledge Inference for Optimizing Secure Multi-party Computation
An overview of Coq Xinyu Feng USTC.
Hoare-style program verification
Dafny An automatic program verifier for functional correctness
Mathematical Reasoning
Sub-system interfaces
Algorithms CSCI 235, Spring 2019 Lecture 37 The Halting Problem
Programming Languages 2nd edition Tucker and Noonan
Carmine Abate Rob Blanco Deepak Garg Cătălin Hrițcu Jérémy Thibault
Microsoft Research /29/2019 2:24 AM
Rich Model Toolkit – An Infrastructure for Reliable Computer Systems
Static Contract Checking for Haskell
An overview of Coq.
Presentation transcript:

Program Verification Using Aseem Rastogi Microsoft Research Winter School in Software Engineering 2017

One Request Please Ask Questions!!

Software is Everywhere

Cost of Software Bugs is High

Cost of Software Bugs is High We need more reliable and secure software

Assuring Software Quality Today Software Testing

Program Verification Correct-by-construction Software Use a program verifier, proof assistant, theorem prover for dev. Formally prove properties of the program during development (spec: sort returns a sorted list) let sort l = …

Development Process Program Specs Extract code to a language such as OCaml or C Compile to executable Program Formally prove that the program meets the specifications (F*/Dafny/Coq) Specs Also within the tool Prove absence of bugs rather than that the program runs successfully on certain inputs

Success Stories of Program Verification The CompCert C compiler Formally verified C compiler written in Coq Operating system kernels Verve (Boogie), seL4 (Isabelle), CertiKOS (Coq) Software stack IronClad (Dafny) (Mathematical proofs such as the proof of the 4-color theorem)

Congrats, But Does It Help? Finding and Understanding Bugs in C Compilers Yang et al. PLDI’11 Wrong-code errors in GCC: 79, LLVM: 202, CompCert: … IronClad Apps: End-to-End Security via Automated Full-System Verification Hawblitzel et al. Usenix Security’14 “Almost all the code ran correctly the first time we tried!”**

Very Cool! Tell Me More! This Tutorial 25-75 split between theory and practice Theory: Hoare logic, weakest preconditions Practice: Prove correctness of mergesort in F* It is very important that you have a working F* installation (including the emacs plugin) If not, shout now! Program Formally prove that the program meets the specifications Specs

What is F* http://www.fstar-lang.org A framework for verifying functional programs Effectful functional programs (we will cover very little of the effectful parts though) Advanced type system Specifications are written in the types Semi-automated Uses an SMT solver at the backend to discharge proof obligation Extracts to OCaml† https://github.com/FStarLang/FStar

F* Team Microsoft Research, INRIA Paris, MIT, Univ. of Edinburgh, … (A non-exhaustive list of people) Danel Ahman Benjamin Beurdouche Karthikeyan Bhargavan Antoine Delignat-Lavaud Victor Dumitrescu Cédric Fournet Cătălin Hriţcu Markulf Kohlweiss Qunyan Magnus Kenji Maillard Asher Manning Guido Martínez Zoe Paraskevopoulou Clément Pit-Claudel Jonathan Protzenko Tahina Ramananandro Aseem Rastogi Nikhil Swamy Christoph M. Wintersteiger Santiago Zanella-Béguelin

A First Taste Factorial program let rec factorial n = if n = 0 then 1 else n * factorial (n – 1) What have we verified: -- The function has no side effects -- The function always terminates -- The function always returns a natural number val factorial: nat -> nat $ fstar.exe Test.fst Verified module: Test (546 milliseconds) All verification conditions discharged successfully

Behind the Scenes F* builds a Verification Condition for the program And passes the VC to Z3 to check for validity If Z3 succeeds, then the program meets the spec Guaranteed by the proven (not mechanized) metatheory of F*

Applications of F* The F* compiler is written in F*! Everest Project (https://project-everest.github.io/) Aims to build and deploy a verified HTTPS stack Ongoing effort Verified Cryptographic Libraries Shipping as part of Firefox 57 Wys*: Verified DSL for Secure Multi-party Computation As a proof assistant: for several calculi, including a fragment of F*