Computer-Aided Reasoning
CS 4820/7485 Fall 2021

Khoury College of Computer Sciences
Northeastern University

Location

Mon, Wed, Thu 10:30-11:35AM Behrakis 320

Contact Information

Professor: Pete Manolios
Office hours: Zoom, Mon 11:35AM-1:00PM and by request
Email:

Goals

By the end of this course, you will:
  1. Understand a selection of fundamental concepts and algorithms in the area of computer-aided reasoning.
  2. Implement and evaluate a computer-aided reasoning system from scratch.
  3. Be able to formalize computational systems at various level of abstraction.
  4. Be able to effectively use a major theorem prover to mechanically prove non-trivial theorems about computational systems.

Course Structure

The course will consist mostly of lectures. There will be opportunities for students to give presentations. The class is project-based; you learn by doing and there will be pleny of learning.

Textbooks

We will use the following textbooks
  1. Harrison. Handbook of Practical Logic and Automated Reasoning. Cambridge University Press. The code accompanying the book can be found here.
  2. Manolios. Reasoning about Programs (I may update this during the semester).

Software

Install and familiarize yourself with the following.
  1. The ACL2 Sedan
  2. A Common Lisp compiler such as SBCL or Clozure Common Lisp
  3. Emacs

Reference Material

The following links provide useful references. I may add more links during the semester.
  1. The ACL2 Documentation
  2. Steele. Common Lisp the Language, 2nd Edition. This is available online from various sources, including this one
  3. Emacs
  4. Data Definitions

Forum

I will provide a Piazza-Based Web forum that can be used by students to ask questions and exchange wisdom while completing the homeworks and projects in this course. You are expected to check it at least every few days, participate actively, and use it as a first place to post questions related to the projects or homeworks in this course. Please use the forum to post questions and answers that may be useful to others. Specifically, clarification questions about the homework, such as "What is the precise interpretation of homework question 2b" should be posted on the forum. Also, any questions at all about the material covered in class should be posted on the forum, e.g., "What do I wind up with when I apply Knuth-Bendix completion on this set of rewrite rules?"

Homework Assignments

This course will have regular project-based homework assignments requiring you to implement techniques and algorithms covered in class. Over the course of the semester, you will implement and evaluate a modular reasoning engine for a formal modeling language that can be used to model computational systems. Homework assignments will be done by groups of 2-3 students and will involve design, teamwork, and the implementation and evaluation of complex algorithms. To collaborate effectively, you should all be involved in all aspects of the homework problems. Homeworks will be marked 20 points off per day that they are late, up to 2 days. Important: You are responsible for finding a partner. The class forum located on Piazza is a particularly good resource for this, as there will be a thread there that serves exactly this purpose. Right before or right after lecture are also good times to look for partners. Submission instructions and more information can be found by clicking on the Assignments tab on the left. Any requests for grade changes or regrading must be made within 7 days of when the work was returned. To ask for a regrade, specify (a) the problem or problems you want to be regraded, and (b) for each of these problems, why you think the problem was misgraded.

Exams

There will be two exams. The current schedule is as follows, but it may change, given the situation we find ourselves in. The first exam will be given on 10/21 and will be an in-class exam. The second exam will be given on 12/2 and will be an in-class exam.

Presentations

Every student will pick 1-2 relevant research papers that they find interesting and will read and present them to the class. The presentation should include a motivation, it should relate the presented material to the material covered in class and it should explain why the topic is important and interesting.

Projects

Students have to propose a project that I will review and approve. Projects allow you to gain hands-on experience on a topic of interest. I suggest first choosing a project topic and then selecting a paper on this topic for your presentation. Your project can be theoretical, say coming up with a new algorithm, or it can involve the implementation of an interesting algorithm, or it can involve the use and evaluation of existing tools.

Evaluations

Graduate students will be responsible for evaluating one or more class assignments. This requires coming up with an evaluation plan for both the theoretical and practical parts of assignments. When evaluating algorithms, a test suite that stresses the algorithms will be created and used to run a competition between the student submissions. Feedback will be provided to students and the process will happen in a timely fashion (ideally one week after submission deadlines). Evaluators get an automatic A for the assignment they are evaluating.

Grading

The breakdown of the grades in this course for undergraduate students is as follows.
  1. 30% Exams
  2. 30% Homeworks
  3. 15% Paper presentation
  4. 15% Project
  5. 10% Class participation
For graduate students grades are determined as follows.
  1. 30% Exams
  2. 25% Homeworks
  3. 15% Paper presentation
  4. 15% Project
  5. 10% Class participation
  6. 5% Evaluations

Academic Integrity

It's OK to ask someone about the concepts, algorithms, or approaches needed to do the assignments. We encourage you to do so; both giving and taking advice will help you to learn. However, what you turn in must be your own, or for projects, your group's own work; copying other people's code, solution sets, or from any other sources is strictly prohibited, unless you are explicitly given permission to do so. In particular, looking at other solutions (e.g., someone else's solution to a similar project) is a direct violation of our academic integrity policy. The project assignments must be entirely the work of the students turning them in. If you have any questions about using a particular resource, ask me. All students are subject to the Northeastern Academic Integrity policy. All cases of suspected plagiarism or other academic dishonesty will be referred to the Office of Student Conduct and Conflict Resolution (OSCCR) and to the college. In addition to any penalties imposed by OSSCR and the college, each violation of the academic integrity policy will result in a full grade reduction for the class in addition to a zero grade on any affected assignments, projects, exams or graded material.

Accommodations for Students with Disabilities

If you have a disability-related need for reasonable academic accommodations in this course and have not yet met with a Disability Specialist, please visit the Northeastern Disability Resource Center and follow the outlined procedure to request services. If the Disability Resource Center has formally approved you for an academic accommodation in this class, please present the instructor with your "Professor Notification Letter" during the first week of the semester, so that we can address your specific needs as early as possible.

Schedule

The schedule below will be updated as the semester progresses. The list of topics we will cover includes: history of logic, data definitions, property-based testing, the ACL2s language, logic and theorem prover, propositional logic (PL), analysis (transformations, representations, decision procedures) of PL, equational reasoning, induction, generalization, the ACL2 waterfall, congruence-based reasoning, term rewriting (basic concepts, termination, confluence, Knuth-Bendix), using ACL2s effectively (the method, state, macros, books), FOL (First order logic) and major results (syntax, semantics, Skolemization, compactness, Herbrand universes, completeness, incompleteness, decidability, theorem proving), SMT solving, and reasoning about computation. As the semester progresses, I will be adding reading material. Please read the material before class. I will also add lecture materials.

Week
Topics
9/6 TOPICS
Introductions. A brief history of logic, formal methods and the birth of computer science. A brief history of ACL2 and ACL2s. Describing and reasoning about computation with ACL2s: An overview of the universe, specifying types with defdata, defining functions with definec, defining properties and testing them using counterexample generation and property-based testing.
SLIDES & CODE
Lecture 1 Slides
Lecture 2 Slides, Lecture 2 Code
9/13 TOPICS
Definitions in ACL2s. Invariants, Contracts, Static/dynamic checking, Termination, Measure Functions. Equational Reasoning.
READINGS
(1) Data Definitions
(2) RAP: Chpts 1-5
(3) Harrison: Chpts 1, 2.1-2.6 (Can ignore OCaml code)
SLIDES & CODE
Lecture 3 Slides, Lecture 3 Code
Lecture 4 Slides
Lecture 5 Slides
9/20 TOPICS
Induction, Professional Method, Lemmas, Generalization, Organization of ACL2, waterfall, decision procedures, congruence-based reasoning, Term rewriting, how to use the theorem prover, the method.
READINGS
(1) RAP: Chpts 6-7
(2) Introduction to the Theorem Prover and all of the subtopics.
SLIDES & CODE
Lecture 6 Slides
Lecture 7 Slides
Lecture 8 Slides, Lecture 8 Code
9/27 TOPICS
PL satisfiability solving, Tseitin transformation, 2SAT, applications, DP. ACL2s: Proof builder, Macros, State, world, using books, developing libraries, performace issues
READINGS
(1) Harrison: Chpts 2.7-2.11
SLIDES & CODE
Lecture 9 Slides
Lecture 10 Slides, Lecture 10 Code
Lecture 11 Slides, Lecture 11 Code
10/4 TOPICS
DPLL, BDDs. Termination and professional method in action using ACL2s: solving if-flat terminations, proving qsort=isort, proving soundness of SAT decision procedure. Discussion of projects, presentations, HWK4.
READINGS
(1) Harrison: Chpts 3.1-3.6
SLIDES & CODE
Lecture 12 Slides
Lecture 13 Notes
Lecture 14: Homework 4, Homework 5 Discussion & Review
10/11 TOPICS
First order logic: role as foundation of math, syntax and semantics, models, consequence, sat, validity, formalization examples, Prenex normal form, Skolemization.
READINGS
(1) Quantifiers and all of the subtopics.
(2) Quantifier Tutorial and all of the subtopics.
SLIDES & CODE
Lecture 15 Slides
Lecture 16 Slides
10/18 TOPICS
Reducing FO validity to universal fragment. Propositional Compactness. Herbrand Universes. Reducing FO validity to propositional logic.
READINGS
Harrison: Chpts 2.12, 3.7-3.8
SLIDES & CODE
Lecture 17 Slides
Lecture 18 Slides
Exam 1
10/25 TOPICS
Herbrand Interpretations. Project/presentation previews and discussion. Unification: Algorithm, Termination.
READINGS
Harrison: Chpts 3.9, 3.11-3.14
SLIDES & CODE
Lecture 19 Slides
Lecture 20 Slides
Lecture 21 Slides
11/1 TOPICS
Unification: Correctness, Optimizations. FO checking with unification/resolution, subsumption, replacement, positive & semantic resolution, set of support. Horn formulas, Logic programming.
READINGS
Harrison: Chpts 3.11-3.14
SLIDES & CODE
Lecture 22 Slides
Lecture 23 Slides
Lecture 24 Slides
11/8 TOPICS
FOL in ACL2. Equality. Equational logic, Congruence closure.
READINGS
Harrison: Chpts 4.1, 4.3, 4.4
SLIDES & CODE
Lecture 25 Slides, Lecture 25 Code
Lecture 26 Slides
11/15 TOPICS
Into to theory of Rewriting. Paper Presentations (See Piazza for schedule)
READINGS
Harrison: 4.5
SLIDES & CODE
Lecture 27 Notes, .org version
11/22 TOPICS
Presentations (See Piazza for schedule)
READINGS
None
SLIDES & CODE
11/29 TOPICS
Knuth Bendix Completion, SMT, Exam 2
READINGS
Harrison: 4.7, 5.13
SLIDES & CODE
Lecture 31 Notes, .org version
12/6 TOPICS
Project Presentations (See Piazza for the schedule)
READINGS
None
SLIDES & CODE