Semantic and Declarative Technologies Course -- AIT 2022 Spring Semester

This page contains information on the Semantic and Declarative Technologies Course -- AIT 2022 Spring Semester


Slides of the present, 2022 Spring semester

Videos of the 2022 Spring semester

Prolog systems

The main Prolog system of the course is SICStus Prolog. You will obtain, through email, download instructions and a licence (valid till the beginning of the next term).
You can use other Prolog systems, but your homeworks will be run using SICStus Prolog. Of the free Prolog systems we recommend SWI-Prolog, which also has a Web-based sandbox environment: SWISH. During the course we will try to give some help in solving compatibility issues.

Code samples

The example programs presented on the slides can be downloaded from here.
The programs are placed in files prefixed with the page number of the slide.

ETS - the Electronic Teacher Support system

The login page of ETS is available here. Sometimes you have to press the Reload button, possibly several times, for the login page to appear. Some browsers may also ask you for additional confirmation as they consider this an "unsafe" site.

For logging into ETS you will need a user code (given by us) and a password (chosen by you). Your user code is obtained by concatenating your last name(s) and the (official) first name, in this order, and taking the first six letters of this string (omitting spaces, hyphens, etc). For example, if your name is Joe Ford, your user code will be FORDJO. If in doubt, check this list.

When you first log in:

  1. enter your user code, leave the password field blank;
  2. enter an email address in the form displayed, then press the Go button;
  3. wait until you receive a generated password at the email address provided by you;
  4. enter this password in the second form displayed;
  5. from now on you can access the services of ETS using this password.
You can change your email and password anytime using the menu item "My data". Please do not use a valuable password here.

Using the sandbox within ETS

Using your ETS user code and password you can get access to a local SWI Prolog sandbox here.

Submitting homework via ETS

Using the "Submit" menu item you can submit your Prolog code for practice sessions and assignments.

You can submit the same piece of work several times, the last submission overrides all the earlier versions. You are encouraged to submit homework exercise solutions incrementally, so that you can get early feedback. However, make sure that the last submission includes all earlier submissions (or corrected versions of these).

You can upload a file with an arbitrary name, but the uploaded file will be (re)named to the file-name given on the submission page.

After uploading, your homework enters a queue and is tested shortly afterwards. The log of the test is mailed to you. It can also be viewed by clicking on the icons in the "Test log" column in the bottom right of the submission page.


Practice tools

Propositional formulas (L1-1, ..., L1-4), compulsory, due by midnight Feb-14-2022
Propositional resolution (L3-1 compulsory, L3-2 optional), both due by midnight Feb-17-2022
Prolog execution P1-1 (compulsory), due by midnight Mar-10-2022
Prolog execution P1-2 (compulsory), preferably to be solved by 11:00am Mar-10-2022, due by midnight Mar-17-2022
Constraint execution C1-1 (compulsory), due by midnight Apr-25-2022

Links of potential interest

What is the name of this book?
David H. D. Warren. What is Prolog? Slides for a talk, 1974, 15 pages.
Prolog and Logic Programming Historical Sources Archive

Course information

Office hours: Mondays 6pm-7pm. Other dates can be arranged as well.

The course rules can be downloaded from here.

Mid-term test

You will write the mid-term test on Apr-05-2022 from 4pm in Room 1.

Sample mid-term tests are available: sample 1, sample 2, solutions: sample 1, sample 2,


All assignments are to be submitted via the ETS Electronic Teacher Support (ETS) tool.

Assignment 1

Solving a Sudoku puzzle: .pdf.
You can download the test cases from here.

Deadline : Monday, April 11th, 2022
Please read some important advice given here.
If (and only if) you think you are unable to solve the problem, please read the hints available from this page.

There is some information on how to handle subgrids without recursion here.
You can discuss approaches and algorithms, but no code pieces should be shared!

Assignment 2

Solving a Skyscraper Sudoku puzzle: .pdf.

Deadline: Monday, May 9th, 2022.

A description of Skyscraper Sudoku rules can be found here.
You can download the test cases from here.

Here is a related video. A simpler version of the puzzle can be played online here.

Lots of Skyscraper Sudoku puzzles can be downloaded from here.


The finals are split into two parts: a sit-in part on the Semantic Web, and a take-home part on CLPFD programming. You will write the sit-in part (Semantic Web) of the final test on Monday, May 23rd, 2022 at 4 pm.

The sample final test (Semantic Web part) can be downloaded from here and its solution from here.

The CLPFD part of the final test can be downloaded from here. It can be submitted and tested using ETS.
CLPFD part deadline: 8:00pm Monday 23rd May.

The CLPFD part is related to the end view puzzle, see e.g. here.

Last modified by Péter Szeredi,, on May-23-2022.