13 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.
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
13 May 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.
Definitions declaration abbreviation axiom free types schemas.
08 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
The Z Specification Language
Vocabulary and Properties. Determine the word or phrase described in each slide.
Introduction to Factoring 2 ∙ 3 = 6 4 ∙ 2 = 8 3 ∙ 3 ∙ 3 ∙ 3 = ∙ 3 ∙ 5 =
Instructor: Tasneem Darwish
Functional Design and Programming Lecture 1: Functional modeling, design and programming.
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 --
1 Predicates and quantifiers Chapter 8 Formal Specification using Z.
School of Technology 1 Z: Operations on Schemas David Lightfoot based on work of Andrew Simpson.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
10 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Boolean Logic & Truth Tables In today’s lesson we will look at: a reminder about truth values and NOT, AND, OR and EOR truth tables operator precedence.
01 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Digital Logic Design ESGD2201
Predicates and Quantifiers
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
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.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
The Greatest Common Factor; Factoring by Grouping
Lecture 3 [Self Study] Relational Calculus
Logic Specification and Z Schema 3K04 McMaster. Basic Logic Operators Logical negation ( ¬ ) Logical conjunction ( Λ or & ) Logical disjunction ( V or.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
CSE314 Database Systems The Relational Algebra and Relational Calculus Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
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.
University of Palestine software engineering department Introduction to data structures Control Statements: Part 1 instructor: Tasneem Darwish.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Relational Algebra.
1 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
1 Relational Algebra and Calculas Chapter 4, Part A.
03 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
Predicates and Quantified Statements
Formal Methods in SE Lecture 16 Formal Methods in SE Qaisar Javaid Assistant Professor.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 5 – September 4 th,
Copyright © Curt Hill The Relational Calculus Another way to do queries.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 9: Test Generation from Models.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Requirements Specification and Verification Using Z A. Rasoolzadegan July, 2009 AUT CEIT.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts - 6 th Edition Chapter 8: Relational Algebra.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Introduction to Logic for Artificial Intelligence Lecture 2
Module 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
CSE 311 Foundations of Computing I
Chapter 2: Intro to Relational Model
Department of Computer Science Abdul Wali Khan University Mardan
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Chapter 6: Formal Relational Query Languages
Example of a Relation attributes (or columns) tuples (or rows)
Chapter 2: Intro to Relational Model
Chapter 27: Formal-Relational Query Languages
SECTION 4: OO METHODOLOGIES
Presentation transcript:

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

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

13 May 2009Instructor: Tasneem Darwish3 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:

13 May 2009Instructor: Tasneem Darwish4 Schemas as declarations If a set comprehension has no term part, then the type of objects in the set depends upon the characteristic tuple of the declaration. For example, in the set  the characteristic tuple is the pair (a, c)  and the type of objects in the set is Z × PZ.  The set consists of every pair (a, c) that meets the stated onstraint. In a schema, the order in which components are declared is unimportant, so the characteristic tuple of is different from (a,c) the characteristic tuple has one component: the binding which is called characteristic binding.

13 May 2009Instructor: Tasneem Darwish5 Schemas as declarations If S is the name of a schema, then we write ɵ S to denote the characteristic binding of components from S. For example, A schema may be used as the declaration part of a lambda expression. For example, If SchemaOne is defined as

13 May 2009Instructor: Tasneem Darwish6 Schemas as declarations Example An object of schema type BoxOffice has two components: a set of seats allocated for the performance, and a record of which seats have been sold, and to whom. Given such an object, we may be interested in the set of seats that have yet to be sold. The function  maps an object of type BoxOffice to the number of unsold seats, calculated as the size of the set difference between seating and domsold

13 May 2009Instructor: Tasneem Darwish7 Schemas as declarations A schema may be used as the declaration part of a quantified expression. Example The following predicate states that there is an object of schema type Date such that the value of month is feb and the value of day is 29: This is true: there can be 29 days in February. Example The following predicate states that, for any object of schema type Date, the value of day must be less than or equal to 30: This is false, March is a month with 31 days

13 May 2009Instructor: Tasneem Darwish8 Schemas as declarations Whenever a schema appears as the declaration part of a quantified expression, the same result could be achieved by declaring an object of schema type. For example, the quantified predicate is logically equivalent to

13 May 2009Instructor: Tasneem Darwish9 Schemas as Predicates A schema may be used as a predicate, provided that each component of the schema has already been declared as a variable of the correct type. For example: The following quantified expression states that any integer a and set of integers c satisfying the predicate SchemaThree must also satisfy the predicate SchemaTwo.

13 May 2009Instructor: Tasneem Darwish10 Schemas as Predicates When we use a schema as a predicate, we should remember that the declaration part may include some constraint information For example, the following schema appears equivalent to SchemaTwo, but its not: Normalisation is to rewrite a schema so that all of the constraint information appears in the predicate part.

13 May 2009Instructor: Tasneem Darwish11 Schemas as Predicates For example, Schema four can be rewritten as Example The schema Date introduces two variables, month and day. Using this schema as a predicate, we can show that The schema date can be normalized as

13 May 2009Instructor: Tasneem Darwish12 Renaming It is sometimes useful to rename the components of a schema; in this way, we are able to introduce a different collection of variables with the same pattern of declaration and constraint. For example, we might wish to introduce variables q and s under the constraint of SchemaTwo: the schema is equivalent to the schema

13 May 2009Instructor: Tasneem Darwish13 Renaming Renaming the components of a schema produces a new schema type Example We may use another renaming to describe a new schema for Date.

13 May 2009Instructor: Tasneem Darwish14 Generic schemas we can rename the components of a schema but we cannot change their types. If we wish to use the same structure for a variety of different types, we may define a generic schema If we choose X to be Z then the we will get a schema which is equivalent to schematwo SchemaFive [Z]= schemaTwo