For some of the people recorded in
there is a record of their dates of birth and death. Dates are stored as lists [day,month,year] and the relevant information is available through lived(Person,Birth_date,Death_date). Write the predicate which determines the person or persons alive in a particular year. When doing this, you should ignore days and months (in other words, assume all birthdays are 1 January and all death days 31 December!).
Feel free to extend the exercise to some specific [day,month,year]. But make sure before you spend time on it that you can handle the later exercises which form
Given that year zero is used in
to denote "don't know", your answers to (2) will include some distinctly elderly people; add predicates to exclude those who have a birth year of zero - or, to be more realistic, assume that (unless recorded to the contrary) women died at age forty and men at age sixty.
Modify one of the predicates used in question one, so as to produce a list of all people in some given family relationship with a given person. This isn't quite as simple as it seems; probably you will want to use either recursion or a failure driven loop. For test data, try some of the Scots who were alive towards the end of the fifteenth century.
If this exercise causes you difficulty, you may find it advisable first to tackle Practical 3's