南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)02_CoqOverview

An overview of Cog Xinyu Feng USTC
An overview of Coq Xinyu Feng USTC

What is Cog? A proof assistant developed by INRIA https://coq.inria.fr/ Coq is a formal proof management system.It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs
What is Coq? • A proof assistant developed by INRIA • https://coq.inria.fr/ • Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs …

What is Cog? A functional programming language with rich type sys. Define inductive data types and write algorithms manipulating them. All programs must terminate. A higher-order logic with interactive theorem prover Allows you to reason about mathematical structures and your programs Generates machine-checkable proofs A meta-language/logic Allows you to encode another language/logic and prove the properties of that language/logic
What is Coq? • A functional programming language with rich type sys. • Define inductive data types and write algorithms manipulating them. • All programs must terminate. • A higher-order logic with interactive theorem prover • Allows you to reason about mathematical structures and your programs • Generates machine-checkable proofs • A meta-language/logic • Allows you to encode another language/logic and prove the properties of that language/logic

Why Coq? To have more rigorous formal reasoning For mathematics and program verification Tools like Coq boost program verification
Why Coq? • To have more rigorous formal reasoning • For mathematics and program verification • Tools like Coq boost program verification

Program verification under attack Reports and Articles Social Processes and Proofs of Theorems and Programs [CACM1979] Richard A.De Millo Georgia Institute of Technology Richard J.Lipton and Alan J.Perlis Mathematical proofs can often Yale University be wrong! Program verification Mathematics is trustworthy because of the social process to would never work... check/validate proofs. But nobody would care or check proofs for programs:"The verification of even a puny program can run into dozens of pages,and there's not alight moment or a spark of wit on any of those pages.Nobody is going to run into a friend's office with a program verification...Nobody is ever going to read it
Program verification under attack Program verification would never work … Mathematical proofs can often be wrong! Mathematics is trustworthy because of the social process to check/validate proofs. But nobody would care or check proofs for programs: “The verification of even a puny program can run into dozens of pages, and there's not alight moment or a spark of wit on any of those pages. Nobody is going to run into a friend's office with a program verification … Nobody is ever going to read it.” [CACM 1979]

Problem addressed by tools like Coq Proofs are mechanized and machine-checkable through Curry-Howard isomorphism [first published paper in 1980] Proof checking is as simple as type checking ·Fully automatic Very simple algorithm No longer need to trust the proofs ·Check them! Only need to trust the proof checker Simple,can be reviewed by human experts
Problem addressed by tools like Coq • Proofs are mechanized and machine-checkable • through Curry-Howard isomorphism [first published paper in 1980] • Proof checking is as simple as type checking • Fully automatic • Very simple algorithm • No longer need to trust the proofs • Check them! • Only need to trust the proof checker • Simple, can be reviewed by human experts …

A framework for certified software Specifications ↓ No Proof Proof Checker Machine Yes code CPU certified code (code proof) ·specifications: lang.semantics+program safety/security/correctness... automated proof checker need not trust the correctness of proofs
A framework for certified software • certified code (code + proof) • specifications: lang. semantics + program safety/security/correctness … • automated proof checker need not trust the correctness of proofs Proof Checker Yes CPU Specifications Proof Machine code No

Applications of Coq Formal proofs of mathematical theorems Formal proof of 4-color theorem By Georges Gonthier and Benjamin Werner,2004 Other:Feit-Thompson theorem proved in Coq in 2012 ·Formal verification OS kernels and hypervisors CertiKOS project at Yale seL4 in Isabelle at NICTA ·Compilers CompCert at INRIA and following projects LLVM verification and Upenn 。Others Web servers (bedrock projects MIT) Certified software tool chains(e.g.,analysis algorithms)@Princeton 。Teaching:logic,programming languages,…
Applications of Coq • Formal proofs of mathematical theorems • Formal proof of 4-color theorem • By Georges Gonthier and Benjamin Werner, 2004 • Other: Feit–Thompson theorem proved in Coq in 2012 • Formal verification • OS kernels and hypervisors • CertiKOS project at Yale • seL4 in Isabelle at NICTA • Compilers • CompCert at INRIA and following projects • LLVM verification and Upenn • Others • Web servers (bedrock projects @ MIT) • Certified software tool chains (e.g., analysis algorithms) @ Princeton • Teaching: logic, programming languages, …

Gains lots of popularity AWARDS acm Software System Award MORE ACM AWARD WINNERS ABOUT THIS AWARD Awarded to an institution or individual(s)recognized for developing a software system that has had a lasting influence,reflected in contributions to concepts,in commercial acceptance,or both.The Software System Award carries a prize of $35,000.Financial support for the Software System Award is provided by IBM. Coq Selected As Recipient Of The 2013 Software System Award Other recipients of the award: Unix、TCP/IP、Norld-Wide Web、Java、Make、VMWare、 Eclipse、LLVM
Gains lots of popularity Other recipients of the award: Unix、TCP/IP、World-Wide Web、Java、Make、VMWare、 Eclipse、LLVM …

Demo: 。Small examples Imp in Coq (syntax and operational semantics)
Demo: • Small examples • Imp in Coq (syntax and operational semantics)
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)01_Introduction(主讲:冯新宇)Formal Semantics of Programming Languages.ppt
- 私立华联学院:《html5》课程教学资源(课件讲稿)第9章 CSS3高级应用.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第8章 多媒体技术.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第7章 表单的应用.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第6章 浮动与定位.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第5章 CSS盒子模型.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第4章 CSS3选择器.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第3章 CSS3入门.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第2章 HTML5 页面元素及属性.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第1章 初识HTML5.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)各章习题答案.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第9章 CSS3高级应用_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第8章 多媒体嵌入_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第7章 表单_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第6章 浮动与定位_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第5章 盒子模型_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第4章 CSS3选择器_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第3章 CSS3入门_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第2章 HTML5页面元素及属性_习题.pdf
- 私立华联学院:《html5》课程教学资源(试卷习题)第1章 初识HTML5_习题.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)03_Math.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)04_Lambda Calculus.pptx
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)05_Operational Semantics.pdf
- 《程序设计语言的形式语义》课程教学资源(文献资料)Lecture Notes on the Lambda Calculus.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)06_Denotational Semantics.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)07_Axiomatic Semantics and Hoare Logic.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)Separation Logic(1/3).ppt
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)09_Shared-Variable Concurrency.pdf
- 《程序设计语言的形式语义》课程教学资源(文献资料)An Introduction to Separation Logic(Preliminary Draft).pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)Separation Logic(2/3).ppt
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)Separation Logic(3/3).ppt
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)10_Simply-Typed Lambda Calculus.pptx
- 私立华联学院:《C语言程序设计》课程教学资源(教案讲义)教学大纲.pdf
- 私立华联学院:《C语言程序设计》课程教学资源(教案讲义)应用案例.pdf
- 私立华联学院:《C语言程序设计》课程教学资源(教案讲义)课程标准(适用专业:物联网应用技术).pdf
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第一章 初识C语言(负责人:周鹏梅).ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第三章 结构化程序设计.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第二章 数据类型与运算符.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第七章 结构体和共同体.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第五章 函数.ppt