CS206: Formal Methods in Computer Science
(Spring 2007)


Announcements

  • Raw scores and tentative grades have been posted.
  • We have one anonymous HW2 submission, which has not been claimed so far (Thurs, May 3, 6.15pm) by anybody. Unfortunately we can't assign marks for this homework to anybody.

  • Teaching Staff

    Instructor Supratik Chakraborty
    Friendly TAs Bhargav Gulavani Sasidhar Sunkari

    Hours

    What When Where
    Lectures
    Tues 9.30-10.25
    Wed 10.35-12.30
    Room A1, Maths Bldg.
    Tutorials
    Thurs 10.35-11.30
    Room A1, Maths Bldg.
    Office hour
    Tues 15:00-16:00
    CFDVS Lab 1 (Maths basement)
    (by prior email appointment)

    Lecture/Tutorial Reschedules

    Lecture/tutorial on Rescheduled to
    Thurs Jan 4 (lecture)
    Wed Jan 17
    Fri Jan 5 (lecture)
    Wed Jan 24
    Thurs Feb 1 (lecture)
    Wed Jan 24
    Wed Jan 24 (tutorial)
    Thurs Feb 1
    Wed Apr 11 (lecture)
    Tues Apr 10 (extra lecture)
    Thurs Apr 12 (tutorial)
    Wed Apr 11

    Grading

    Midterm 30%
    Endterm 50%
    Homeworks and quizzes 20%

    Important points ...

    • All exams are open book and notes.
    • Homeworks are due in class one week after they are given.
      The problems are meant to test your understanding of the subject and your creativity. Late turn-ins will be penalized.
    • Mutual discussion on assignments and practice questions is encouraged. However, copying solutions from others will be severely penalized.
    • There is zero tolerance for dishonest means like copying solutions from others.
      Anybody found indulging in such activities will be very severely penalized (including FF/FR grade). The onus will be on the supposed offender to prove his/her innocence.

    Reading Material

    • Logic in Computer Science: Modeling and Reasoning about Systems by Michael Huth and Mark Ryan,   paperback edition published by Cambridge University Press.
    • Lecture notes.

    References for the more interested ...

    • A beautiful set of slides on decidable fragments of First-Order and Fixed-Point Logic by Prof. Erich Gradel (parts of the talk require background beyond that taught in CS206, so this is for those with special interest on decidable fragments).
    • A note on checking satisfiability of 2-CNF formulae in propositional logic.
    • A nice online resource centre on Foundations of Mathematics.
    • Formal Methods educational resources from the world-wide web Formal Methods page.
    • Original paper on the DPLL procedure: A machine program for theorem-proving by M. Davis, G. Logemann and D. Loveland, in Communications of the ACM, Volume 5(7), July 1962, pages: 394-397. Downloadable from ACM Portal if you are accessing from IITB.
    • A wonderful tutorial on propositional satisfiability and beyond was presented by Prof. Roberto Sebastiani in CADE 2003. The original tutorial slides are no longer accessible from Prof. Sebastiani's webpage, but a google search using keywords "sebastiani propositional satisfiability" may fetch you the slides in PDF.
    • Natarajan Shankar's notes for his Fall 2003 course on Little Engines of Proof at Stanford University. Check the slides on Davis-Putnam and Stålmarck's methods if you are interested. You must of course familiarize yourself with the notation by looking at a few prior slides on the same website.
    • A system for determining propositional logic theorems by applying values and rules to triplets that are generated from a formula by G. Stålmarck , U.S. Patent No. 5 276 897, European Patent No. 0403 454. You can search the patent websites (e.g. US Patent Office ) to download these patents.
    • Prover Technologies , the company that thrives on logic and proof systems (Stålmarck's patented procedure for determining propositional logic theorems is used in Prover' s tools).
    • A tutorial on Stålmarck's proof procedure for propositional logic by M. Sheeran, G. Stålmarck, Proceedings of the 2nd Intl. Conf. on Formal Methods in Computer-Aided Design, FMCAD'98, Palo Alto, CA, USA, 4--6 Nov 1998. Currently downloadable from citeseer . A journal version of this paper appeared in Formal Methods in System Design, Vol. 16, No. 1, Jan 2000. Formal Methods in System Design is published by Springer.
    • SATLive! All the latest happening on the satisfiability problem. You can check out the "10 most visited links" on this webpage to find out about several public domain SAT solvers, like zChaff from Princeton University.
    • SAT Research at Princeton: Contains a repository of some interesting papers describing how modern SAT solvers are engineered.
    • A wonderful repository of property specifications using Temporal Logic (we've only studied CTL of the different logics discussed in this site).
    • A good set of slides prepared by Prof. S. Ramesh on material relevant to this course. Look at slides 59-113 for First Order Logic.
    • Another good set of lecture notes on Introduction to Logic by Prof. Stanley N. Murris from University of Waterloo. Look in Chapters 4 and 5 for excellent presentation of material on First Order Logic, Herbrand's Theorem and Compactness Theorem.
    • Model Checking by E. M. Clarke, Jr., O. Grumberg and D. A. Peled, The MIT Press.
    • The Temporal Logic of Reactive and Concurrent Systems: Specification by Zohar Manna and Amir Pnueli, Springer Verlag.
    • Temporal Verification of Reactive Systems: Safety by Zohar Manna and Amir Pnueli, Springer Verlag.

    Homeworks, Exams, Tutorials ... all the fun part!

    Homework 1 [ PDF ] Due by Tues Feb 6, 5pm
    Quiz 1 [ PDF ] Fri Feb 2, 8.30 am - 9.30 am
    Compensation Quiz 1 [PDF] Wed Feb 14, 5.15 pm - 6.15 pm
    Midsem exam [PDF] Mon Feb 19, 2.00 pm - 5.00 pm
    Homework 2 [ PDF ] Due by Tues Mar 20, 5pm
    Quiz 2 [ PDF ] Wed Mar 21, 11.35 am - 12.30 pm
    Endsem exam [PDF] Mon Apr 23, 2.30 pm - 5.30 pm

    Lecture Schedule

    Date Topics details
    Jan 4, 5 No class. Compensation classes on Jan 17 and Jan 24
    Jan 9 Introduction to the course and logistics. Some interesting problems that can be solved by studying logic. Introduction to Propositional Logic
    Jan 11 Propositional Logic: Syntax, examples, formulas as trees. Semantics of propositional logic: definitions and examples
    Jan 12 What we mean by a proof in this course; Desirable features of a proof system. Natural Deduction proof system for propositional logic: explanation of notations, discussion on rules for conjunction introduction and elimination, disjunction introduction and elimination and implication introduction. Illustration of application of rules through simple examples.
    Jan 16 More proof rules: implication elimination, negation introduction and elimination, double negation introduction and elimination, elimination of "bot". Intuitive justification for each rule. Simple proofs using these rules as string transformation templates
    Jan 17 Proofs in natural deduction: examples and illustrations. Proving Law of Excluded Middle (LEM) using the double negation elimination rule and vice versa. Discussion on the syntactic nature of a proof; viewing a proof system as a string transformation system
    Jan 18 Intuitive explanations and sketch of proofs of soundness and completeness of natural deduction for propositional logic. "Mimicking" truth tables (semantic structures) in natural deduction proofs using LEM repeatedly
    Jan 19 Notions of semantic and syntactic entailment. More discussion on soundness and completeness of natural deduction for propositional logic. Difficulty of proving that something cannot be proven by natural deduction; need for semantic reasoning and algorithms for checking satisfiability of formulae
    Jan 23 Encoding graph reachability as a propositional logic implication. Using natural deduction proof rules to prove graph reachability. Difficulty of showing non-reachability using natural deduction; role of satisfiability solvers. Using satisfiability solvers to disprove semantic entailment, thereby showing the absence of a natural deduction proof. A computer program for generating proofs of valid sequents.
    Jan 24
    (2 lectures)
    Normal forms of propositional logic formulae: negation normal form (NNF), disjunctive normal form (DNF) and conjunctive normal form (CNF). Notions of validity and satisfiability, and their duality. Ease of satisfiability checking on DNF and of validity checking on CNF. Exponential blowups in converting arbitrary formulae to semantically equivalent CNF/DNF formulae. Notion of equisatisfiability, difference from semantic equivalence. Constructing equisatisfiable formula linear in size to given to given arbitrary formula. Importance of 3-CNF satisfiability.
    Jan 25 Checking satisfiability of CNF formulae. Implication graphs and Boolean Constraint Propagation (BCP). Notions of unit and pure literals in a CNF formula. Basic DPLL algorithm with BCP for obtaining a satisfying assignment of a CNF formula.
    Jan 26 Republic Day
    Jan 30 Muharram
    Feb 1 Tutorial 2. Compensation class on Wed Jan 24
    Feb 2 Quiz 1
    Feb 6 Finding all satisfying assignments of a given CNF formula. Introduction to Horn clauses, Horn formula and the spirit of logic programming. Discussion on why checking consistency/satisfiability of Horn formulae are easier than checking satisfiability of arbitrary CNF formulae.
    Feb 8 A polynomial-time algorithm to check satisfiability of Horn formulae; a few simple extensions. Discussion on a few other SAT solvers. Need for a logic richer than propositional logic. Introduction to predicate logic: variables, predicates and functions.
    Feb 9 Predicate logic: Syntax and semantics. Free and bound variables.
    Feb 13 Semantics of predicate logic: more discussion and examples. Domains (universes) and interpretations predicate and function symbols. Propositional logic as a strict sublogic of predicate logic, expressive power of formulae with quantifiers.
    Feb 14 Notion of models. Semantics of predicate logic as dependent on underlying models. Renaming of bound variables, substitution, equality predicate. Introduction to understanding the meaning of implications in predicate logic.
    Feb 15 Clarification on substitution. Sequents in predicate logic. Natural deduction proof rules for predicate logic: rules for propositional logic + rules for equality introduction and elimination.
    Feb 19 Mid-semester examination
    Feb 27 Natural deduction proof rules for predicate logic: rules for introduction and elimination of quantifiers. Illustration of proofs in natural deduction.
    Mar 1 Quantifier equivalences in predicate logic. Intuition behind equivalences and formal proofs of equivalences in natural deduction.
    Mar 2 More on quantifier equivalences and effects of permuting quantifiers. Prenex Normal Forms of predicate logic formulae. Skolem Normal Form: Role of Skolem functions, minimizing the arity of Skolem functions needed for Skolemization.
    Mar 6 More discussion on Skolem functions, and Skolem Normal Form. Introduction to a class of predicate logic formula for which satisfiability checking is decidable (computable): the Bernays-Schonfinkel class, a simple algorithm for checking satisfiability of this class of sentences, and illustrations
    Mar 8 Introduction to the Compactness Theorem of predicate logic. Sketch of proof of theorem. Applications of the Compactness Theorem to prove impossibility of expressing certain properties of graphs in predicate logic.
    Mar 9 More discussion on the Compactness Theorem. Example of a second order logic formula, and how it can express something that is not expressible in predicate/first-order logic. Introduction to Herbrand Universe and Lowenheim-Skolem Theorem on existence of countable models of satisfiable predicate logic sentences. Introduction to Herbrand's Theorem on unsatisfiability of predicate logic sentences.
    Mar 13 Ground terms and clauses. More on Herbrand's Theorem on unsatisfiablity of predicate logic sentences using propositional unsatisfiability of a finite set of ground clauses. Illustration of Herbrand's Theorem.
    Mar 15 Proving propositional unsatisfiability of ground clauses with the interpretted equality operator. Techniques for inferring equalities using transitivity of equality and properties of function definition.
    Mar 16 More discussion on inferring equalities in formulae with uninterpretted functions. Optimizing the number of additional constraints that need to be conjuncted to a given set of ground clauses to capture the effect of having equalities.
    Mar 20 Simple programs and expressing states of programs using first-order logic formulae. Transforming states through program statements. Use of existential quantification for computing "image" of a state under a given program statement. Discussion on why universal quantification doesn't work for computing images.
    Mar 21 Proving program properties by using inductive invariants and considering transformations of first order logic formulae representing set of states at different program locations. Illustration with an example.
    Mar 22 Notion of undecidability in computation. Use of a simple example to prove that certain things cannot be computed algorithmically. Implications and a few subtleties of this result.
    Mar 27 Undecidability of checking satisfiability of arbitrary first order logic sentences. A proof through the encoding of computations of simple programs and asking whether a particular location in the program can be reached.
    Mar 28 Notion of Kripke structures, path and state formulae. Syntax of (simplified) path formulae and state formulae. Illustration of usage. Introduction to semantics of path formulae.
    Mar 29 Semantics of path formulae, equivalences between different path formulae. Illustrations of how certain properties of paths can be captured with path formulae.
    Apr 3 Encoding path formulae in first-order logic. Discussion and illustrations.
    Apr 4 Semantics of state formulae, extending the definiion of path formulae using state formulae (instead of atomic propositions) as basic building blocks. The logic CTL*, and the fragment LTL. Understanding the meaning of some interesting LTL formulae.
    Apr 5 Restrictions on CTL* to yield CTL. Examples of formulae that are in CTL and not in CTL. Notion of computation trees and evaluation of CTL formulae on trees. Discussion on some commonly used constructs in CTL formulae
    Apr 10 More discussion on CTL formulae, constructing composite Kripke structures from individual Kripke structures, using CTL and LTL to express interesting properties of systems: illustrations
    Apr 10
    (2nd lecture)
    Showing the sufficiency of a subset of operators for expressing all CTL formulae. Model checking CTL formulae: A state labeling algorithm for EU formulae. Illustration with examples. Discussions on soundness and completeness of algorithm.
    Apr 11 Algorithms for checking different CTL formulae on given Kripke structure: labeling states iteratively for AG, EG, AU, EU, AR, ER formulae. Discussions on soundness and completeness of these algorithms. Summary of course.