======Software Specification and Verification, Fall 2020====== This is an introductory course on formal software specification and verification, covering various formalisms, methods, and tools for specifying the properties of a software program and for verifying that the program meets its specification. Its goal is to acquaint the students with fundamentals of formal software verification and to prepare them for conducting research in the area. We will focus on deductive (theorem proving) methods. A separate, complementary course entitled "Automatic Verification" covers algorithmic (model checking) methods. ===== Announcements ===== * 01/24: grade report available; please send inquiries, if any, to the instructor by 2PM 01/25 (Mon). * 01/06: solutions to homework assignments final update: {{courses:ssv2020:hw5_s.pdf|HW#5}}. * 01/05: {{courses:ssv:old_exams.zip|old exams}}. * 01/03: solutions to HW#4 updated. * 01/02: solutions to HW#1 updated. * 12/30: solutions to homework assignments: {{courses:ssv2020:hw1_s.pdf|HW#1}}, {{courses:ssv2020:hw2_s.pdf|HW#2}}, {{courses:ssv2020:hw3_s.zip|HW#3}}, {{courses:ssv2020:hw4_s.pdf|HW#4}}, {{courses:ssv2020:hw6_s.zip|HW#6}} * 12/23: slides for Compositional Reasoning available. * 12/23: {{courses:ssv2020:hw7.pdf|HW#7}} for exercise (no credit). * 12/09: {{courses:ssv2020:hw6.pdf|HW#6}} due on 12/17 at 5PM. * 12/09: slides for the Temporal Verification available. * 12/02: slides for the Owicki-Gries Method and for UNITY available. * 11/25: {{courses:ssv2020:hw5.pdf|HW#5}} due on 12/02. * 11/25: All examples in the lecture on Why3 available. * 11/25: [[https://allan-blanchard.fr/publis/frama-c-wp-tutorial-en.pdf|Introduction to C program proof with Frama-C and its WP plugin]], by Allan Blanchard. * 11/25: slides for Frama-C and Why3 available. * 11/11: slides for Hoare Logic (II): Procedures available. * 11/11: slides for Soundness and Completeness of Hoare Logic revised. * 11/04: slides for Predicate Transformers available. * 10/28: {{courses:ssv2020:hw4.pdf|HW#4}} due on 11/04. * 10/28: slides for Soundness and Completeness of Hoare Logic available. * 10/14: slides for Hoare Logic (I) and two notes available. * 10/14: {{courses:ssv2020:hw3.pdf|HW#3}} due on 10/21. * 10/14: slides for Logical Proofs in Coq revised. * 10/07: slides and a note for Logical Proofs in Coq available. * 09/30: {{courses:ssv2020:hw2.pdf|HW#2}} due on 10/07. * 09/23: {{courses:ssv2020:hw1.pdf|HW#1}} due on 09/30. * 09/16: {{courses:ssv2020:hw0.pdf|HW#0}} due on 09/23. * 09/16: slides for Course Introduction, Propositional Logic, and First-Order Logic and a note on Natural Deduction available. * 09/14: this website created on 09/11. It is the main source of all up to date course information and syllabus; there will be no separate PDF version. ===== Instructor ===== [[http://im.ntu.edu.tw/~tsay/|Yih-Kuen Tsay (蔡益坤)]], NTU IM Dept., 3366-1189, Xtsay@im.ntu.edu.twX (between the enclosing pair of X's) ===== Lectures ===== Wednesday 2:20-5:20PM, Room 203, Management Building 2 ===== Office Hours ===== Tuesday 1:30~2:00PM, Wednesday 1:30~2:00PM, or by appointment, Room 1108, Management Building 2. ===== Prerequisites ===== Computer Programming and Discrete Mathematics ===== Textbook ===== //Class Notes// and //Selected Readings// ===== Syllabus/Schedule (with links to slides/notes) ===== We shall seek to strike a balance between depth and breadth, covering both the foundations and some of the more successful formalisms, techniques, and tools. Below is a tentative list of topics and their schedule: * Introduction (.5 week: 09/16a) \\ [{{courses:ssv2020:introduction.pdf|slides}}] * Propositional and First-Order Logics (2.5 weeks: 09/16b, 09/23, 09/30) \\ [slides:{{courses:ssv2020:logic_propositional.pdf|Propositional Logic}}, {{courses:ssv2020:logic_first_order.pdf|First-Order Logic}}; notes: {{courses:ssv2020:natural_deduction.pdf|Natural Deduction}}] * Logical Proofs in the Coq Proof Assistant (1 week: 10/07) \\ [{{courses:ssv2020:natural_deduction_in_Coq.pdf|slides}}; {{courses:ssv2020:natural_deduction_tactics.pdf|Tactics for Natural Deduction in Coq}}] * Verification of Sequential Programs: Hoare Logic (2 weeks: 10/14, 10/21) \\ [slides:{{courses:ssv2020:hoare_logic.pdf|Hoare Logic}}, {{courses:ssv2020:hoare_logic_soundness_completeness.pdf|Soundess and Completeness}}; notes: {{courses:ssv2020:hoare_logic_rules.pdf|Rules of Hoare Logic}}, {{courses:ssv2020:hoare_logic_proofs.pdf|Proofs with Hoare Logic}}] * Predicate Transformers and Program Derivation (1 week: 10/28) \\ [{{courses:ssv2020:predicate_transformers.pdf|slides}}] * Procedures (+ Object Orientation) (1 week: 11/04) \\ [{{courses:ssv2020:procedures.pdf|slides}}] * Program Verification Tools: Frama-C and Why3 (2 weeks: 11/11, 11/18) \\ [slides: {{courses:ssv2020:frama-c.pdf|Frama-C}}, {{courses:ssv2020:why3.pdf|Why3}}; code: {{courses:ssv2020:why3_examples.zip|Why3 Examples}}] * Data Refinement + Formal Methods: Z and B (2 weeks: 11/25, 12/02) \\ [slides: {{courses:ssv2020:Z.pdf|Z}}, {{courses:ssv2020:B.pdf|B}}] * Concurrent, Reactive Systems: Owicki-Gries Method, UNITY, Linear Temporal Logic (3 weeks: 12/09, 12/16, 12/23) \\ [slides:{{courses:ssv2020:concurrency.pdf|Owicki-Gries}}, {{courses:ssv2020:UNITY.pdf|UNITY}}, {{courses:ssv2020:temporal_verification.pdf|Temporal Verification}}] * Selected Topic: Modular/Compositional Reasoning (1 week: 12/30) \\ [{{courses:ssv2020:compositional_reasoning.pdf|slides}}] * **Final** (**2021/01/06**) * Selected Topic: Separation Logic (1 week: 2021/01/13) ===== Grading ===== Homework Assignments 20%, Participation 10%, Final Exam 40%, Term Paper/Report 30%. ===== References ===== - //[[http://www.cis.upenn.edu/~jean/gbooks/logic.html|Logic for Computer Science: Foundations of Automatic Theorem Proving]]//, J.H. Gallier, Harper & Row Publishers, 1985. (Note: click on the link to author's free download site.) - //Proof Theory and Automated Deduction//, J. Goubault-Larrecq and I. Mackie, Kluwer Academic Publishers, 1997. - //Logic in Computer Science: Modelling and Reasoning about Systems//, M. Huth and M. Ryan, Cambridge University Press, 2004. - //Foundations for Programming Languages//, J.C. Mitchell, The MIT Press, 1996. - //Formal Syntax and Semantics of Programming Languages//, K. Slonneger and B.L. Kurtz, Addison-Wesley, 1995. - //Verification of Sequential and Concurrent Programs, 2nd Edition//, K.R. Apt and E.-R. Olderog, Springer-Verlag, 1997. - //The Science of Programming//, D. Gries, Springer-Verlag, 1981. - //Predicate Calculus and Program Semantics//, E.W. Dijkstra and C.S. Scholten, Springer-Verlag, 1990. - //Programming from Specifications, 2nd Edition//, C. Morgan, 1994. - //[[https://allan-blanchard.fr/publis/frama-c-wp-tutorial-en.pdf|Introduction to C program proof with Frama-C and its WP plugin]]//, Allan Blanchard, 2020. - //[[http://www.cis.upenn.edu/~bcpierce/sf/|Software Foundations]]//, B.C. Pierce, C. Casinghino, M. Greenberg, V. Sjöberg, and B. Yorgey. (Note: click on the link to authors' free download site.) - //[[http://adam.chlipala.net/cpdt/|Certified Programming with Dependent Types ]]//, A. Chilipala. (Note: click on the link to author's free download site.) - //[[https://spivey.oriel.ox.ac.uk/wiki3/files/zrm/zrm.pdf|The Z Notation: A Reference Manual, 2nd Edition]]//, J.M. Spivey, 1992. (Note: click on the link to author's free download site.) - //Software Engineering with B//, J.B. Wordsworth, Addison-Wesley, 1996. - //Modeling in Event-B: System and Software Engineering//, J.-R. Abrial, Cambridge University Press, 2010. - //The Temporal Logic of Reactive and Concurrent Systems: Specification//, Z. Manna and A. Pnueli, Springer-Verlag, 1992. - //Temporal Verification of Reactive Systems: Safety//, Z. Manna and A. Pnueli, Springer, 1995. - //[[http://www.cs.stanford.edu/~zm/tvors3.html|Temporal Verification of Reactive Systems: Progress]]//, Z. Manna and A. Pnueli, Book Draft, 1996. (Note: click on the link to authors' free download site.) - //Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers//, L. Lamport, Addison-Wesley, 2003. - //Parallel Program Design: A Foundation//, K.M. Chandy and J. Misra, Addison-Wesley, 1988. - //A Discipline of Multiprogramming: Programming Theory for Distributed Applications//, J. Misra, Springer, 2001 - //Beauty Is Our Business: A Birthday Salute to Edsger W. Dijkstra//, Edited by W.H.J. Feijen, A.J.M. van Gasteren, D. Gries, and J. Misra, Springer-Verlag, 1990 - //The Formal Methods Page: // http://formalmethods.wikia.com/wiki/Formal_methods, J. Bowen. (Note: this Web portal provides links to numerous formal methods and tools.)