+ All Categories
Home > Documents > Chapter 5: Software Specificationengr.uconn.edu/~steve/Cse230/finchapter5p1.pdf · Chapter 5:...

Chapter 5: Software Specificationengr.uconn.edu/~steve/Cse230/finchapter5p1.pdf · Chapter 5:...

Date post: 12-May-2018
Category:
Upload: tranngoc
View: 214 times
Download: 1 times
Share this document with a friend
58
CH5.1 CSE230 Chapter 5: Software Specification Chapter 5: Software Specification Prof. Steven A. Demurjian Computer Science & Engineering Department The University of Connecticut 371 Fairfield Road, Box U-2155 Storrs, CT 06269-2155 [email protected] http://www.engr.uconn.edu/~steve (860) 486 – 4818 (860) 486 – 3719 (office) CH5.2 CSE230 Overview Overview of Chapter 5 of Chapter 5 What is a Specification? What is a Specification? Operational and Diagrammatic Specifications Operational and Diagrammatic Specifications Data Flow Diagrams, Finite State Machines, Petri Nets, Entity Relationship Diagrams UML Diagrams (Briefly – Revisit in Total) Mathematical Mathematical- Based Specifications Based Specifications Queueing and Simulation Models Declarative Specifications Logic-Based Notations Algebraic Notations Languages for Modular Specifications Statecharts and Z Specification Notations and Writing Specifications Specification Notations and Writing Specifications
Transcript

1

CH5.1

CSE230

Chapter 5: Software SpecificationChapter 5: Software Specification

Prof. Steven A. DemurjianComputer Science & Engineering Department

The University of Connecticut371 Fairfield Road, Box U-2155

Storrs, CT 06269-2155

[email protected]://www.engr.uconn.edu/~steve

(860) 486 – 4818(860) 486 – 3719 (office)

CH5.2

CSE230

OverviewOverview of Chapter 5of Chapter 5What is a Specification?What is a Specification?Operational and Diagrammatic SpecificationsOperational and Diagrammatic Specifications

Data Flow Diagrams, Finite State Machines, Petri Nets, Entity Relationship DiagramsUML Diagrams (Briefly – Revisit in Total)

MathematicalMathematical--Based SpecificationsBased SpecificationsQueueing and Simulation Models Declarative Specifications

Logic-Based NotationsAlgebraic Notations

Languages for Modular SpecificationsStatecharts and Z

Specification Notations and Writing SpecificationsSpecification Notations and Writing Specifications

2

CH5.3

CSE230

WhatWhat’’s in a Specification?s in a Specification?Specification is Broad Term that Means DefinitionSpecification is Broad Term that Means Definition

Used at Different Stages of Software Development For Different PurposesStatement of Agreement (Contract) Between

Producer and Consumer of A ServiceImplementer and User

All Desirable Qualities Must Be SpecifiedStatement of User RequirementsStatement of User Requirements

Major Failures Occur Due to Misunderstandings Between Producer and User"The Hardest Single Part of Building a SoftwareSystem is Deciding Precisely What To Build" (F. Brooks – Mythical Man Month)

CH5.4

CSE230

WhatWhat’’s in a Specification?s in a Specification?Specification can be Many Different things to Many Specification can be Many Different things to Many Different Stakeholders (User, Designer, Manager, etc.)Different Stakeholders (User, Designer, Manager, etc.)Requirements Specification:Requirements Specification:

Agreement between End User and DesignersDesign Specification:Design Specification:

Agreement between Designers and DevelopersModule Specification:Module Specification:

Agreement between SEs that Use a Module and SEs that Implement a Module re. Interface

ObjectObject--Oriented Specification:Oriented Specification:Assertion of Class’ Capability via Public Interface

Specification Involves Specification Involves ““WhatWhat””Implementation Involves Implementation Involves ““HowHow””

3

CH5.5

CSE230

Uses of SpecificationUses of SpecificationStatement of UserStatement of User’’s Needss Needs

Statement of Interface Between Machine and Controlled Environment

Critical Issues:Critical Issues:User’s Needs May not be Understood by DeveloperNeed Ability to Verify Specification

Problem Faced:Problem Faced:Serious Undesirable Effects can Result Due to Misunderstandings Between Software Engineers and Domain Experts \

CH5.6

CSE230

Uses of SpecificationUses of SpecificationStatement of Implementation RequirementsStatement of Implementation Requirements

Hardware, OS, Language(s), DBMS, etc.Requirement Specification

External Behavior of SystemFunctional and Non-Function BehaviorDesign Spec Verified Against Requirements Spec

Design SpecificationDescription of Software ArchitectureCode Must be Verified Against Design Spec

Reference Point During Product MaintenanceReference Point During Product MaintenanceVerify that Changes Satisfy RequirementsChange in Specification Requires Adaptive Maintenance

4

CH5.7

CSE230

Classic Information System DesignClassic Information System Design

CH5.8

CSE230

Data vs. InformationData vs. Information

5

CH5.9

CSE230

Specification QualitiesSpecification QualitiesClear, Unambiguous, UnderstandableClear, Unambiguous, UnderstandableConsistentConsistent

Inconsistencies May be Impossible to ImplementComplexity May Lead to InconsistencyInconsistencies Lead to Incorrect Implementation

CompletenessCompletenessInternally Complete: Specification Defines any new Concept or Terminology that it UsesW.r.t. Requirements; All Requirements Should be Contained within SpecificationIncrementality Aids Achievement of Completeness

How Does the Achievement of Software Qualities How Does the Achievement of Software Qualities Affect the Attainment of Specification Qualities?Affect the Attainment of Specification Qualities?LetLet’’s See Some Examples of These Qualitiess See Some Examples of These Qualities……

CH5.10

CSE230

Clear, Unambiguous, UnderstandableClear, Unambiguous, UnderstandableSpecification Fragment for a WordSpecification Fragment for a Word--ProcessorProcessorCan an Area be Scattered, or Must it be Contiguous?Can an Area be Scattered, or Must it be Contiguous?

Selecting is the process of designating areas of the document that you want to work on. Most editing and formatting actions require two steps: first you select what you want to work on, such as text or graphics; then you initiate the appropriate action.

6

CH5.11

CSE230

Precise, Unambiguous, ClearPrecise, Unambiguous, ClearConsider a RealConsider a Real--Time SafetyTime Safety--Critical SystemCritical SystemCan a message be accepted as soon as we receive 2 out of 3 identical copies of message or do we need to wait for receipt of the 3rd?

The message must be triplicated. The threecopies must be forwarded through three different physical channels. The receiver accepts the message on the basis of a two-out-of-three voting policy.

CH5.12

CSE230

ConsistentConsistentSpecification Fragment for a WordSpecification Fragment for a Word--ProcessorProcessorWhat if the length of a word exceeds the length of the line?What should the action of the editor be?

The whole text should be kept in lines of equal length. The length is specified by the user. Unless the user gives an explicit hyphenation command, a carriage return should occur only at the end of a word.

7

CH5.13

CSE230

Specification StylesSpecification StylesInformal: Natural Language, Spec by Visio/PPT, Informal: Natural Language, Spec by Visio/PPT, Figures, Tables, etc.Figures, Tables, etc.Formal: Notation with precise Syntax/SemanticsFormal: Notation with precise Syntax/Semantics

Advantages:May Allow Formal VerificationMay Support Automatic Processing (Code Gen)Allows Use of Mathematical ModelsMay be Used to Generate Test Cases (Chapter 6)

Disadvantages:Formal Specifications Not Widely UsedHard to Justify Economic GainTraining Issues for Personnel

SemiSemi--Formal: No Precise Semantics (TDN/GDN)Formal: No Precise Semantics (TDN/GDN)

CH5.14

CSE230

Specification StylesSpecification StylesOperationalOperational

Describes Desired Behavior of SystemUsually Provides a Model of System BehaviorVerified by Prototyping

DescriptiveDescriptiveDescribes Desired Properties of SystemDeclarative SpecificationUsually Uses Mathematical EquationsMore Abstract than Operation SpecificationNo Focus on Implementation

Actual Specifications Actual Specifications –– Mix of BothMix of Both……

8

CH5.15

CSE230

Operational Specification ExampleOperational Specification ExampleConsider a geometric figure E:Consider a geometric figure E:E can be drawn as follows:1. Select two points P1 and P2 on a plane2. Get a string of a certain length and fix its ends

to P1 and P23. Position a pencil as shown in next figure4. Move the pen clockwise, keeping the string

tightly stretched, until you reach the point whereyou started drawing

P P1 2

CH5.16

CSE230

Verification of SpecificationsVerification of SpecificationsTwo Approaches:Two Approaches:

“Observe” Dynamic Behavior of Specified System (Simulation, Prototyping, “Testing” specs)Analyze Properties of the Specified System

Both Depend on Formality of SpecificationBoth Depend on Formality of SpecificationAnalogy with Traditional EngineeringAnalogy with Traditional Engineering

Physical Model of a BridgeBuild An Actual ModelTest it out in Wind Tunnel

Mathematical Model of a BridgeWhatWhat’’s Reality of Bridge Building?s Reality of Bridge Building?

Guarantee of Success w.r.t. Weight, Weather, etc.Are there Similar Guarantees in Software?Are there Similar Guarantees in Software?What Software Applications Need Such Guarantees?What Software Applications Need Such Guarantees?

9

CH5.17

CSE230

Operational SpecificationsOperational SpecificationsAllow the Behavior of a System to be DefinedAllow the Behavior of a System to be DefinedMany Complementary TechniquesMany Complementary Techniques

Data Flow DiagramsUML Diagrams (Briefly and Separate Lecture)Finite State MachinesPetri Nets

Operational Specifications Provide Means to Model Operational Specifications Provide Means to Model System from Alternative PerspectivesSystem from Alternative Perspectives

Perspectives Must be Consistent with One AnotherSome Techniques Target End-User/CustomerOthers are More Software Engineering IntensiveKey Issue: All Diagrams Must be Consistent in Terminology to Yield Strong Result

CH5.18

CSE230

Data Flow Diagrams (Data Flow Diagrams (DFDsDFDs))A SemiA Semi--Formal Operational SpecificationFormal Operational SpecificationSystem Viewed as Collection of Data Manipulated by System Viewed as Collection of Data Manipulated by ““FunctionsFunctions””Data can be Persistent Data can be Persistent -- Stored in Data RepositoriesStored in Data RepositoriesInput State to Represent Trigger of Data FlowInput State to Represent Trigger of Data FlowOutput Output State(sState(s) to Represent Result of Data Flow) to Represent Result of Data FlowData can Flow from Input to Function to/from Data can Flow from Input to Function to/from Repositories to OutputRepositories to OutputDFDsDFDs have a Graphical Notationhave a Graphical Notation

Tools are Commercially Availablehttp://www.qsee-technologies.com/multi-case.htmhttp://www.aisintl.com/case/products/PowerDesigner/sdesign.html

10

CH5.19

CSE230

DFDsDFDs Employ a Graphical NotationEmploy a Graphical NotationWhat are Main What are Main ModelingModeling Constructs?Constructs?

Bubbles Represent FunctionsArcs (Arrows) Data FlowsOpen Boxes Represent Persistent StoreClosed Boxes Represent I/O Interaction

Note: Note: DFDsDFDs can not Represent Sequential Steps can not Represent Sequential Steps

The function symbol

The data flow symbol

The data store symbol

The input device symbol

The output device symbol

CH5.20

CSE230

Methodology of Information SystemMethodology of Information System

... ...

Input 1

Input2

Inputn

Output1

Output2

Outputm

information

system

1. Start from the “context” diagram

11

CH5.21

CSE230

Methodology of Information SystemMethodology of Information System

A

A1

A3

A2

A4

A5

A6

A7

B1B2

B3B4

Ag

IO

I

O

H

K

J

M

N

P Q

R

S

K

T

K1

K2

K3

K4

M

N

2. Proceed by refinements until you reach “elementary” functions (preserve balancing)

CH5.22

CSE230

A Library Example DFDA Library Example DFD

Shelves

List of Authors

List of titles

List of topics

Title and author of requested book; name of the user

Get a bookBook

List of books borrowed

Book title; user name

Topic request by the user

Search by topics

Book request by the user

Book reception

TopicList of titles referring to the topic

Book

Author

Title

Display of the list of titles

Topic

Title

12

CH5.23

CSE230

Refinement of Refinement of ““Get a bookGet a book””

Shelves

List of Authors

List of titles

Title and author of requested book; name of the user

Book

List of books borrowed

Book title; user name

Book request by the user

Book reception

Book

Author

TitleFind book position

<shelf#, book#>

Get the book

CH5.24

CSE230

Patient Monitoring SystemsPatient Monitoring Systems

The purpose is to monitor the patients’ vital factors--blood,pressure, temperature, …--reading them at specified frequenciesfrom analog devices and storing readings in a DB. If readings fall outside the range specified for patient or device fails an alarmmust be sent to a nurse. The system also provides reports.

Patient

Nurse

PatientMonitoring

Nurse

Persistent data

Report

AlarmDataClinical

ReportRequest

Recent data

Data for report

13

CH5.25

CSE230

A Refinement as Detailed DFDA Refinement as Detailed DFD

Nurse

Nurse

Patient archiveReportRequest

Limits for patient

MonitoringCentral

Limits

Updatearchive

GenerateReport

Data forReport

RecentData

Formatted data

Alarm

PatientClinicalDataMonitoring

Local

Patient data

Report

CH5.26

CSE230

Further RefinementFurther Refinement

Limits

Formatted data alarm

dataPatient

decodeCheck

violations limit

Temperature

Pulse

Pressure

Result

Pressure, pulse…

Formatdata clockDate

Time producemessage

14

CH5.27

CSE230

A HighA High--Level DFD for HTSSLevel DFD for HTSS

CH5.28

CSE230

A HighA High--Level DFD for HTSSLevel DFD for HTSS

15

CH5.29

CSE230

A LowerA Lower--Level DFD for HTSSLevel DFD for HTSS

CH5.30

CSE230

Evaluating Evaluating DFDsDFDsEasy to Read, but Easy to Read, but ……Informal SemanticsInformal Semantics

How Does One Define Leaf Functions?Inherent Ambiguities in Flow

Consider the DFD (Functions) Below:Consider the DFD (Functions) Below:

A

C

E

B

F

D

• Are Outputs from A, B, Call needed Before D isEnabled?

• What if Only A and B Present?• Do A, B, and C have to be

Received in a Particular Order?• Outputs for E and F are

produced at the same time?

16

CH5.31

CSE230

Evaluating Evaluating DFDsDFDsClearly, Control Information is AbsentClearly, Control Information is Absent

DFDsDFDs are a Semiare a Semi--Formal NotationFormal NotationDFDs by Visio and PPTExcellent Vehicle for Presenting to End-UserNot Standalone – Need Complementary Diagram(s) to Fully Specify System Capabilities

BA

Possible interpretations:(a) A produces datum, waits until B consumes it(b) B can read the datum many times without

consuming it(c) a pipe is inserted between A and B

CH5.32

CSE230

Finite state machines (Finite state machines (FSMsFSMs))Utilized to Specify control flow aspectsUtilized to Specify control flow aspectsAn FSM Consists of:

A finite set of states (nodes), Q;A finite set of inputs (labels), I;A transition function d : Q x I Q(d can be a partial function)

FSMs are Well Suited to Represent Systems with

Multiple Known StatesWell-Defined Eventsfor State Changes

a a

b

bc

q

q

q

q

1

20

3

17

CH5.33

CSE230

Classic FSM ExamplesClassic FSM Examples

On Off

Push switch

Push switch

On Off

High-pressure alarm

High-temperature alarm

Restart

CH5.34

CSE230

FSMFSM’’ss Can Model Real WorldCan Model Real WorldConsider a Refinement of High Pressure/High Consider a Refinement of High Pressure/High Temperature FSM on Previous SlideTemperature FSM on Previous Slide

Pressure signal Temperature signal

Successful recovery

Unsuccessful recovery

OffNormal

Pressure action

OffNormal

Pressure action

Temperature signal Temperature action

Successful recovery

Unsuccessful recovery

Pressure signal

18

CH5.35

CSE230

FSM for HTSSFSM for HTSSTotals a CustomerTotals a Customer’’s Orders Order

ProcessPayment

No More Coupons

Next Coupon

CH5.36

CSE230

Classes of Classes of FSMsFSMsDeterministic/NondeterministicDeterministic/NondeterministicFSMsFSMs as Recognizers as Recognizers -- Introduce Final StatesIntroduce Final StatesFSMsFSMs

Used for Lexical Analysis in CompilersRealize Regular Expressions in Automata

q

q q q q

q q

q

b

e g i

n

e

n

d

0

1 2 3 4

5 6

fq0 is an initial stateqf is a final state

19

CH5.37

CSE230

FSMsFSMs as Recognizersas RecognizersFSMsFSMs as transducers as transducers -- introduce set of outputsintroduce set of outputs

q<letter>

<letter>

_

<digit>

q q

<letter>Legend: is an abbreviation for a set of arrows

labeled a, b,..., z, A,..., Z, ti l

is an abbreviation for a set of arrows labeled 0, 1,..., 9, respectively<digit>

0 1 2

<letter>

<digit>

CH5.38

CSE230

FSM Usage and LimitationFSM Usage and LimitationFSMsFSMs are Simple and Widely Usedare Simple and Widely Used

Control Systems, CompilationPattern Matching, Hardware Design

Most Software Applications can be Modeled via Most Software Applications can be Modeled via FSMsFSMsIn Practice, In Practice, FSMsFSMs are Good for Sample or Portions of are Good for Sample or Portions of System System –– Problems Can Arise:Problems Can Arise:

Model Different Portions of ApplicationCompose FSMs for Entire System View Finite Memory Yields State Explosion

Suppose n FSMs with k1, k2, … kn statesComposition is a FSM with k1 * k2 *… * kn.

This growth is exponential with the number of FSMs, not linear (we would like it to be k1 + k2 +… + kn )

20

CH5.39

CSE230

Example of State Explosion:Example of State Explosion:Consider Three Individual Consider Three Individual FSMsFSMs::

Producer

p1

c 2

Storage

1

produce

deposit

get

consume

deposit

get get

deposit

p2

Consumer

c 1

20

CH5.40

CSE230

Composition: The Resulting FSMComposition: The Resulting FSMClearly, Complexity Has IncreasedClearly, Complexity Has Increased

<0, p ,c >

<0, p ,c >

consume

produce

consume

produce

consume

produce

consume

produce

produce produce

consume consume

write

read

write

read

read

write

read

write

1

12

<0, p , c >

1

2 2

<1, p ,c >

<0, p ,c >

1 1

<1, p ,c>

<1, p ,c >

<1, p ,c >

2 1

1 2

1

2

2 2 <2, p ,c > 2 2

<2, p ,c > 1 2

<2, p ,c >2 1

<2, p ,c > 1 1

21

CH5.41

CSE230

Petri NetsPetri NetsPetri Nets are Another Graphical Formalism for Petri Nets are Another Graphical Formalism for SystemSystem’’s Specification Consisting of:s Specification Consisting of:

Finite Set of Places (Circles – Pi’s)Finite set of Transitions (Horizontal Lines – tj’s)Finite Set of Arrows Connecting Places to Transitions and Transitions to PlacesTokens (Dots) P

P

P

t

tP

t

1

3

1

3

4

65

P

P

P

2

5

7

t

t

t

2

4

6

CH5.42

CSE230

Petri Nets Petri Nets –– Other ConceptsOther ConceptsMarking: Assigning NonMarking: Assigning Non--Negative Integers to Places Negative Integers to Places Which Represent Tokens in the NetworkWhich Represent Tokens in the NetworkState: Petri Net with MarkingState: Petri Net with MarkingEnabled: Transition if all of its Incoming Places have Enabled: Transition if all of its Incoming Places have at Least One Tokenat Least One TokenFire: Transition Consumes Token from Incoming Fire: Transition Consumes Token from Incoming Places and Produces Token for Outgoing PlacesPlaces and Produces Token for Outgoing PlacesFiring Sequence: Sequence of Transition Firings for Firing Sequence: Sequence of Transition Firings for Execution of PN (tExecution of PN (t11, t, t33, t, t22, t, t55, , ……))PNsPNs are Nonare Non--DeterministicDeterministic

Any Enabled TransitionMay FireNeither When Nor Which Fires is Specified by Model

P

P

P

t

tP

t

1

3

1

3

4

65

P

P

P

2

5

7

t

t

t

2

4

6

22

CH5.43

CSE230

Modeling with Petri netsModeling with Petri netsPlaces Represent Distributed StatesPlaces Represent Distributed StatesTransitions Represent Actions Or Events That May Transitions Represent Actions Or Events That May Occur When System is in a Certain StateOccur When System is in a Certain StateThey Can Occur as Certain Conditions Hold on the They Can Occur as Certain Conditions Hold on the StatesStatesForks and Joins ModeledForks and Joins Modeled

Fork: Transition from 1 Input to N OutputsJoin: Transition fron N Inputs to 1 Output

P

P

P

t

tP

t

1

3

1

3

4

65

P

P

P

2

5

7

t

t

t

2

4

6

CH5.44

CSE230

Petri NetsPetri NetsA Petri Net is Defined as a Quadruple (P,T,F,W) with:A Petri Net is Defined as a Quadruple (P,T,F,W) with:P: places T: transitions (P, T are finite) F: flow relation (F ⊆ {P×T} ∪ {T×P} )W: weight function (W: F N – {0} )Properties:(1)P ∩ T = Ø(2) P ∪ T ≠ Ø(3)F ⊆ (P × T) ∪ (T × P)(4)W: F → N-{0}Default Value of Weight Function W is 1Default Value of Weight Function W is 1State Defined by Marking: State Defined by Marking: M: P M: P NN

23

CH5.45

CSE230places

transitions flows

marking

3 weightP

P

P

t

tP

t

1

3

1

3

4

6

5

P

P

P

2

5

7

t

t

t

2

4

6

Graphical Representation of PNGraphical Representation of PN

CH5.46

CSE230

PN Semantics: Dynamic EvolutionPN Semantics: Dynamic EvolutionTransition t is Enabled Transition t is Enabled iffiff

∀p ∈ t's Input Places, M(p) ≥ W(<p,t>)Transition t Fires: Produces a New Marking MTransition t Fires: Produces a New Marking M’’ in in Places that are Either Places that are Either t'st's Input or Output or BothInput or Output or Both

If p is an Input Place: M'(p) = M(p) - W(<p,t>)Consume a TokenIf p is an Output Place: M'(p) = M(p) + W(<t,p>)Produce a TokenIf p is both an Input and an Output Place: M'(p) = M(p) - W(<p,t>) + W(<t,p>)Consume and Produce a Token

24

CH5.47

CSE230

After (a) either (b) or (c) may occur, then (d)P

P

P

t

tP

t

1

3

1

3

4

65

P

P

P

2

5

7

t

t

t

2

4

6

P

P

P

t

tP

t

1

3

1

3

4

65

P

P

P

2

5

7

t

t

t

2

4

6

P

P

P

t

tP

t

1

3

1

3

4

65

P

P

P

2

5

7

t

t

t

2

4

6

P

P

P

t

tP

t

1

3

1

3

4

65

P

P

2

5

7

t

t

t

2

4

6

P

(a) (b)

(c) (d)

CH5.48

CSE230

Modeling Concurrent SystemsModeling Concurrent SystemsConcurrency: Concurrency: Two Transitions are Enabled to Fire in Two Transitions are Enabled to Fire in Given State, and the Firing of One Does Nor Prevent Given State, and the Firing of One Does Nor Prevent the Other From Firing the Other From Firing

See t1 and t2 in Case (a)Conflict: Conflict: Two Transitions are Enabled to Fire in Given Two Transitions are Enabled to Fire in Given State, But the Firing of One Prevents the Other From State, But the Firing of One Prevents the Other From FiringFiring

See T3 and T4 in Case (d)Place P3 Models Shared Resource Between Two Processes

No Policy Exists to Resolve Conflicts (Known as No Policy Exists to Resolve Conflicts (Known as Unfair Scheduling)Unfair Scheduling)A Process May Never Get a Resource (Starvation)A Process May Never Get a Resource (Starvation)Deadlock: A Marking Where no Transition May be Deadlock: A Marking Where no Transition May be EnabledEnabled

25

CH5.49

CSE230

Avoiding StarvationAvoiding StarvationFocus on Cycle in Middle of PNFocus on Cycle in Middle of PN

P P

P

P P

t t

t t

P P

t t

1

1 2

3

4

5

6

7

4

2

3

6

5

imposes alternation

CH5.50

CSE230

A ConflictA Conflict--Free PNFree PNAlways a Token Available in Place R for Both Sides Always a Token Available in Place R for Both Sides to Utilize to Utilize -- R Reloaded with 2 Tokens at Each StepR Reloaded with 2 Tokens at Each Step

R

P P

t t

t'

t"

t

t'

t"

t

1

1

3

3

2

2

4

4

56

2 2

this net candeadlock!consider

>< '42

'31 t,t , t,t

26

CH5.51

CSE230

A DeadlockA Deadlock--Free PNFree PNIf One Side Uses 2, it Proceeds, Else Other SideIf One Side Uses 2, it Proceeds, Else Other SideStarvation is Still PossibleStarvation is Still Possible

R

P P

t t

t'

t"

t

t'

t"

t

1

1

3

3

2

2

4

4

56

2 2

2 2

CH5.52

CSE230

A Partial StarvationA Partial StarvationPlace Supplying t4 is Not Refilled with TokenPlace Supplying t4 is Not Refilled with Token

t

t

1

3

t

t

2

4

27

CH5.53

CSE230

ProducerProducer--Consumer Example Consumer Example Individual Individual PNsPNs for Produce and Consumefor Produce and Consume

P P

write

produce

C

C

consume

0 1 2

read read

write write

read

1

1

2

2

separate netsfor the subsystems

CH5.54

CSE230

ProducerProducer--Consumer ExampleConsumer ExampleCombined Combined PNsPNs

C1C2

consume

0 1 2

read

writewrite

read

P1 P2produce

One net for theentire system

28

CH5.55

CSE230

Petri Net LimitationsPetri Net LimitationsPetri Nets are Limited in Their Modeling CapabilityPetri Nets are Limited in Their Modeling Capability

As Presented, Non-DeterministicNo Way to Prioritorize Among All Eligible Active Transitions that Can Fire

There are a Number of Capabilities that Would be There are a Number of Capabilities that Would be Very Useful in Modeling System BehaviorVery Useful in Modeling System Behavior

Adding Predicates and Functions that are Used to Evaluate Conditions Under Which a Transition Fire and its ResultsInstituting Priority to Decide When to Fire Among Multiple Transitions that are EligibleIncorporating Timing to Constrain When a Transition can Fire

CH5.56

CSE230

Assigning Values to TokensAssigning Values to TokensTransitions have Predicates and FunctionsTransitions have Predicates and FunctionsPredicate Refers to Values of Tokens in Inputs Predicate Refers to Values of Tokens in Inputs Functions Define Values of Tokens for OutputsFunctions Define Values of Tokens for Outputs

PP

P

PP

34

71 4

t t1 2

45

12

3Predicate P2 > P1 and function P4 := P2 + P1 associated with t1

Predicate P3 = P2 and functions P4 := P3 − P2 and P5 := P2 + P3 are associated with t2

The firing of t1 by using <3,7> would produce the value 10 in P4. t2 can then fire using <4, 4>

29

CH5.57

CSE230

Other PN ExtensionsOther PN ExtensionsSpecifying PrioritiesSpecifying Priorities

Function Pri from Transitions to Natural Numbers:pri: T N

When Several Transitions are Enabled, Only Ones with Maximum Priority are Allowed to FireIf Multiple Active, choose Non-deterministically

TimingTimingPair of Constants <tmin, tmax> associated with each Transition – If Transition Enabled

Must wait for at least tmin to elapse before it can FireMust Fire before tmax has elapsed, unless it is Disabled by the Firing of another Transition before tmax

CH5.58

CSE230

Combining Timing and PrioritiesCombining Timing and Priorities

P P

P

t t t

tm in = 1 tm a x = 4

tm in = 2 tm a x = 3

tm in = 0 tm a x = 5

pr ior ity = p r ior ity = p r ior ity = 1 3 2

P

1

1 2

2

3

3

4

30

CH5.59

CSE230

Overview of a PN ExampleOverview of a PN ExamplePNsPNs can be Used for Very Complex Applications can be Used for Very Complex Applications ConsiderConsider

An N Elevator System to be Installed in a Building with M FloorsNatural Language Specifications Contain Several AmbiguitiesFormal Specification Using PNs Removes Ambiguities

How is a Solution Constructed?How is a Solution Constructed?Employ ModulesEach Encapsulating Fragments of PNsEach Captures Certain System Components

CH5.60

CSE230

Initial Sketch of MovementInitial Sketch of Movement

Elevator at floor j

Elevator at floor j + 1

Pushing internal button for floor j + 1

Button illuminationTransfer

from floor j to j+1

31

CH5.61

CSE230

Dealing with ButtonsDealing with Buttons

ILBj

Fj

Set

Reset

OffOn0..0

InternalInternal

ExternalExternalSet

x..x Reset

ti'

Fj

Fj'

On Off

UPj

CH5.62

CSE230

Fj+1 UFj+1

Fj"

tFj'

UPh On

On DOWNh

ILBh

DOWNj+1

On

On

On

On

ILBj+1

Fj

t1 t2 t3 t4 t5 t6

t7 t8

t9

t10

t11 t12

UPj+1

Modeling the Entire PNModeling the Entire PN

32

CH5.63

CSE230

Entity Relationship DiagramsEntity Relationship DiagramsER Model ConceptsER Model Concepts

Entities and AttributesEntity Types, Value Sets, and Key AttributesRelationships and Relationship TypesWeak Entity TypesRoles and Attributes in Relationship Types

Relationships of Higher DegreeRelationships of Higher DegreeSkip Extended EntitySkip Extended Entity--Relationship (EER) ModelRelationship (EER) ModelNotation is based on :Notation is based on :

R. Elmasri and S.B. Navathe, “ Fundamentals of Database Systems,” Ed. 3., Addison Wesley, 2000, Chapters 3 and 4.

CH5.64

CSE230

Summary of ERSummary of ER--Diagram NotationDiagram NotationMeaningMeaning

ENTITY TYPEENTITY TYPE

WEAK ENTITY TYPEWEAK ENTITY TYPE

RELATIONSHIP TYPERELATIONSHIP TYPE

IDENTIFYING RELATIONSHIP TYPEIDENTIFYING RELATIONSHIP TYPE

ATTRIBUTEATTRIBUTE

KEY ATTRIBUTEKEY ATTRIBUTE

MULTIVALUED ATTRIBUTEMULTIVALUED ATTRIBUTE

COMPOSITE ATTRIBUTECOMPOSITE ATTRIBUTE

DERIVED ATTRIBUTEDERIVED ATTRIBUTE

TOTAL PARTICIPATION OF ETOTAL PARTICIPATION OF E22 IN RIN R

CARDINALITY RATIO 1:N FOR ECARDINALITY RATIO 1:N FOR E11:E:E2 2 IN RIN R

STRUCTURAL CONSTRAINT (min, max) ON STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION OF E IN RPARTICIPATION OF E IN R

Symbol

E1 R E2

E1 R N E2

R(min,max)

E

N

33

CH5.65

CSE230

Example COMPANY DatabaseExample COMPANY DatabaseRequirements of the Company (Oversimplified for Requirements of the Company (Oversimplified for Illustrative Purposes)Illustrative Purposes)

Company is Organized into DepartmentsEach Department has a Name, Number and an Employee Who Manages the DepartmentWe Track of the Start Date of the Department Manager

Each Department Controls a Number of Projects Each Project has a Name, Number and is Located at a Single Location

CH5.66

CSE230

Example COMPANY Database (Cont.)Example COMPANY Database (Cont.)Store Each Employee’s Social Security Number, Address, Salary, Sex, and Birthdate

Each Employee Works for One Department but May Work on Several Projects We Track of the Number of Hours Per Week that an Employee Currently Works on Each ProjectWe Track of the Direct Supervisor of Each Employee

Each Employee May have a Number of Dependents

For Each Dependent, We Track of their Name, Sex, Birthdate, and Relationship to Employee

34

CH5.67

CSE230

ER Diagram for the Company DatabaseER Diagram for the Company Database

CH5.68

CSE230

ER Model Concepts: Entities and AttributesER Model Concepts: Entities and AttributesEntities Entities -- Specific Objects or Things in the MiniSpecific Objects or Things in the Mini--world world that are Represented in the Databasethat are Represented in the Database

EMPLOYEE John SmithResearch DEPARTMENTProductx PROJECT

Attributes are Properties Used to Describe an EntityAttributes are Properties Used to Describe an Entitye.g., an EMPLOYEE Entity may have a Name, SSN, e.g., an EMPLOYEE Entity may have a Name, SSN, Address, Sex, Address, Sex, BirthdateBirthdateA Specific Entity (Instance) has a Value for Each of A Specific Entity (Instance) has a Value for Each of its Attributesits Attributes

Specific Employee Entity May Have Name=‘John Smith’, SSN=‘123456789’, Address=‘731 Fondren, Houston, TX’, Sex=‘m’, Birthdate=‘09-jan-55’

35

CH5.69

CSE230

Three Types of AttributesThree Types of AttributesSimple: Single Atomic Value for the AttributeSimple: Single Atomic Value for the Attribute

SSN or Sex or State or Salary or ...Composite: Attribute Composed of Many ComponentsComposite: Attribute Composed of Many Components

Address (Apt#, House#, Street, City, State, Zipcode, Country) or Name(Fname, MI, Lname)Composition May form a Hierarchy where Some Components are Themselves Composite

MultiMulti--Valued: Entity may have Multiple Values for Valued: Entity may have Multiple Values for That Attribute That Attribute -- Like an Set TypeLike an Set Type

CAR {Color} or STUDENT {Previousdegrees}Composite and MultiComposite and Multi--valued Attributes may be Nested valued Attributes may be Nested Arbitrarily to any Number of Levels (Rare) Arbitrarily to any Number of Levels (Rare)

Previousdegrees of a STUDENT is a Composite Multi-valued Attribute Denoted by {Previousdegrees(college, Year, Degree, Field)}

CH5.70

CSE230

Entities with Attribute ValuesEntities with Attribute Values

36

CH5.71

CSE230

Entity Types and Key AttributesEntity Types and Key AttributesEntities with the Same Basic Attributes Are Grouped Entities with the Same Basic Attributes Are Grouped or Typed into an or Typed into an Entity TypeEntity Type

EMPLOYEE Entity Type or PROJECT TypeAttribute of Entity Type for which Each Entity Must Attribute of Entity Type for which Each Entity Must Have a Unique Value is Called a Have a Unique Value is Called a Key AttributeKey Attribute

SSN of EMPLOYEE, ISBN of BOOKA Key Attribute may be CompositeA Key Attribute may be Composite

VIN is a Key of the CAR Entity TypeAn Entity Type may have More than One KeyAn Entity Type may have More than One Key

CAR Entity Type May Have Two Keys:VINVehicletagnumber (Number, State) aka License Plate

CH5.72

CSE230

car1((ABC 123, TEXAS), TK629, Ford Mustang, convertible, 1989, (red, black))

car2((ABC 123, NEW YORK), WP9872, Nissan Sentra, 2-door, 1992, (blue))

car3((VSY 720, TEXAS), TD729, Chrysler LeBaron, 4-door, 1993, (white, blue))

.

.

.

CARRegistration(RegistrationNumber, State), V_ID, Make, Model, Year, (Color)

Entity Type CAR with AttributesEntity Type CAR with Attributes

37

CH5.73

CSE230

Two Other Entity TypesTwo Other Entity Types

CH5.74

CSE230

Relationships and Relationship TypesRelationships and Relationship TypesA Relationship Relates Two or More Distinct Entities A Relationship Relates Two or More Distinct Entities With a Specific MeaningWith a Specific Meaning

EMPLOYEE John Smith Works on the ProductxPROJECT EMPLOYEE Franklin Wong Manages the Research DEPARTMENTRelationship - Instance Level

Relationships of the Same Type are Grouped or Typed Relationships of the Same Type are Grouped or Typed Into a Relationship TypeInto a Relationship Type

WORKS_ON Relationship Type in Which Employees and Projects ParticipateMANAGES Relationship Type in Which Employees and Departments ParticipateAnalogous to Reference or List in Programming

38

CH5.75

CSE230

The WORKS_ON RelationshipThe WORKS_ON Relationship

CH5.76

CSE230

Relationships and Relationship TypesRelationships and Relationship TypesDegree of a Relationship Type is the Number of Degree of a Relationship Type is the Number of Participating Entity TypesParticipating Entity Types

Both MANAGES and WORKS_ON are Binary RelationshipsWhat is a possible Ternary Relationship?

More Than One Relationship Type Can Exist With the More Than One Relationship Type Can Exist With the Same Participating Entity TypesSame Participating Entity Types

MANAGES and WORKS_FOR are Distinct Relationships Between EMPLOYEE and DEPARTMENT Entity Types

Relationships are DirectionalRelationships are DirectionalSUPPLIES: SUPPLIER to PARTSSUPPLIERS: PARTS to SUPPLIER

39

CH5.77

CSE230

EE--R DiagramsR Diagrams

EMPLOYEE PROJECT

Responsibility

Duration

Budget

ProjectNameProject NoEmployee No Employee

Name

SalaryTitle

WORKS ON

Address

CityApt. #

Street #

NoEmp

Location

CH5.78

CSE230

Weak Entity TypesWeak Entity TypesEntity that Does Not have a Key AttributeEntity that Does Not have a Key AttributeWeak Entity Must Participate in an Identifying Weak Entity Must Participate in an Identifying Relationship Type with an Owner or Identifying Entity Relationship Type with an Owner or Identifying Entity TypeTypeEntities are Identified by the Combination of:Entities are Identified by the Combination of:

A Partial Key of the Weak Entity TypeParticular Entity they Are Related to in the Identifying Entity Type

Example: Example: A DEPENDENT Entity is Identified by Dependent’s First Name and Birthdate, and the EMPLOYEE That the Dependent is Related to DEPENDENT is a Weak Entity Type With EMPLOYEE as its Identifying Entity Type Via the Identifying Relationship Type DEPENDENT_OF

40

CH5.79

CSE230

ER Model and Data AbstractionER Model and Data AbstractionAbstractionAbstractionClassificationClassification

AggregationAggregation

IdentificationIdentificationGeneralizationGeneralization

ER Model ConceptER Model ConceptEntity Type Entity Type -- a a Grouping of Member Grouping of Member EntitiesEntitiesRelationship Type Relationship Type -- a a Grouping of Member Grouping of Member RelationshipsRelationshipsRelationship Type is an Relationship Type is an Aggregation of (Over) Aggregation of (Over) Its Participating Entity Its Participating Entity TypesTypesWeak Entity Type and Weak Entity Type and Attribute KeyAttribute Key????????????????

CH5.80

CSE230

Constraints on AggregationConstraints on AggregationCardinality Constraints on Relationship TypesCardinality Constraints on Relationship Types

AKA Ratio ConstraintsMaximum Cardinality

One-to-OneOne-to-ManyMany-to-Many

Minimum Cardinality (AKA Participation or Existence Dependency Constraints)

Zero (Optional Participation, Not Existence-Dependent)One or More (Mandatory, Existence-Dependent)

41

CH5.81

CSE230

e1

e2

e3

e4

e5

e6

e7

EMPLOYEE

r1

r2

r3

r4

r5

r6

r7

WORKS_FOR

d1

d2

d3

DEPARTMENT

OneOne--toto--many(1:N) or Manymany(1:N) or Many--toto--one (N:1)one (N:1)

CH5.82

CSE230

e1

e2

e3

e4

e5

e6

e7

r1

r2

r3

r4

r5

r6

r7

d1

d2

d3

r8

r9

MANYMANY--TOTO--MANY(M:N)MANY(M:N)

42

CH5.83

CSE230

EMPLOYEE PROJECT

Responsibility

Duration

Budget

ProjectNameProject NoEmployee No Employee

Name

SalaryTitle

WORKS ON1 1

OneOne--toto--One RelationshipOne RelationshipEach Instance of One Entity Class E1 Can Be Each Instance of One Entity Class E1 Can Be Associated with Exactly One Instance of Another Associated with Exactly One Instance of Another Entity Class E2 and Vice Versa.Entity Class E2 and Vice Versa.Example:Example:

Each Employee Can Work in Exactly One Project and Each Project Employs Exactly One Employee

CH5.84

CSE230

OneOne--toto--One WORKS_ON RelationshipOne WORKS_ON RelationshipWORKS_ONRelationship

Instances

EMPLOYEE Set PROJECT Set

43

CH5.85

CSE230

EMPLOYEE PROJECT

Responsibility

Duration

Budget

ProjectNameProject NoEmployee No Employee

Name

SalaryTitle

WORKS ON1N

ManyMany--toto--One RelationshipOne RelationshipEach Instance of One Entity Class E1 can be Each Instance of One Entity Class E1 can be Associated with Zero or More Instances of Another Associated with Zero or More Instances of Another Entity Class E2, but Each Instance of E2 can be Entity Class E2, but Each Instance of E2 can be Associated With at Most 1 Instance of E1Associated With at Most 1 Instance of E1Example :Example :

Each Employee Can Work in Exactly One Project Each Project Can Employ Many Engineers

CH5.86

CSE230

OneOne--toto--Many WORKS_ON RelationshipMany WORKS_ON Relationship

44

CH5.87

CSE230

EMPLOYEE PROJECT

Responsibility

Duration

Budget

ProjectNameProject NoEmployee No Employee

Name

SalaryTitle

WORKS ONN M

ManyMany--toto--Many RelationshipMany RelationshipEach Instance of One Entity Class Can Be Associated Each Instance of One Entity Class Can Be Associated with Many Instances of Another Entity Class, and vice with Many Instances of Another Entity Class, and vice versaversaExample:Example:

Each Employee Can Work in Many ProjectsEach Project Can Employ Many Employees

CH5.88

CSE230

ManyMany--toto--Many WORKS_ON RelationshipMany WORKS_ON Relationship

45

CH5.89

CSE230

Structural Constraints Structural Constraints Structural Constraints on a Relationship are One Way Structural Constraints on a Relationship are One Way to Express the Semantics of a Relationship to Express the Semantics of a Relationship Cardinality Ratio (of a Binary Relationship): 1:1, 1:N, Cardinality Ratio (of a Binary Relationship): 1:1, 1:N, N:1, or M:N N:1, or M:N

Shown by Placing Apropos Number on the LinkParticipation Constraint (on Each Entity Type): Participation Constraint (on Each Entity Type):

Total (Called Existence Dependency) or PartialShown By Double Lining The Link

NOTE: NOTE: Easy to Specify for Binary Relationship TypesDo Not Be Misled by Obscure Notations to Specify Above Constraints for Higher Order Relationships

CH5.90

CSE230

Relationships of Higher DegreeRelationships of Higher DegreeRelationship Types of Degree 2 Are Called BinaryRelationship Types of Degree 2 Are Called BinaryRelationship Types of Degree 3 Are Called Ternary Relationship Types of Degree 3 Are Called Ternary

There is a Concrete Relationship Instance that Involves all Three Entity TypesThese are Not Separate Relationships!

Relationship Types of Degree N Are Called NRelationship Types of Degree N Are Called N--aryaryAgain - Concrete n-Participation Relationship

In General, an NIn General, an N--aryary Relationship is Not Equivalent to Relationship is Not Equivalent to N Binary RelationshipsN Binary Relationships

Rather - it is more Analogous to the Grouping of N-Binary Relationships into a N-ary Relationship

46

CH5.91

CSE230

Ternary RelationshipsTernary Relationships

CH5.92

CSE230

Ternary RelationshipsTernary Relationships

47

CH5.93

CSE230

Ternary vs. Binary RelationshipsTernary vs. Binary Relationships

CH5.94

CSE230

s1

s2

SUPPLIER

p1

p2

p3

PART

r1

r2

r3

r4

r5

r6

r7

SUPPLY

j1

j2

j3

PROJECT

Ternary Relationships Ternary Relationships -- InstancesInstances

48

CH5.95

CSE230

Modified Earlier ExampleModified Earlier Example

CH5.96

CSE230

Another ER Diagram Another ER Diagram -- Bank ExampleBank Example

49

CH5.97

CSE230

What are Problems with ER Notation?What are Problems with ER Notation?Historically, ER Model 1st Proposed in 1976Historically, ER Model 1st Proposed in 1976

P. Chen, ''The Entity-Relationship Model - Toward a Unified View of Data,'' ACM Trans. on Database Systems, Vol. 1, No. 1, March 1976.

However, ER Model in this Original Form Did Not However, ER Model in this Original Form Did Not Support the Generalization Abstraction (Inheritance)Support the Generalization Abstraction (Inheritance)In Databases, Inheritance 1st Proposed in 1977In Databases, Inheritance 1st Proposed in 1977

J. Smith and D. Smith, ''Database Abstractions: Aggregation and Generalization,'' ACM Trans. on Database Systems, Vol. 2, No. 2, June 1977.

Thus, Extended ER Evolved through 1980s with the Thus, Extended ER Evolved through 1980s with the Focus on Focus on ““Semantic Data ModelsSemantic Data Models””

M. Hammer and D. McLeod, ''Database Descriptions with SDM: A Semantic Data Model,'' ACM Trans. on Database Systems, Vol. 6, No. 3, Sept. 1981.

CH5.98

CSE230

Specialization/Attribute InheritanceSpecialization/Attribute InheritanceAn Entity Type E1 is a Specialization of another Entity Type E2 if E1 has the Same Properties of E2 and Perhaps Even More.E1 IS-A E2

MANAGER

EMPLOYEE

EMPLOYEE

Employee No EmployeeName

Salary

Title Address

MANAGER

Employee No EmployeeName

Salary

Title Address

Expense Act. Condo∪

50

CH5.99

CSE230

GeneralizationGeneralizationAbstracting the Common Properties of Two or More Entities to Produce a “Higher-level” Entity

ENGINEER SECRETARY SALESPERSON

Employee NoEmployee Name

SalaryTitle

Address

Employee NoEmployee Name

SalaryTitle

Address

Employee NoEmployee Name

SalaryTitle

Address

ProjectOffice Office

SpecialtyCarRegion

EMPLOYEE Employee NoEmployee Name

SalaryTitle

Address

CH5.100

CSE230

GeneralizationGeneralization

ENGINEER SECRETARY SALESPERSON

EMPLOYEE

Employee No EmployeeName

Salary

Title Address

Project Office Specialty Office CarRegion

∪d

51

CH5.101

CSE230

ConstraintsConstraints

disjoint, totaldisjoint, total

disjoint, partialdisjoint, partiald

d

o

o

overlapping, total

overlapping, partial

∪∪

Part

Manufactured_Part

Purchased_Part

o

PartNo Description

SupplierName ListPrice

BatchNo

M_date

DrawingNo

CH5.102

CSE230

Total and Partial DisjointTotal and Partial Disjoint

EMPLOYEE

Employee No EmployeeName

Salary

Title Address

SECRETARYENGINEER

Project Office Specialty Office

SALESPERSON

CarRegion

∪ ∪∪

dd

HOURLY_EMP

SALARIED_EMP

Hourly Rate

Salary

∪∪

52

CH5.103

CSE230

Total OverlappingTotal Overlapping

PART

Part No PartName

QTY

WGT

o

MANUFACTURED_PART PURCHASED_PART

Batch No Drawing No Price

∪ ∪

CH5.104

CSE230

HTSS ER Diagram ExampleHTSS ER Diagram Example

53

CH5.105

CSE230

HTSS ER Diagram ExampleHTSS ER Diagram Example

CH5.106

CSE230

Interplay of Specification TechniquesInterplay of Specification TechniquesWhat do What do DFDsDFDs have to Offer re. OO Design?have to Offer re. OO Design?

Data Stores (Classes)Arrow Labels (Parameters)Input (Method of Class)Functions (Implementation of Method of Class)Output (Return of Method of Class)

What do What do DFDsDFDs have to Offer re. ER Design?have to Offer re. ER Design?Data Stores (Entities)Arrow Labels (Relationships and Keys)

What about What about FSMsFSMs? ? What is Impact What is Impact w.r.tw.r.t. Modular or ADT/Class Design?. Modular or ADT/Class Design?

54

CH5.107

CSE230

Interplay of Specification TechniquesInterplay of Specification Techniques

CH5.108

CSE230

Interplay of Specification TechniquesInterplay of Specification Techniques

55

CH5.109

CSE230

UML DiagramsUML DiagramsUML is a Language for UML is a Language for Specifying, Visualizing, Specifying, Visualizing, Constructing, and Documenting Software ArtifactsConstructing, and Documenting Software ArtifactsUML Formalizes the Previous Techniques (DFD, ER, UML Formalizes the Previous Techniques (DFD, ER, FSM, PN, etc.) into a Unified EnvironmentFSM, PN, etc.) into a Unified EnvironmentWhat Does a Modeling Language Provide?What Does a Modeling Language Provide?

Model Elements: Concepts and SemanticsNotation: Visual Rendering of Model ElementsGuidelines: Hints and Suggestions for Using Elements in Notation

UML has 13 Different Diagrams (2.0)UML has 13 Different Diagrams (2.0)References and ResourcesReferences and Resources

Web for UML 2.0: www.uml.org“The Unified Modeling Language Reference Manual”, Addison-Wesley.

CH5.110

CSE230

UML UseUML Use--Case DiagramsCase DiagramsDefine Functions on Basis of Actors and ActionsDefine Functions on Basis of Actors and Actions

borrow book

return book

library update

librariancustomer

56

CH5.111

CSE230

UML Sequence DiagramsUML Sequence DiagramsDescribe Object Interactions by Exchanging MessagesDescribe Object Interactions by Exchanging Messages

Librarian Catalogue

member card + book request membership

OK

book request

book available

book borrowed

Customer

CH5.112

CSE230

UML Sequence DiagramsUML Sequence DiagramsDescribe Object Interactions by Exchanging MessagesDescribe Object Interactions by Exchanging Messages

57

CH5.113

CSE230

UML Collaboration DiagramsUML Collaboration DiagramsObject Interactions and Their OrderingObject Interactions and Their Ordering

Customer Librarian Catalogue

1: member card + book request

2: membership OK

3: book request

4: book available 5: book borrowed

CH5.114

CSE230

UML UML StatechartStatechart DiagramsDiagramsAkin to Finite State MachineAkin to Finite State Machine

58

CH5.115

CSE230

Activity DiagramActivity DiagramAkin to Petri NetAkin to Petri Net

LetLet’’s Consider UML in Total (Jump to New s Consider UML in Total (Jump to New PowerPoint Presentation)PowerPoint Presentation)

CH5.116

CSE230

MathematicalMathematical--Based SpecificationsBased SpecificationsQueueingQueueing and Simulation Models and Simulation Models

Predict and Simulate System BehaviorCSE221

Declarative Specifications:Declarative Specifications:Logic SpecificationsAlgebraic SpecificationsCSE233 Programming Languages

Languages for Modular SpecificationsLanguages for Modular SpecificationsStatecharts and Z


Recommended