This repository contains all the tutorial coursework for the course CS F214: Logic in Computer Science at BITS Pilani, Pilani Campus in Fall 2021.
In the command line, open SWI-Prolog by typing swipl
and load the required files as given below.
> swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.2.4)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
1 ?- [ex1].
true.
true
will indicate the knowledge base has been loaded succesfully.
Tutorial | Date | Topic | Tutorial Sheet |
---|---|---|---|
1 | 26 August 2021 | Introduction to SWI Prolog | Tutorial 1 |
2 | 2 September 2021 | Matching and Proof Search | Tutorial 2 |
3 | 9 September 2021 | Recursion | Tutorial 3 |
4 | 16 September 2021 | Lists | Tutorial 4 |
6 | 30 September 2021 | Arithmetic | Tutorial 6 |
7 | 7 October 2021 | More Functions with Lists | Tutorial 7 |
12 | 9 December 2021 | Program Verification of Insertion Sort | Tutorial 12 |
Note: Tutorials 5, 8, 9, 10, 11, 12 were not based on Prolog.
All files on this repository are for educational purpose with no intentions of promoting any unfair means in any evaluative component.