Promotion. Promotion is a structuring technique that may be used whenever the state of a system contains multiple, indexed instances of the same component.

Slides:



Advertisements
Similar presentations
the Entity-Relationship (ER) Model
Advertisements

CS 501: Software Engineering Fall 2000 Lecture 10 Formal Specification.
The Z Specification Language
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
© 2006 Pearson Addison-Wesley. All rights reserved9 A-1 Chapter 9 Advanced Java Topics (inheritance review + Java generics)
The Relational Model System Development Life Cycle Normalisation
Tagging Systems Mustafa Kilavuz. Tags A tag is a keyword added to an internet resource (web page, image, video) by users without relying on a controlled.
Relational Databases Relational Model Primary Keys Relation or Relationship Foreign Keys Relationships between entities Integrity Constraints Power of.
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 12 Requirements IV.
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 CS 501 Spring 2005 CS 501: Software Engineering Lecture 10 Requirements 4.
Schemas. Nature of a schema: scope of names in a Z specification Names that are not confined inside schemas. Need to declare and called as global declaration.
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 --
Issues with Clocks. Problem Lack of global time –Need to compare different events in a distributed system.
Entity-Relationship Modelling Introduced by Chen in 1976 The ER Model is used to construct the conceptual data model – independent of DBMS Most widely.
School of Technology 1 Z: Operations on Schemas David Lightfoot based on work of Andrew Simpson.
1 System: Teallach Presenters: Baolinh Le, [Bryce Carder] Course: Knowledge-based User Interfaces Date: April 29, 2003 Teallach: A Model-Based User Interface.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
The Z Notation: relations and functions Compiled By Tariq R. Soomro, Ph.D. Reference: Text Book Week-7.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Design Patterns.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Formal Methods and Models
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 10 Techniques for Requirements Definition and Specification II.
Insert Category 1 $100 $200 $300 $400 $500 $ 500$500 Insert Category 2 Insert Category 3 Insert Category 4 Insert Category 5.
PROXY BORROWER Ann Moloney, Cardiff University European EndUser Helsinki Sept 2003.
Lecture Set 11 Creating and Using Classes Part B – Class Features – Constructors, Methods, Fields, Properties, Shared Data.
ECSE Software Engineering 1I HO 5 © HY 2012 Lecture 5 Formal Methods Isn’t this really getting old?
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Course: Software Engineering ©Alessandra RussoUnit 2: States and Operations, slide number 1 States and Operations This unit aims to:  Define: State schemas.
Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  
Requirements Engineering Methods for Requirements Engineering Lecture-30.
1 15 quality goals for requirements  Justified  Correct  Complete  Consistent  Unambiguous  Feasible  Abstract  Traceable  Delimited  Interfaced.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
GroupWise Transition to Outlook Computer Training Solutions (CTS)
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
Course: Software Engineering - Design I Unit 3: Classes and ObjectsSlide Number 1 Classes and Objects  Define: Class schemas to specify object classes.
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
METS Application Profiles Morgan Cundiff Network Development and MARC Standards Office Library of Congress.
Category 1 Category 5 Category 4 Category 3 Category
Design Patterns. OO-Concepts Don’t rewrite code Encapsulation Inheritance Write flexible code.
Jeopardy Category 1 Category 1 Category 2 Category 3 Category 4 Category
Object Oriented Programming.  Interface  Event Handling.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
1 Chapter 2 Database Environment Pearson Education © 2009.
CSCI 6315 Applied Database Systems Review for Midterm Exam I Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
Category Category Category Category Category
Coupling and Cohesion Schach, S, R. Object-Oriented and Classical Software Engineering. McGraw-Hill, 2002.
CATEGORIES OF MUTUAL FUNDS WHAT ARE THE THREE MAIN GROUP OF MUTUAL FUNDS? PG NAME, TEACHER AND DATE.
Attributes and Values Describing Entities. Metadata At the most basic level, metadata is just another term for description, or information about an entity.
The Z Specification Language Based on J. M. Spivey. An Introduction to Z and formal specifications, Software Engineering Journal, 4(1):40-50, January,
Interface Concepts Modeling Core Team
Conceptual Design & ERD Modelling
OBJECT ORIENTED CONCEPT
Introduction to Database Management Systems
(State) Model-Based Approaches II Software Specification Lecture 36
Lecture # 13 (After 1st Exam)
ER Models ISSUES and Examples CS263 Lecture 9
Chapter 2 Database Environment Pearson Education © 2009.
The ANSI/SPARC Architecture aka the 3 Level Architecture
Attributes and Values Describing Entities.
Module 8 – Database Design Using the E-R Model
Chapter 9: More About Data, Arrays, and Files
The ANSI/SPARC Architecture of a Database Environment
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
SECTION 4: OO METHODOLOGIES
Chapter 6b: Database Design Using the E-R Model
CS 501: Software Engineering Fall 1999
Presentation transcript:

Promotion

Promotion is a structuring technique that may be used whenever the state of a system contains multiple, indexed instances of the same component. It is most useful when several operations are possible upon the component, and their effect is independent of the index: that is, their effect is the same for each instance.

Example1 The state of a game of trivial pursuit might be described using the following pair of schemas:

Example1

The change in state associated with a single player answering a scoring question correctly could be described by:

Example1 The change in local state - in the individual player's score - could be described by

Example1 The following mixed operation identifies a particular local score; one of the copies indexed by score:

Example1 The following operation describes the change in global state that accompanies such a correct answer: Removing the extra names from the declaration, we obtain a global operation schema:

Promotion Schema If Local describes a copy of the local state and Global describes a copy of the global state, then a promotion schema Promote will contain decorated and undecorated copies of both Local and Global. If LocalOperation contains decorated and undecorated copies of Local, then we may promote LocalOperation to the global operation

Example2

Each mailbox is a binding:

Example2 A local operation:

Example2 A promotion schema:

Example2 A global operation:

Example2 A global operation (without promotion):

Example3

A local operation :

Example3

Example We wish to describe a library of musical recordings on tape or compact disc. We shall call this system as AudioLib. We want to attach a loan category to each recording copy and we want to maintain a record of the date on which the copy was loaned out.

Example For this system the set Recording is defined by a schema so that the members of this set have a particular structure Recording cat : Category loans : seq Date rec : RecordingDetails –Date is a given set and RecordingDetails is either a given set or a schema type defined elseware –Two loan categories: Category ::= Loanable | Restricted

Example A given set of identifiers used to identify uniquely each distinct physical tape or compact disc in AudioLib stock [RecId]

Example We define the abstract state for the AudioLib system AudioLib stock : RecId ↛ Recording out : RecId ↛ Listener listeners : Listener dom out  dom stock ran out  listeners  r : dom out  (stock r).cat = Loanable

Example The predicate part of this schema says that: - only items of stock can be out on loan - loans can only be made to registered listeners - items out on loan must be loanable and not restricted to the library

Example We define an operation to change the loan category of a Recording ChangeCategory  Recording newcat? : Category report! : Report cat ≠ newcat?  (report! = Ok  cat’ = newcat?) cat = newcat?  (report! = NoChange  cat’ = cat?) loans’ = loans rec’ = rec

Example To promote operations on individual Recordings to be operations on the AudioLib abstract state, we factored using promotion; we define a promotion schema Promote  AudioLib  Recording rcid? : RecId rcid?  dom stock  Recording = stock rcid? stock’ = stock  {rcid? ↦  Recording’}

Example The constraint  Recording = stock rcid? ensures that Recording concerned is the one corresponding to stock rcid? The constraint stock’ = stock  {rcid? ↦  Recording’} ensures that stock is unchanged except that rcid? Is now associated with the modified Recording we could define an operation ChangeRecordingCateg as: ChangeRecordingCateg ≙  Recording  ChangeCategory  Promote