10 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.

Slides:



Advertisements
Similar presentations
18 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Advertisements

18 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
25 February 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department.
Chapter 3 : Relational Model
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
04 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Line Efficiency     Percentage Month Today’s Date
The Z Specification Language
Copyright © Cengage Learning. All rights reserved. CHAPTER 1 SPEAKING MATHEMATICALLY SPEAKING MATHEMATICALLY.
Schema Operators. State We can use the language of schemas to describe the state of a system, and operations upon it. Different aspects of the state --
Schema Operators. State We can use the language of schemas to describe the state of a system, and operations upon it. Different aspects of the state --
School of Technology 1 Z: Operations on Schemas David Lightfoot based on work of Andrew Simpson.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
01 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
The Z Notation: relations and functions Compiled By Tariq R. Soomro, Ph.D. Reference: Text Book Week-7.
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
17 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
08 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
1 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
03 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
1 Section 1.6 Sets. 2 Set Fundamental discrete structure on which all other discrete structures are built Can be loosely defined as a collection of elements.
Chapter 2 Section 2.1 Sets and Set Operations. A set is a particular type of mathematical idea that is used to categorize or group different collections.
1 Requirements Specification and Verification Using Z A. Rasoolzadegan July, 2009 AUT CEIT.
Jan 2016 Solar Lunar Data.
IT Strategy Roadmap Template
Q1 Jan Feb Mar ENTER TEXT HERE Notes
Project timeline # 3 Step # 3 is about x, y and z # 2
Average Monthly Temperature and Rainfall
C Structures, Unions, and Enumerations

2017 Jan Sun Mon Tue Wed Thu Fri Sat
Gantt Chart Enter Year Here Activities Jan Feb Mar Apr May Jun Jul Aug
Q1 Q2 Q3 Q4 PRODUCT ROADMAP TITLE Roadmap Tagline MILESTONE MILESTONE
Free PPT Diagrams : ALLPPT.com

Wireless Local Number Portability Timeline - Phase 2
Step 3 Step 2 Step 1 Put your text here Put your text here
Calendar Year 2009 Insure Oklahoma Total & Projected Enrollment
MONTH CYCLE BEGINS CYCLE ENDS DUE TO FINANCE JUL /2/2015
Jan Sun Mon Tue Wed Thu Fri Sat
ERICSSON GRAPHIC ELEMENTS
©G Dear 2008 – Not to be sold/Free to use
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ITEM 1 ITEM 2 ITEM 3
Electricity Cost and Use – FY 2016 and FY 2017
CS 240 – Lecture 7 Boolean Operations, Increment and Decrement Operators, Constant Types, enum Types, Precedence.

Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
Q1 Q2 Q3 Q4 PRODUCT ROADMAP TITLE Roadmap Tagline MILESTONE MILESTONE
Free PPT Diagrams : ALLPPT.com
Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
Text for section 1 1 Text for section 2 2 Text for section 3 3
SECTION 4: OO METHODOLOGIES
Project timeline # 3 Step # 3 is about x, y and z # 2
TIMELINE NAME OF PROJECT Today 2016 Jan Feb Mar Apr May Jun
2012 Safety Group Advantage Program Timeline
2012 Safety Group Advantage Program Timeline
Wireless Local Number Portability Timeline - Phase 2
2013 Safety Group Advantage Program Timeline
Q1 Q2 Q3 Q4 PRODUCT ROADMAP TITLE Roadmap Tagline MILESTONE MILESTONE
Presentation transcript:

10 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal Methods Schemas

10 May 2009Instructor: Tasneem Darwish2 Outlines The schema Schemas as types Schemas as declarations Schemas as predicates Renaming Generic schemas

10 May 2009Instructor: Tasneem Darwish3 Schemas In the Z notation there are two languages: the mathematical language and the schema language. The mathematical language is used to describe various aspects of a design: objects, and the relationships between them. The schema language is used to structure and compose descriptions: collecting pieces of information, encapsulating them, and naming them for re-use.

10 May 2009Instructor: Tasneem Darwish4 Schemas The mathematical language of Z is powerful enough to describe most aspects of system behaviour. but the unstructured application of mathematics results in descriptions that are difficult to understand. A schema is a piece of mathematical text which is a structure describing some variables whose values are constrained in some way.

10 May 2009Instructor: Tasneem Darwish5 Schemas Example 11.2 A concert hall uses a software system to keep track of bookings for performances. Inside the hall is a certain amount of seating, some or all of which may be made available to customers for a given performance.  we introduce seats and customers, as given sets:  The box office maintains a record of which seats have been sold, and to whom  no seat can be sold to two different customers (this relation is a function)  a set seating, a subset of Seat, to represent the seating allocated for the performance.

10 May 2009Instructor: Tasneem Darwish6 Schemas Example 11.2 A concert hall uses a software system to keep track of bookings for performances. Inside the hall is a certain amount of seating, some or all of which may be made available to customers for a given performance.  It should not be possible to book seating that has not been allocated; the following predicate should be true at all times  the domain of sold should be a subset of seating.  This property, together with the declarations of sold and seating, forms a schema which we shall call BoxOffice.

10 May 2009Instructor: Tasneem Darwish7 Schemas A schema consists of two parts: 1)a declaration of variables; 2)and a predicate constraining their values. We can write the text of a schema in one of two forms: 1)Horizontally 2) Vertically

10 May 2009Instructor: Tasneem Darwish8 Schemas Example 11.3 We can write the box office schema in horizontal form, as or in vertical form, as The order in which variables are introduced is unimportant.

10 May 2009Instructor: Tasneem Darwish9 Schemas We may name a schema by writing Or by embedding the name in the top line of the schema box Example 11.4 We can name the box office schema text by writing

10 May 2009Instructor: Tasneem Darwish10 Schemas Two schemas are equivalent if they introduce the same variables, and place the same constraints upon them Example 11.5 The following two schemas are equivalent

10 May 2009Instructor: Tasneem Darwish11 Schemas we may put each declaration on a new line, and leave out the semicolons. Also, we may put each conjunct on a new line, and leave out the conjunction symbols. For example, the predicate is another way of writing This is not the case where the line is broken with another operator

10 May 2009Instructor: Tasneem Darwish12 Schemas Example 11.6 The schema of Example 11.5 could be written in the following form: If the schema text introduces components, but places no constraints upon them, then we may omit the predicate part. Example 11.7 The following schema text has a single component, a set of seats called stalls, with no constraints This is equivalent to the text

10 May 2009Instructor: Tasneem Darwish13 Schemas as types In our mathematical language, there are four ways of introducing a type: as a given set, as a free type, as a power set, or as a Cartesian product. If we require a composite type, one with a variety of different components, then the schema language offers a useful alternative. The following schema corresponds to a composite data type with two components: an integer called a, and a set of integers called c. We may introduce elements of this type: the declaration s :SchemaOne introduces an object s of schema type SchemaOne.

10 May 2009Instructor: Tasneem Darwish14 Schemas as types To write an object of schema type in extension, we list the component names and the values to which they are bound a is bound to 2 and c is bound to the set {1, 2, 3}. Example 11.9 A date is an object consisting of two named components: the name of a month and the number of a day. We may define Month as the set of months Month == { jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec} The set of all valid dates may be represented as a schema type:

10 May 2009Instructor: Tasneem Darwish15 Schemas as types If s is an object of schema type SchemaOne, we may write s.a and s.c to denote the integer component and set component of s, respectively. Example In a token ring or Ethernet network, information is transmitted in the form of data frames. Each frame has a source address, a destination, and a data component. The type of all frames is a schema type Address is the set of all addresses in the network, Data is the set of all possible data components. If f is an object of type Frame, then we write f.source to denote its source, f.destination to denote its destination, and f.data to denote its data component

10 May 2009Instructor: Tasneem Darwish16 Schemas as declarations A schema may be used whenever a declaration is expected For example, consider the schema  The following set consists of those sets of integers c that contain the integer 0  The same effect could be achieved by replacing SchemaTwo with a list of declarations and a constraint  or by declaring an object of type SchemaTwo and selecting the two components:

10 May 2009Instructor: Tasneem Darwish17 Schemas as declarations Example If Date is the schema named in Example 11.9, then the set comprehension describes the set of all months that have 31 days: