Martin Henz and Aquinas Hobor School of Computing National University of Singapore.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

3/13/2002, Wednesday Plane Stress Plane Strain Hertzberg Chapter 8.6.
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.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Group that looked at Miami syllabus. Current Syllabus (with regards to testing) 2: To be able to identify and eliminate errors in programs – 2.1: Describe.
Lecture 1: Overview CMSC 201 Computer Science 1 (Prof. Chang version)
Time Bounds for General Function Pointers Robert Dockins and Aquinas Hobor (Princeton University) (NUS) TexPoint fonts used in EMF. Read the TexPoint manual.
ISBN Chapter 3 Describing Syntax and Semantics.
CSCE 211: Digital Logic Design Muhammad N. Sakib University of South Carolina.
An Integration of Program Analysis and Automated Theorem Proving Bill J. Ellis & Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt.
WHY OUR BRAIN LOOKS FOR PROOF OF WHAT WE ALREADY BELIEVE TO BE TRUE. LESSON 2 Confirmation Bias.
Automated Theorem Proving: A Retrospection & Applications of Formal Methods CS3234 Aquinas Hobor and Martin Henz.
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
EconS 529 Research Methods Fall semester Introductory Lecture.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Intro to CIT 594
Intro to CIT 594
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
Invariant Based Programming, March 20101/ Teaching the construction of correct programs using invariant based programming Ralph-Johan Back Johannes Eriksson.
Wrap-Up Holger Schlingloff with help from Markus Roggenbach.
Administrative stuff On Thursday, we will start class at 11:10, and finish at 11:55 This means that each project will get a 10 minute presentation + 5.
CS 10051: Introduction to Computer Science What is the course about?
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Describing Syntax and Semantics
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
Anatoly Temkin (MET CS) Enhancing Education with Technology: Study Groups in Online Classes Benefits of having online study groups in students’ own words.
Spring 2012 MATH 250: Calculus III. Course Topics Review: Parametric Equations and Polar Coordinates Vectors and Three-Dimensional Analytic Geometry.
Intro to CIT 594
COP4020/CGS5426 Programming languages Syllabus. Instructor Xin Yuan Office: 168 LOV Office hours: T, H 10:00am – 11:30am Class website:
The Essay and the Writing Process
Mixed-level English classrooms What my paper is about: Basically my paper is about confirming with my research that the use of technology in the classroom.
CS110/CS119 Introduction to Computing (Java)
CS 150 PERSONAL PRODUCTIVITY USING TECHNOLOGY Instructor: Xenia Mountrouidou.
COMP 111 Programming Languages 1 First Day. Course COMP111 Dr. Abdul-Hameed Assawadi Office: Room AS15 – No. 2 Tel: Ext. ??
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
ICAPRG301A Week 4Buggy Programming ICAPRG301A Apply introductory programming techniques Program Bugs US Navy Admiral Grace Hopper is often credited with.
Computer Science 10: Introduction to Computer Science Dr. Natalie Linnell with credit to Cay Horstmann and Marty Stepp.
Susana Bravo. Why Projects? Project Based Learning is an approach to teaching that involves the use of projects and other hands on tools. It is an alternative.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
17-Dec-03 Intro to CIT 594 ~matuszek/cit594.html.
Science Andrea’s Student Led Conference. Cover Letter This year in science I have learned about many things. We learned a ton of important information.
Using Alice in an introductory programming course for non-CS majors Adelaida A. Medlock Department of Computer Science Drexel University
FINAL PRESENTATION: THE ROAD TO SUCCESS OPTION 1 KEVIN LOUIS-JEAN.
WHAT IS THE APPROPRIATE MATHEMATICS THAT COLLEGES STUDENTS SHOULD KNOW AMATYC Conference November 20, 2015 Phil Mahler & Rob Farinelli.
1 CS 381 Introduction to Discrete Structures Lecture #1 Syllabus Week 1.
How to do a Book Review.
CMSC 330: Organization of Programming Languages Operational Semantics.
INTERVIEWING Learning to ask the right questions.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Mathematical Induction Thinking Skill: Develop Confidence in Reason Warm Up: Find the k+1 term (P k+1 ) 1) 2)
DSMA 0393/1414 Comments of Students. Co-requisite Model Student Comments Students were given this request on their final examination: Write a statement.
Mostly-Automated Verification of Low-Level Programs in Computational Separation Logic Adam Chlipala Harvard University PLDI 2011.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Introduction to CSCI 1311 Dr. Mark C. Lewis
Evaluating the Effectiveness of Clickers in a Biology Lab
COSC 5V90 Functional Programming and Interactive Theorem Proving
COMP 283 Discrete Structures
A Verified Compiler for an Impure Functional Language
(One-Path) Reachability Logic
Jared Davis The University of Texas at Austin April 6, 2006
Advanced Compilation and Automatic Programming
Pair Programming in the Classroom
Lecture 5 Floyd-Hoare Style Verification
Jeremy Bolton, PhD Assistant Teaching Professor
An overview of Coq Xinyu Feng USTC.
PHYS 202 Intro Physics II Catalog description: A continuation of PHYS 201 covering the topics of electricity and magnetism, light, and modern physics.
CMSC201 Computer Science I for Majors Final Exam Information
How To Start Your Paper Script: Hello everyone! As a tutor, most of the students I help are either rushing to finish a paper, or struggling to even get.
An overview of Coq.
Presentation transcript:

Martin Henz and Aquinas Hobor School of Computing National University of Singapore

2

YOU ARE ABOUT TO HEAR THE LEAST TECHNICAL TALK AT CPP / APLAS

 Propositional Logic  Predicate Logic  Induction  Modal Logic  Hoare Logic 4

5

What do the students say? 6

 Hard and very abstract 7

What do the students say?  Hard and very abstract  Dry and boring 8

What do the students say?  Hard and very abstract  Dry and boring  Removed from applications 9

 What about introducing tool support? 10

 What about introducing tool support?  How can a tool help address some of our problems? 11

 A partial win  Students often do not know when a proof is correct – tools help with this problem a lot  On the other hand, topic is still abstract  Also, the students now have to learn how to use the tool – makes their job harder 12

 A major win  Students in computer science enjoy using computers!  Some tools can be a lot of fun to use  Building [Coq] scripts is surprisingly addictive, in a videogame kind of way… [Xavier Leroy, 2005] 13

 A partial win  Students appreciate getting hands on a tool  We can bring up success stories for that tool  But we have found that it is not enough – we adjust by trying to bring up other example applications as we go through the curriculum 14

 There are lots of tools out there: SAT solvers, model checkers, proof assistants, program verifiers, …  There is a cost to learn each tool  Breadth vs. Depth tradeoff  Coq is useful for almost the entire course 15

 See our paper!  We have also produced a (very much in progress, alpha) series of lecture notes (~80 pages) on the basic topics we cover:  For the rest of this talk I am going to cover a few highlights, lowlights, and options we have explored. 16

 Start with something that may be more familiar: syllogisms  Syntax vs. semantics, proof theory (natural deduction), semantic arguments (models)  Introduce Coq  With Notation you can write things like, All Greeks are humans. in Coq! 17

 Semantics is naive set theory (Venn diagrams)  Good puzzles from Lewis Carroll: 18

 Semantics is naive set theory (Venn diagrams)  Good puzzles from Lewis Carroll: 1.No ducks waltz. 19

 Semantics is naive set theory (Venn diagrams)  Good puzzles from Lewis Carroll: 1.No ducks waltz. 2.No officers ever decline to waltz. ½ 20

 Semantics is naive set theory (Venn diagrams)  Good puzzles from Lewis Carroll: 1.No ducks waltz. 2.No officers ever decline to waltz. 3.All my poultry are ducks. ½ 21

 Semantics is naive set theory (Venn diagrams)  Good puzzles from Lewis Carroll: 1.No ducks waltz. 2.No officers ever decline to waltz. 3.All my poultry are ducks.  It should be obvious that: No officers are my poultry. 2 22

 We find it useful to cover propositional logic in Coq twice  We first cover it encoded as a datatype Inductive Formula : Type := | AndForm : Formula -> Formula -> Formula …  We provide a module signature with the axioms of propositional logic 23

 We have them prove simple facts via those axioms (in a module functor).  We point out that the tactics they have been using (e.g., split ) are similar to axioms in the module signature (e.g., conj_i )  We find this approach helps students understand the distinction between object logic and meta logic. 24

 Teaching with Coq becomes a bit entwined with teaching Coq.  To a typical third-year undergraduate student, Coq is remarkably close to voodoo.  Poor error messages don’t help matters…  This tends to cause undue hacking, etc. 25

 We have found the following form of diagram useful when explaining tactics to students: 26

 It is extremely useful to demonstrate binder management via Coq.  That is, use “ rewrite ” tactic to show Coq handles variable capture, etc.  Paper proofs improved once they could try such things out in the theorem prover. 27

 Students usually have a very hard time understanding induction on paper.  Coq handles induction beautifully.  We saw a significant increase in comprehension vs. prior years in understanding induction.  Their paper proofs improved a lot as a result! 28

 Coq does not directly support natural deduction proofs in modal logic.  Best [de Wind ‘01]. Still not much fun.  Semantic style: use modal operators to express theorems, but often have to unfold definitions to prove them. 29

 We did get some benefits from using Coq.  We covered a kind of higher-order multimodal logic.  One benefit was that we were able to investigate correspondence theory in Coq. 30

 Concrete program verification in Coq is extremely painful.  Maybe better tactics would help, or some other clever tricks… not sure.  We had to assign virtually all of the concrete verifications by hand.  Instructors used Coq to debug Huth & Ryan.  Maybe it would be valuable to add a second tool. 31

 We had more success on the semantic side of Hoare logic – usually ignored in courses.  Used a “dynamic logic” approach to define the Hoare tuple via modal logic.  If you set things up just right, the students can prove the soundness of a simple Hoare logic (both partial and total) in Coq! 32

 Custom tactics: we tried it, most of the time we avoid it now.  Homework: we try to assign some of the same problems both in Coq and on Paper.  Applications: we discuss several (sports tournament scheduling, network security analysis, etc.). 33

 Takes significant experimentation to find the right definitions.  Running this course took a lot of time. Hopefully as the notes become more polished this will be reduced.  Cheating: it’s an issue. Our final exams are done in the lab and are 40% in Coq. 34

“I would like to thank you for the Automated Theorem Prover (Coq) you taught in CS5209 course. It makes life easy while trying to prove theorem as compared to paper part. In addition to this it saves life of student in Final exam. In the beginning for the course I hated Coq a lot, but slowly I start liking it as I understood the way tactic works and how to use them. Now it has become most favorite and interesting part of mine in this course.” (2009/2010) 35