Presentation is loading. Please wait.

Presentation is loading. Please wait.

Z - Notation Presented By: Adam Attinello CMSC 445.

Similar presentations


Presentation on theme: "Z - Notation Presented By: Adam Attinello CMSC 445."— Presentation transcript:

1 Z - Notation Presented By: Adam Attinello CMSC 445

2 Z – Notation? HUH?!? First off – its pronounced Zed First off – its pronounced Zed –After the Zermelo-Fränkel set theory Zermelo-Fränkel set theoryZermelo-Fränkel set theory It is a set of conventions for presenting mathematical text, chosen to make it convenient to use simple mathematics to describe computing systems. It is a set of conventions for presenting mathematical text, chosen to make it convenient to use simple mathematics to describe computing systems. It is targeted to clarify and streamline the specification and requirement process It is targeted to clarify and streamline the specification and requirement process

3 Boring Facts About Z – Notation Based on the standard mathematical notation Based on the standard mathematical notation –The mathematical notation of Z consists of a small core Supplemented by a larger collection of useful objects and operators called the Z mathematical tool-kit. Supplemented by a larger collection of useful objects and operators called the Z mathematical tool-kit. Some Problems with Z notation Some Problems with Z notation –Z notation uses many non-ASCII symbols ASCII –The specification includes suggestions for rendering the Z notation symbols in ASCII as well as LaTeX. ASCIILaTeXASCIILaTeX

4 How To Model A System Z decomposes specifications into manageably sized module’s, called schemas: Z decomposes specifications into manageably sized module’s, called schemas: –Schemas are divided into 3 parts: A State A State A collection of state variables and their values A collection of state variables and their values There are also some operations that can change its state There are also some operations that can change its state Z is also a natural fit to object-oriented programming. Z is also a natural fit to object-oriented programming. –You can also use Z in a functional style, among others –There are some object oriented languages that extend Z

5 Z – Notation Formulas Z operators are defined by formulas. Z operators are defined by formulas. These are done through symbols These are done through symbols These symbols hold most of the same meanings as they do in an of our math classes These symbols hold most of the same meanings as they do in an of our math classes

6 The Birthday Book Example This is the “Hello World of Z Notation” This is the “Hello World of Z Notation” –This is a shorter version of the true example My example will allow you too do 3 things: My example will allow you too do 3 things: –Add a person’s name and birthday –Store that information –Then find it again

7 Notation Example Some variables are declared. As well as state transitions. Relationship between the values of the variables Name Init Birthday Book Known =  Birthday Book [NAME; DATE]:

8 Notation Example II One possible state of the system has three people in the set known, with their birthdays recorded by the function birthday: known = { John; Mike; Susan } birthday = { John 25-Mar, Mike 20-Dec, Susan 20-Dec } Birthday book known: NAME birthday: NAME DATE Known : dom birthday

9 How the system might look name?  known birthday’ = birthday U { name? date} Add Birthday Birthday Book name?: NAME date?: DATE

10 Notation Example III Find Birthday Birthday book name?: NAME Date! : DATE name?  Known date != birthday(name?)

11 REFERENCES http://spivey.oriel.ox.ac.uk/mike/zrm/z rm.pdf http://spivey.oriel.ox.ac.uk/mike/zrm/z rm.pdf http://spivey.oriel.ox.ac.uk/mike/zrm/z rm.pdf http://spivey.oriel.ox.ac.uk/mike/zrm/z rm.pdf http://staff.washington.edu/jon/z- lectures/z-lectures.html http://staff.washington.edu/jon/z- lectures/z-lectures.html http://staff.washington.edu/jon/z- lectures/z-lectures.html http://staff.washington.edu/jon/z- lectures/z-lectures.html Software Engineering Theory and Practice, 3 rd Edition Software Engineering Theory and Practice, 3 rd Edition


Download ppt "Z - Notation Presented By: Adam Attinello CMSC 445."

Similar presentations


Ads by Google