Logic and Computation
CS 2800 Spring 2017

College of Computer and Information Science
Northeastern University
CS 2800 is a 4-credit course. The Office of the Registrar has useful information.

Sections

For Instructors, TAs, and Tutors, click on Contact Info on your left.

You are required to check for announcements daily.

Rules

Books and Supplies

All that we require you to purchase is a TurningPoint Responder Card RF (also referred to as the TurningPoint clicker). You can purchase the card from the Northeastern University bookstore. Once you do, please log on to Blackboard and register the card. You can do that by logging in to the class, then clicking on Tools (on the left), and then find and click on the TurningPoint Registration Tool. Please see these instructions. You have to bring the card to every class. You cannot use your smartphone or any other alternative. (We tried this in the past and there were just too many technical problems.)

There is no required book. If you want a reference that also includes a lot of exercises, then consider: Computer Aided Reasoning. Kaufmann, Manolios, Moore. You can order it from here. Please note that the book was written for at least upper level undergraduate students, so expect parts of the book to be hard. Also, in class we use a version of ACL2 that includes contracts and lots of other things that are not mentioned in the book. Nevertheless, this is the standard reference for ACL2 and contains many exercises whose solutions are available online.

Software

We will be using the ACL2s system. Please download it and install it on your machines. It is also installed in the CCIS computer labs, but there are some instructions you should follow to use that installation properly.

Academic Integrity

Read and intimately familiarize yourselves with the Northeastern Academic Integrity policy.

Please read and sign the Course Contract.

Warning: We do not tolerate any violations. If we suspect that you violated the policy, we will report you and the consequences can be as severe as expulsion from the university.

For example, here is something you cannot do, but again, read the full policy, the course contract and see Mitch Wand's Web page on the topic.

Unauthorized Collaboration: The University defines unauthorized collaboration as instances when students submit individual academic works that are substantially similar to one another. While several students may have the same source material, the analysis, interpretation, and reporting of the data must be each individual's independent work.

We will be using the clickers for quizzes. You can only use your clicker in class. If you use someone else's clicker, you are violating the academic integrity policy.

Exams

There are exactly two exams. They will take place at the following times:

For exam 1: Students in section 5 will go to RI 227. Students in sections 1-4 will go to RI 200.

For exam 2:

  1. Students in section 1 will go to SN 108.
  2. Students in section 2 will go to SN 168.
  3. Students in section 3 will go to ISEC 102.
  4. Students in section 4 will go to SN 168.
  5. Students in section 5 will go to ISEC 102.

Grading

Grades will be determined as follows.

There are only 2 exams and there is no final.

Quizzes will occur regularly. Be prepared for a short quiz every day. Quizzes will utilize the TurningPoint clicker. Only a subset of the quizzes might be graded. If you are not present for a quiz or if you do not have your clicker, you will get 0 points. We will drop the lowest 10% of quizzes.

Homeworks will be given about once a week. Your homework grade will be based on your top ten homeworks. You will mostly work in groups. We will give you instructions on group sizes and composition. We recommend that you to first try to solve the problems on your own. Then meet with your partners to go over your solutions and solve any unresolved problems. We may only grade a subset of the problems assigned. Homeworks will be due on Tuesday at 11:59PM, unless otherwise noted.

You will spend most of your time in labs working on problems that we distribute in advance. If you solve the problems on your own before lab and are confident in your solutions, there is no need to show up. If you did not have time to solve the problems, or you tried and ran into trouble, then go to lab.

Grading Notes

Prerequisites

CS 1800 and CS 2500.
If you do not have this background you should get the permission of the instructor. Our policy is that we do not grant exemptions if you did not getting passing grades in both the prerequisites: experience has shown that this is the best policy for students.

Schedule

Week
Topics
Jan 9
L1-L3
  1. Introductions & motivation
  2. Syllabus, class webpage, programming review
  3. Designing data-driven programs, the ACL2s development environment
Jan 16
L4-L5
  1. Basic data types, expressions, syntax & semantics of atomic data and associated primitive functions
  2. Syntax & semantics of lists, design considerations of the ACL2s core language
Jan 23
L6-L8
  1. Contracts, termination, useful macros, let
  2. Datatypes: enumerated, range, product, record, union, list, (mutually) recursive
  3. Property-based testing, test?, program mode and defunc settings
Jan 30
L9-L11
  1. Boolean logic, one-time pads
  2. Properties of Boolean operators, characterization of formulas, introduction to P=NP
  3. Proof methods: instantiation, case analysis, equational proofs, truth tables, decision procedures
Feb 6
L12-L14
  1. Limitations of Boolean logic, intro to equational reasoning for programs
  2. Axioms for equality, cons-first-rest axioms, definitional axioms, instantiation, contract checking and completion
  3. Equational reasoning in the presences of implications, context vs. theorems, undecidability results
Feb 13
L15-L17
  1. Equational reasoning with nested Boolean operators, derived context
  2. Reasoning about arithmetic, program equivalence: proving correctness of an exponential-time improvement, numeric reasoning in C & other languages
  3. The equational reasoning recipe and examples
Feb 20
L18
  1. Make-up class
  2. Review
Feb 27
L19-L21
  1. Definitions: soundness, termination, contracts, the ACL2s Definitional Principle
  2. Termination, measure functions
  3. Using termination to show soundness of common recursions schemes and the design recipe, the undecidability of termination analysis, big-Oh analysis as a refinement of termination
Mar 13
L22-L24
  1. Proof by contradiction, mathematical induction, well-foundnesses, a proof that mathematical induction works, how to extract induction schemes from admissible recursive functions
  2. Using induction to prove program correctness
  3. Induction like a professional
Mar 20
L25-L27
  1. Data-function-induction trinity
  2. Generalization, lemma generation, dealing with induction failure
  3. Intro to reasoning about accumulators
Mar 27
L28-L30
  1. Tail recursion: efficiency considerations, how to prove correctness
  2. Accumulator reasoning examples
  3. Reasoning about algorithms & libraries: sorting, correctness
Apr 3
L31-L33
  1. Abstract and algebraic data types
  2. Observational equivalence
  3. Planning and structuring considerations for proofs
Apr 10
L34-L36
  1. Exam2 Review
  2. Reasoning about imperative programs and security
  3. Mathematical logic: syntax, semantics, proof theory, undecidability, incompleteness
Apr 17
L37
  1. A look back: Logic and the birth of computer science; A look forward: what's next