Repository for the course Logic for Computer Scientists - DD1351.
In this course, we covered topics in mathematical logic and computer science, including propositional and predicate logic, Prolog, inductive proofs, temporal logic, and Hoare logic. I learned to specify and prove properties of mathematical-logical structures and program properties. The assessment included homework, quizzes, and lab work. The main focus of the labs was to solve different problems using Prolog, such as verifying a proof in predicate logic. This repository contains the code for all the labs.
There were three labs in the course, and the folders "lab 1-3" correspond to these. The instructions for each lab are contained within a PDF in each folder (.txt file for lab 1).
- Lab 1 - introductory exercises to learn the basics of the Prolog language. Each of the .pl files in the folder corresponds to one of the lab exercises.
- Lab 2 - a natural deduction proof checker. The code for the proof checker can be found in the "verify.pl" file. Tests can be found either directly in the folder or in the subfolder "tests".
- Lab 3 - a model checker for temporal logic CTL. The code for the model checker can be found in the "verify.pl" file.