# Logic and Computability (SS 2024)

### Table of Content

## Content

In this course, you will learn to understand logic formulas, to use concise mathematical notations, to formulate and solve problems in formal languages, and to reason with logics manually and algorithmically. We will use powerful tools, so called SMT solvers, that are able to quickly solve complex problems involving constraints over integers, reals, first-order logic predicates, list, and other data types. We will teach logic proof systems, and you will gain the ability to construct logic proofs on your own and you will master common proof techniques of computer science.The content of this lecture includes:

- Syntax and semantics of logic formulas in propositional logic and predicate logic (first-order logic)
- Propositional satisfiability problem – DPLL algorithm – Resolution proofs
- Satisfiability modulo Theories - DPLL(T)
- Basics of logical reasoning (natural deduction)
- Binary Decision Diagrams
- Temporal Logic
- Introduction to the SMT Solver Z3

## Material

The students will be provided with videos, slides, lecture notes and a questionnaire. The material will be online before the corresponding lecture. proof rules for Natural Deduction and the Tseitin's encoding rules can also be used during the exam and the exercise classes. Solutions for the questions from the questionnaire will be released here. You can watch videos explaining the topics discussed in the lecture in the TUbe.## Practicals

Number | Topic | Kick-Off | Deadline | Assignment | Solutions |
---|---|---|---|---|---|

1 | SAT Solving and Binary Decision Diagrams | 2024-03-08 | 2024-03-20 | Assignment 1 [DPLL Table] | Solutions 1 |

2 | Natural Deduction for Propositional Logic | 2024-03-22 | 2024-04-10 | Assignment 2 | Solutions 2 |

3 | Equivalence Checking and Predicate Logic | 2024-04-12 | 2024-04-24 | Assignment 3 | Solutions 3 |

4 | Natural Deduction for Predicate Logic | 2024-05-03 | 2024-05-15 | Assignment 4 | Solutions 4 |

5 | Satisfiability Modulo Theory | 2024-05-17 | 2024-05-22 | Assignment 5 | Solutions 5 |

6 | Z3 Programming Assignment | 2024-04-12 | 2024-06-05 | Upstream Repository |

## Administrative Information

**Administrative Information - Lecture**

**Questionnaire**Students will be provided with a questionnaire. These questions cover the theoretical aspects of the lecture as well as practical examples. The questions for a particular topic will be published on Monday before the corresponding lecture. The questions

**at the exam**are a

**subset of the questions of the questionnaire**.

**Course Procedure**The lecture takes place every Friday at 10:15-12:00 at i13. During class, we will interactively work out the theory and solve questions from the questionnaire.

**Exams**Dates for exams will be set via TUGrazonline, please register there. Exams will have a duration of 90 minutes and there will be at least 3 possible dates for exams each semester. The questions

**at the exam**are a

**subset of the questions of the questionnaire**.

**Communication - Discord**Please use the Discord invitation link to simplify the communication during the semester.

**Administrative Information - Practicals**

**Course Procedure**In total, we will have 5 pen-and-paper assignments and practical programming assignments. For the five pen-and-paper assignments you will practice the basic decisions procedures, basic algorithms, and perform simple proofs by hand. The practical programming assignments will cover simple examples using the python library of z3. The assignments will be discussed by students during live blackboard sessions in class. Please register for any of the 10 groups. Students are required to

**tick**the tasks they have solved via the TeachCenter. The deadline for ticking is Thursday 23:59am before the respective practical session. Students will be randomly selected during class to present their solutions. Submitting the programming examples will be handled via git. You will receive your repository after the registration deadline for the course has ended. The attendance of practical classes is compulsory. For justified reasons (sickness), exceptions can be made. In such cases, students have to tick

**and upload**their solutions in time (according to the deadline of the assignment) and have to present their solutions in a replacement interview that will be held in the following week, on Thursday at 2:00pm. If students are not able to explain their solution or their solution is completely wrong, students may lose either 50% or 100% of the points of that assignment. Minor errors or typos will not lead to any point reductions.

**Grading for the Practicals**

- Assignment 1 - 5: 15 points each
- Programming Assignment: 25 points
- Assignments may include bonus points.

- >= 87.5%: (1) Sehr Gut / Excellent
- >= 75.0%: (2) Gut / Good
- >= 62.5%: (3) Befriedigend / Satisfactory
- >= 50.0%: (4) Genügend / Sufficient
- >= 00.0%: (5) Nicht Genügend / Insufficient

**Communication - Discord**Please use the Discord invitation link to simplify the communication during the semester. For any questions, please contact either Stefan Pranger or Bettina Könighofer.