Introduction to Our Research on Certifying Compiler Zhaopeng Li (In Chinese: 李兆鹏 ) Certifying Compiler Group USTC-Yale Joint.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
A Translation from Typed Assembly Language to Certified Assembly Programming Zhong Shao Yale University Joint work with Zhaozhong Ni Paper URL:
Automated Verification with HIP and SLEEK Asankhaya Sharma.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Introduction to Assembly language
……+(4n-3) = n(2n-1) P 1 = 1(2(1)-1)=1 check.
Assembly Code Verification Using Model Checking Hao XIAO Singapore University of Technology and Design.
Automated Soundness Proofs for Dataflow Analyses and Transformations via Local Rules Sorin Lerner* Todd Millstein** Erika Rice* Craig Chambers* * University.
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
Code-Carrying Proofs Aytekin Vargun Rensselaer Polytechnic Institute.
Modular Verification of Concurrent Assembly Code with Dynamic Thread Creation and Termination Xinyu Feng Yale University Joint work with Zhong Shao.
Case Study: Using PVS to Analyze Security Protocols Kyle Taylor.
Proof-system search ( ` ) Interpretation search ( ² ) Main search strategy DPLL Backtracking Incremental SAT Natural deduction Sequents Resolution Main.
May 1, 2003May 1, Imperative Programming with Dependent Types Hongwei Xi Boston University.
Automatically Proving the Correctness of Compiler Optimizations Sorin Lerner Todd Millstein Craig Chambers University of Washington.
Facilitating Program Verification with Dependent Types Hongwei Xi Boston University.
Typed Memory Management in a Calculus of Capabilities David Walker (with Karl Crary and Greg Morrisett)
1 A Dependently Typed Assembly Language Hongwei Xi University of Cincinnati and Robert Harper Carnegie Mellon University.
An Open Framework for Foundational Proof-Carrying Code Xinyu Feng Yale University Joint work with Zhaozhong Ni (Yale, now at MSR), Zhong Shao (Yale) and.
Modular Verification of Assembly Code with Stack-Based Control Abstractions Xinyu Feng Yale University Joint work with Zhong Shao, Alexander Vaynberg,
Language-Based Security Proof-Carrying Code Greg Morrisett Cornell University Thanks to G.Necula & P.Lee.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
Validating High-Level Synthesis Sudipta Kundu, Sorin Lerner, Rajesh Gupta Department of Computer Science and Engineering, University of California, San.
A Type System for Expressive Security Policies David Walker Cornell University.
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.
Review: forward E { P } { P && E } TF { P && ! E } { P 1 } { P 2 } { P 1 || P 2 } x = E { P } { \exists … }
Review: forward E { P } { P && E } TF { P && ! E } { P 1 } { P 2 } { P 1 || P 2 } x = E { P } { \exists … }
Provably Correct Compilers (Part 2) Nazrul Alam and Krishnaprasad Vikram April 21, 2005.
Automatically Checking the Correctness of Program Analyses and Transformations.
CS2422 Assembly Language and System Programming High-Level Language Interface Department of Computer Science National Tsing Hua University.
CS2422 Assembly Language & System Programming November 7, 2006.
Model Checking for Embedded Systems Edmund Clarke, CMU High-Confidence Embedded Systems Workshop, May 1 st.
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.
Constraint-based Invariant Inference. Invariants Dictionary Meaning: A function, quantity, or property which remains unchanged Property (in our context):
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
Proof-Carrying Code & Proof-Carrying Authentication Stuart Pickard CSCI 297 June 2, 2005.
Report on Project CComp Zhaopeng Li Joint work with Prof. Yiyun Chen, Zhong Zhuang, Simin Yang, Dawei Fan, Zhenting Zhang Software Security Lab., USTC,
1 MVD 2010 University of Iowa New York University Comparing Proof Systems for Linear Real Arithmetic Using LFSC Andrew Reynolds September 17, 2010.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
An overview of Coq Xinyu Feng USTC Erasmus Mundus NordSecMob Scholar at DTU.
© Andrew IrelandDependable Systems Group On the Scalability of Proof Carrying Code for Software Certification Andrew Ireland School of Mathematical & Computer.
A Certifying Compiler and Pointer Logic Zhaopeng Li Software Security Lab. Department of Computer Science and Technology, University of Science and Technology.
Logic in Computer Science - Overview Sep 1, 2009 박성우.
Certifying Intermediate Programming Zhaopeng Li
Secure Compiler Seminar 4/11 Visions toward a Secure Compiler Toshihiro YOSHINO (D1, Yonezawa Lab.)
Tool Support for proof Engineering Anne Mulhern Computer Sciences Department University of Wisconsin-Madison Madison, WI USA
Author: Alex Groce, Daniel Kroening, and Flavio Lerda Computer Science Department, Carnegie Mellon University Pittsburgh, PA Source: R. Alur and.
Verification & Validation By: Amir Masoud Gharehbaghi
Automated tactics for separation logic VeriML Reconstruct Z3 Proof Safe incremental type checker Certifying code transformation Proof carrying hardware.
Services of the Formal Digital Library (FDL) NA-MKM 2004 January 6, 2004 Lori Lorigo, Cornell University.
DPLL in Coq Zhuang Zhong Overview  Previous work  Stålmarck algorithm and Binary Decision Diagram  Produce traces of proof  Reconstruct.
SAFE KERNEL EXTENSIONS WITHOUT RUN-TIME CHECKING George C. Necula Peter Lee Carnegie Mellon U.
Proof-Carrying Code: A Language-Based Security Approach Thao Doan Wei Hu Liqian Luo Jinlin Yang CS851 Malware 11/16/2004.
Student: Shaobo He, Advisor: Zvonimir Rakamarić TOWARDS AUTOMATED DIFFERENTIAL PROGRAM VERIFICATION FOR APPROXIMATE COMPUTING.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
Integrating Math Units and Proof Checking for Specification and Verification SAVCBS Workshop 2008 SIGSOFT 2008 / FSE 16 November 9th, 2008 Hampton Smith.
Overview of Back-end for CComp Zhaopeng Li Software Security Lab. June 8, 2009.
Certifying and Synthesizing Membership Equational Proofs Patrick Lincoln (SRI) joint work with Steven Eker (SRI), Jose Meseguer (Urbana) and Grigore Rosu.
Mostly-Automated Verification of Low-Level Programs in Computational Separation Logic Adam Chlipala Harvard University PLDI 2011.
Introduction to Compilers Tim Teitelbaum
Program Verification Using
Lifting Propositional Interpolants to the Word-Level
An overview of Coq Xinyu Feng USTC.
Compilers have many bugs
Monadic Coq Compiler Lef Ioannidis
Follow-up of MoU objectives
An overview of Coq.
Presentation transcript:

Introduction to Our Research on Certifying Compiler Zhaopeng Li (In Chinese: 李兆鹏 ) Certifying Compiler Group USTC-Yale Joint Research Center September 4, 2009

Outline

Goal of Our Center Building Certified System Software Verification Framework Language: x86/MIPS assembly Lang. Logic: domain-specific logics Proof: developed in Coq manually Verification Framework Language: x86/MIPS assembly Lang. Logic: domain-specific logics Proof: developed in Coq manually Methodology! Shortcoming: Development under this framework is costly.

Motivation Lift the verification framework to source-level. ★ productivity ★ user-friendly Generate proof by automated theorem prover. ★ automation ★ support proof-carrying code

Motivation (cont.) Compcert [Xavier Leroy et al.] ★ a Certified C Compiler ★ Realistic (Optimization) Compcert [Xavier Leroy et al.] ★ a Certified C Compiler ★ Realistic (Optimization) Compcert C Code Assembly Code Proof Difference from a certified compiler? Difference from a certified compiler? Specifications

Previous Work Pointer Logic Certifying Compiler Pointer Logic Certifying Compiler Annotated C Code Annotated C Code Annotated x86 Assembly Code Proof Front-end VCGen Proof assistant Coq Proof-Gen Back-end VC Proof Pointer Logic Certifying Compiler Lang.:Subset of C Logic : Pointer Logic Manual Proof in Coq

Previous Work (cont.) Prototype I : a Certifying Compiler Language: PointerC (subset of C) Logic: Pointer Logic (long access path, alias inference) Supported data structures (circular) singly-linked list (circular) doubly-linked list tree

On-going Work /*n>0 | emp*/ struct list* list_create(int n) { … while(n>0) /*n>=0 | list(p)*/ {… } return p; } /* true | list(res)*/ /*n>0 | emp*/ struct list* list_create(int n) { … while(n>0) /*n>=0 | list(p)*/ {… } return p; } /* true | list(res)*/ C-like language + Separation Logic Lemma wf_L0: … Lemma wf_L1: … Lemma … List_create: push ebp mov esp, ebp sub esp, 8 jmp L0 L0 : … L1 : SCAP Framework overview CComp Compiler CComp Compiler

On-going Work (cont.) Prototype II : CComp Language: C-like(subset of C) Logic: Separation Logic (fragment) Build-in automated theorem provers Support data structures: list/tree

On-going Work (cont.) CComp Certifying Compiler CComp Certifying Compiler Annotated C Code Annotated C Code Annotated x86 Assembly Code Proof Front-end VCGen Proof-Gen Back-end VC Proof Lang.:Subset of C Logic : Separation Logic Build-in Automated Theorem Prover ATP

Automated Theorem Prover Linear integer Arithmetic Prover Formulas Prover for fragment of Separation Logic Other Domain-Specific Provers (list, and etc.) Automated Theorem Prover Proof TreeProof Output Proof (Proof Term Checkable by Coq) Fragment of Separation Logic : separation star / emp / p|->_ Build-in Predicates : list/lseg/dlist/dlseg/tree…

Automated Theorem Prover (cont.) Prover for linear integer arithmetic Based on Simplex decision procedure Output coq-compatible proof term Build using coq libraries (ZArith … ) Check using coqc Provide interfaces to VCGen & other provers

Automated Theorem Prover (cont.) Prover for separation logic Support a fragment (star/ |->/list/lseg/dlist/dlseg/tree) Using linear integer arithmetic prover to prove equality Output coq-compatible proof term (on-going work) More powerful than Smallfoot

Demonstration Simin Yang Automated linear integer arithmetic prover Test cases on integer arithmetic Zhong Zhuang Automated prover for fragment of separation logic Test cases manipulating on linked list

Thanks!