0% found this document useful (0 votes)
92 views

SOEN 6481 Software Systems Requirements Specification (Winter 2015/16) Worksheet #5: Z

This document provides specifications for a birthday book application in the formal specification language Z. It includes existing schemas for the BirthdayBook state, the AddBirthday operation, and the FindBirthday operation. It lists two exercises: 1) to write the specification for a RemoveBirthday operation, and 2) to combine the FindBirthday and additional schemas to add error handling.

Uploaded by

picala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

SOEN 6481 Software Systems Requirements Specification (Winter 2015/16) Worksheet #5: Z

This document provides specifications for a birthday book application in the formal specification language Z. It includes existing schemas for the BirthdayBook state, the AddBirthday operation, and the FindBirthday operation. It lists two exercises: 1) to write the specification for a RemoveBirthday operation, and 2) to combine the FindBirthday and additional schemas to add error handling.

Uploaded by

picala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SOEN 6481 Software Systems Requirements Specification (Winter 2015/16)

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:

[NAME , DATE ] AddBirthday


BirthdayBook
BirthdayBook name? : NAME
known : PNAME date? : DATE
birthday : NAME
7 DATE
name? 6 known
known = dom birthday birthday 0 = birthday {name? 7 date?}

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

You might also like