Professional Documents
Culture Documents
Worksheet #5: Z
Z is a well-known and (relatively) easy to learn formal specification language. In this exercise, you will
develop some simple Z schemas to formally specify a birthday book application (i.e., a database holding
names together with their birthdays). For reference, here are the schemas already developed during the lecture:
Exercise 1: Writing an Operation Schema. Write the Z specification for RemoveBirthday; the input
variable is the name to be removed:
RemoveBirthday
Exercise 2: Schema Combination. To add error handling, you have to combine some existing schemas to
a new robust schema: RFindBirthday = (FindBirthday Success) NotKnown:
Success
result! : REPORT
FindBirthday result! = ok
BirthdayBook
name? : NAME
date! : DATE NotKnown
BirthdayBook
name? known name? : NAME
date! = birthday(name?) result! : REPORT
name? 6 known
result! = not known
RFindBirthday