15-819K Logic Programming

There will be 6 assignments in this course, making up 30% of your grade. All assignments are single-student assignments, while projects can be carried out in groups. Assignments always go out on a Thursday and are due the following Thursday. Since this is a graduate course, I will be relaxed about the assignment due dates. However, you must be caught up by the midterm (Thu Oct 19).

Assignments will be of varying and unannounced difficulty. If you cannot complete a problem, please write down your thoughts (for example, I tried ... and ... but ...) and hand in a partial solution. I will be generous with credit in that case. Do not hand in any wrong solutions. I will not be generous with credit in that case and might ask you do redo some problems.

Homeworks can be handed in at any time on the due date. I am not picky about the format: You may email them, print them, or write them by hand.

Problems will be a mixture of various kinds, including both proofs and programming. I will determine the parameters from the pretest results and returns from early assignments. You are welcome to use any resources to complete the assignments: textbooks, research papers, etc.

For some assignments, I will post sample solutions extracted from your hand-ins. Please keep in mind that most problems have many correct solutions, and that elegance is in the eye of the beholder. However, if you see something that is clearly wrong, I would very much appreciate a bug report.


    Out Points Assignment Sample Solution Due

1 Thu Aug 31 50   Prolog   solutions/ass1   Thu Sep 7
2 Thu Sep 7 50   Induction   solutions/ass2   Thu Sep 14
3 Thu Sep 14 50   Operational Semantics   solutions/ass3   Thu Sep 21
4 Thu Sep 21 50   Lifting and Residuation   solutions/ass4   Thu Sep 28
5 Thu Sep 28 50   Polymorphic Type Checking   solutions/ass5   Tue Oct 10
6 Tue Oct 10 50   Linear Logic   solutions/ass6   Thu Oct 19

Collaboration and Academic Integrity

All assignments in this course are single-student assignments. The work must be all your own. Do not copy any parts of any of the assignments from anyone. Do not look at other students' code, papers, or exams. Do not make any parts of your assignments available to anyone, and make sure noone can read your files. The university policies on academic integrity will be applied rigorously.

It is not considered cheating to clarify vague points in the assignments, notes, or papers, or to give help or receive help in using the computer systems, compilers, debuggers, profilers, or other facilities.

Assignment 1: Prolog

Solve the following problems, striving for elegance in your solutions. You should express your answers in Prolog. The questions can be found near the end of each set of lecture notes.

  • 1.2 Unary arithmetic
  • 1.4 Binary arithmetic
  • 2.3 Merge sort
  • 2.4 Dutch national flag problem

Assignment 2: Induction

Solve the following problems, striving for elegance in your solutions. You should express your answers in the proof format given in lecture except for question 4.2 which should be formulated in Prolog. The questions can be found near the end of each set of lecture notes.

  • 3.4 Addition is commutative
  • 3.5 Nil is the right unit for append
  • 3.6 Append is associative
  • 4.2 Loop detection

Assignment 3: Operational Semantics

Solve the following problems, found near the end of each set of lectures notes. Some question are somewhat open-ended: try to answer the essence of the question concisely first, then speculate with further remarks as you see fit.

  • 5.2 Unsoundness of naive failure continuation
  • 5.6 Compute number of solutions
  • 5.7 Prove non-termination
  • 6.2 Failure of naive completeness proof

Assignment 4: Lifting and Residuation

  • 7.5 Complexity of append
  • 8.1 Answer substitutions for backtracking semantics
    You do not need to prove soundness and completeness, but you should state them generally enough so their inductive proof goes through.
  • 8.3 Completness of residuation
    Please show all the cases.

Assignment 5: Polymorphic Type Checking

Assignment 6: Linear Logic

[ Home | Schedule | Assignments | Handouts | Software | Resources ]

Frank Pfenning