42
System models System models Abstract Abstract descriptions of descriptions of systems whose systems whose requirements are requirements are being analysed being analysed

System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Embed Size (px)

Citation preview

Page 1: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

System modelsSystem models

•Abstract descriptions of Abstract descriptions of systems whose systems whose requirements are being requirements are being analysedanalysed

Page 2: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

ObjectivesObjectives• To explain why the context of a system To explain why the context of a system

should be modelled as part of the RE should be modelled as part of the RE processprocess

• To describe behavioural modelling, data To describe behavioural modelling, data modelling and object modellingmodelling and object modelling

• To introduce some of the notations used in To introduce some of the notations used in the Unified Modeling Language (UML)the Unified Modeling Language (UML)

• To show how CASE workbenches support To show how CASE workbenches support system modellingsystem modelling

Page 3: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Topics coveredTopics covered

• Context modelsContext models

• Behavioural modelsBehavioural models

• Data modelsData models

• Object modelsObject models

• CASE workbenchesCASE workbenches

Page 4: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

System modellingSystem modelling• System modelling helps the analyst to understand System modelling helps the analyst to understand

the functionality of the system and models are the functionality of the system and models are used to communicate with customersused to communicate with customers

• Different models present the system from Different models present the system from different perspectivesdifferent perspectives– External perspective showing the system’s External perspective showing the system’s

context or environmentcontext or environment– Behavioural perspective showing the behaviour Behavioural perspective showing the behaviour

of the systemof the system– Structural perspective showing the system or Structural perspective showing the system or

data architecturedata architecture

Page 5: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Structured methodsStructured methods

• Structured methods incorporate system Structured methods incorporate system modelling as an inherent part of the modelling as an inherent part of the methodmethod

• Methods define a set of models, a Methods define a set of models, a process for deriving these models and process for deriving these models and rules and guidelines that should apply to rules and guidelines that should apply to the modelsthe models

• CASE tools support system modelling as CASE tools support system modelling as part of a structured methodpart of a structured method

Page 6: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Method weaknessesMethod weaknesses• They do not model non-functional system They do not model non-functional system

requirementsrequirements

• They do not usually include information They do not usually include information about whether a method is appropriate for a about whether a method is appropriate for a given problemgiven problem

• The may produce too much documentationThe may produce too much documentation

• The system models are sometimes too The system models are sometimes too detailed and difficult for users to understanddetailed and difficult for users to understand

Page 7: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Model typesModel types• Data processing model showing how the data Data processing model showing how the data

is processed at different stagesis processed at different stages

• Composition model showing how entities are Composition model showing how entities are composed of other entitiescomposed of other entities

• Architectural model showing principal sub-Architectural model showing principal sub-systemssystems

• Classification model showing how entities Classification model showing how entities have common characteristicshave common characteristics

• Stimulus/response model showing the Stimulus/response model showing the system’s reaction to eventssystem’s reaction to events

Page 8: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Context modelsContext models

• Context models are used to illustrate Context models are used to illustrate the boundaries of a systemthe boundaries of a system

• Social and organisational concerns Social and organisational concerns may affect the decision on where to may affect the decision on where to position system boundariesposition system boundaries

Page 9: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

The context of an ATM The context of an ATM systemsystem

Auto-tellersystem

Securitysystem

Maintenancesystem

Accountdatabase

Usagedatabase

Branchaccounting

system

Branchcountersystem

Page 10: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Process modelsProcess models

• Process models show the overall Process models show the overall process and the processes that are process and the processes that are supported by the systemsupported by the system

• Data flow models may be used to Data flow models may be used to show the processes and the flow of show the processes and the flow of information from one process to information from one process to anotheranother

Page 11: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Equipment procurement Equipment procurement processprocess

Get costestimates

Acceptdelivery ofequipment

Checkdelivered

items

Validatespecification

Specifyequipmentrequired

Choosesupplier

Placeequipment

order

Installequipment

Findsuppliers

Supplierdatabase

Acceptdelivered

equipment

Equipmentdatabase

Equipmentspec.

Checkedspec.

Deliverynote

Deliverynote

Ordernotification

Installationinstructions

Installationacceptance

Equipmentdetails

Checked andsigned order form

Orderdetails +

Blank orderform

Spec. +supplier +estimate

Supplier listEquipment

spec.

Page 12: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Behavioural modelsBehavioural models• Behavioural models are used to describe the Behavioural models are used to describe the

overall behaviour of a systemoverall behaviour of a system

• Two types of behavioural model are shown Two types of behavioural model are shown herehere– Data processing models that show how data is Data processing models that show how data is

processed as it moves through the systemprocessed as it moves through the system– State machine models that show the systems State machine models that show the systems

response to eventsresponse to events

• Both of these models are required for a Both of these models are required for a description of the system’s behaviourdescription of the system’s behaviour

Page 13: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Data-processing modelsData-processing models

• Data flow diagrams are used to model Data flow diagrams are used to model the system’s data processingthe system’s data processing

• These show the processing steps as These show the processing steps as data flows through a systemdata flows through a system

• Intrinsic part of many analysis Intrinsic part of many analysis methodsmethods

• Simple and intuitive notation that Simple and intuitive notation that customers can understandcustomers can understand

Page 14: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Order processing DFDOrder processing DFD

Completeorder form

Orderdetails +

blankorder form

Valida teorder

Recordorder

Send tosupplier

Adjustavailablebudget

Budgetfile

Ordersfile

Completedorder form

Signedorder form

Signedorder form

Checked andsigned order

+ ordernotification

Orderamount

+ accountdetails

Signedorder form

Orderdetails

Page 15: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Data flow diagramsData flow diagrams• DFDs model the system from a functional DFDs model the system from a functional

perspectiveperspective

• Tracking and documenting how the data Tracking and documenting how the data associated with a process is helpful to associated with a process is helpful to develop an overall understanding of the develop an overall understanding of the systemsystem

• Data flow diagrams may also be used in Data flow diagrams may also be used in showing the data exchange between a showing the data exchange between a system and other systems in its environmentsystem and other systems in its environment

Page 16: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

State machine modelsState machine models• These model the behaviour of the system in These model the behaviour of the system in

response to external and internal eventsresponse to external and internal events

• They show the system’s responses to stimuli They show the system’s responses to stimuli so are often used for modelling real-time so are often used for modelling real-time systemssystems

• State machine models show system states as State machine models show system states as nodes and events as arcs between these nodes and events as arcs between these nodes. When an event occurs, the system nodes. When an event occurs, the system moves from one state to anothermoves from one state to another

• Statecharts are an integral part of the UMLStatecharts are an integral part of the UML

Page 17: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Microwave oven modelMicrowave oven model

Full power

Enabled

do: operateoven

Fullpower

Halfpower

Halfpower

Fullpower

Number

TimerDooropen

Doorclosed

Doorclosed

Dooropen

Start

do: set power = 600

Half powerdo: set power = 300

Set time

do: get numberexit: set time

Disabled

Operation

Timer

Cancel

Waiting

do: display time

Waiting

do: display time

do: display 'Ready'

do: display 'Waiting'

Page 18: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Microwave oven state Microwave oven state descriptiondescription

Page 19: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Microwave oven stimuliMicrowave oven stimuli

Page 20: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

StatechartsStatecharts

• Allow the decomposition of a model Allow the decomposition of a model into sub-models (see following slide)into sub-models (see following slide)

• A brief description of the actions is A brief description of the actions is included following the ‘do’ in each included following the ‘do’ in each statestate

• Can be complemented by tables Can be complemented by tables describing the states and the stimulidescribing the states and the stimuli

Page 21: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Microwave oven operationMicrowave oven operation

Cookdo: run generator

Done

do: buzzer on for 5 secs.

Waiting

Alarm

do: display event

do: checkstatus

Checking

Turntablefault

Emitterfault

Disabled

OK

Timeout

TimeOperation

Dooropen

Cancel

Page 22: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Semantic data modelsSemantic data models

• Used to describe the logical structure of Used to describe the logical structure of data processed by the systemdata processed by the system

• Entity-relation-attribute model sets out the Entity-relation-attribute model sets out the entities in the system, the relationships entities in the system, the relationships between these entities and the entity between these entities and the entity attributesattributes

• Widely used in database design. Can readily Widely used in database design. Can readily be implemented using relational databasesbe implemented using relational databases

• No specific notation provided in the UML but No specific notation provided in the UML but objects and associations can be usedobjects and associations can be used

Page 23: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Software design semantic Software design semantic modelmodel

Design

namedescriptionC-dateM-date

Link

nametype

Node

nametype

links

has-links

12

1 n

Label

nametexticon

has-labelshas-labels

1

n

1

n

has-linkshas-nodes is-a

1

n

1

n1

1

Page 24: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Data dictionariesData dictionaries• Data dictionaries are lists of all of the names Data dictionaries are lists of all of the names

used in the system models. Descriptions of the used in the system models. Descriptions of the entities, relationships and attributes are also entities, relationships and attributes are also includedincluded

• AdvantagesAdvantages– Support name management and avoid duplicationSupport name management and avoid duplication– Store of organisational knowledge linking analysis, Store of organisational knowledge linking analysis,

design and implementationdesign and implementation

• Many CASE workbenches support data Many CASE workbenches support data dictionariesdictionaries

Page 25: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Data dictionary entriesData dictionary entries

Page 26: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Object modelsObject models• Object models describe the system in terms of Object models describe the system in terms of

object classesobject classes

• An object class is an abstraction over a set of An object class is an abstraction over a set of objects with common attributes and the objects with common attributes and the services (operations) provided by each objectservices (operations) provided by each object

• Various object models may be producedVarious object models may be produced– Inheritance modelsInheritance models– Aggregation modelsAggregation models– Interaction modelsInteraction models

Page 27: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Object modelsObject models• Natural ways of reflecting the real-world Natural ways of reflecting the real-world

entities manipulated by the systementities manipulated by the system

• More abstract entities are more difficult to More abstract entities are more difficult to model using this approachmodel using this approach

• Object class identification is recognised as Object class identification is recognised as a difficult process requiring a deep a difficult process requiring a deep understanding of the application domainunderstanding of the application domain

• Object classes reflecting domain entities Object classes reflecting domain entities are reusable across systemsare reusable across systems

Page 28: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Inheritance modelsInheritance models• Organise the domain object classes into a Organise the domain object classes into a

hierarchyhierarchy

• Classes at the top of the hierarchy reflect the Classes at the top of the hierarchy reflect the common features of all classescommon features of all classes

• Object classes inherit their attributes and Object classes inherit their attributes and services from one or more super-classes. services from one or more super-classes. these may then be specialised as necessarythese may then be specialised as necessary

• Class hierarchy design is a difficult process if Class hierarchy design is a difficult process if duplication in different branches is to be duplication in different branches is to be avoidedavoided

Page 29: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

The Unified Modeling The Unified Modeling LanguageLanguage• Devised by the developers of widely used object-Devised by the developers of widely used object-

oriented analysis and design methodsoriented analysis and design methods

• Has become an effective standard for object-oriented Has become an effective standard for object-oriented modellingmodelling

• NotationNotation– Object classes are rectangles with the name at the top, Object classes are rectangles with the name at the top,

attributes in the middle section and operations in the attributes in the middle section and operations in the bottom sectionbottom section

– Relationships between object classes (known as Relationships between object classes (known as associations) are shown as lines linking objectsassociations) are shown as lines linking objects

– Inheritance is referred to as generalisation and is shown Inheritance is referred to as generalisation and is shown ‘upwards’ rather than ‘downwards’ in a hierarchy‘upwards’ rather than ‘downwards’ in a hierarchy

Page 30: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Library class Library class hierarchyhierarchy

Catalogue numberAcquisition dateCostTypeStatusNumber of copies

Library item

Acquire ()Catalogue ()Dispose ()Issue ()Return ()

AuthorEditionPublication dateISBN

Book

YearIssue

MagazineDirectorDate of releaseDistributor

Film

VersionPlatform

Computerprogram

TitlePublisher

Published item

TitleMedium

Recorded item

Page 31: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

User class User class hierarchyhierarchy

NameAddressPhoneRegistration #

Library user

Register ()De-register ()

Affiliation

Reader

Items on loanMax. loans

Borrower

DepartmentDepartment phone

Staff

Major subjectHome address

Student

Page 32: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Multiple inheritanceMultiple inheritance• Rather than inheriting the attributes and Rather than inheriting the attributes and

services from a single parent class, a system services from a single parent class, a system which supports multiple inheritance allows which supports multiple inheritance allows object classes to inherit from several super-object classes to inherit from several super-classesclasses

• Can lead to semantic conflicts where Can lead to semantic conflicts where attributes/services with the same name in attributes/services with the same name in different super-classes have different semanticsdifferent super-classes have different semantics

• Makes class hierarchy reorganisation more Makes class hierarchy reorganisation more complexcomplex

Page 33: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Multiple inheritanceMultiple inheritance

# Tapes

Talking book

AuthorEditionPublication dateISBN

Book

SpeakerDurationRecording date

Voice recording

Page 34: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Object aggregationObject aggregation

• Aggregation model shows how Aggregation model shows how classes which are collections are classes which are collections are composed of other classescomposed of other classes

• Similar to the part-of relationship in Similar to the part-of relationship in semantic data modelssemantic data models

Page 35: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Object aggregationObject aggregation

Videotape

Tape ids.

Lecturenotes

Text

OHP slides

Slides

Assignment

Credits

Solutions

TextDiagrams

Exercises

#Problems Description

Course titleNumberYearInstructor

Study pack

Page 36: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Object behaviour modellingObject behaviour modelling

• A behavioural model shows the A behavioural model shows the interactions between objects to interactions between objects to produce some particular system produce some particular system behaviour that is specified as a use-behaviour that is specified as a use-casecase

• Sequence diagrams (or collaboration Sequence diagrams (or collaboration diagrams) in the UML are used to diagrams) in the UML are used to model interaction between objectsmodel interaction between objects

Page 37: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Issue of electronic itemsIssue of electronic items

:Library User

Ecat:Catalog

Lookup

Issue

Display

:Library Item Lib1:NetServer

Issue licence

Accept licence

Compress

Deliver

Page 38: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

CASE workbenchesCASE workbenches• A coherent set of tools that is designed to A coherent set of tools that is designed to

support related software process activities support related software process activities such as analysis, design or testingsuch as analysis, design or testing

• Analysis and design workbenches support Analysis and design workbenches support system modelling during both requirements system modelling during both requirements engineering and system designengineering and system design

• These workbenches may support a specific These workbenches may support a specific design method or may provide support for a design method or may provide support for a creating several different types of system creating several different types of system modelmodel

Page 39: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

An analysis and design An analysis and design workbenchworkbench

Centralinformationrepository

Codegenerator

Querylanguagefacilities

Structureddiagramming

tools

Datadictionary

Reportgenerationfacilities

Design, analysisand checking

tools

Formscreation

tools

Import/exportfacilities

Page 40: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Analysis workbench Analysis workbench componentscomponents

• Diagram editorsDiagram editors

• Model analysis and checking toolsModel analysis and checking tools

• Repository and associated query languageRepository and associated query language

• Data dictionaryData dictionary

• Report definition and generation toolsReport definition and generation tools

• Forms definition toolsForms definition tools

• Import/export translatorsImport/export translators

• Code generation toolsCode generation tools

Page 41: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Key pointsKey points• A model is an abstract system view. A model is an abstract system view.

Complementary types of model provide different Complementary types of model provide different system informationsystem information

• Context models show the position of a system in Context models show the position of a system in its environment with other systems and processesits environment with other systems and processes

• Data flow models may be used to model the data Data flow models may be used to model the data processing in a systemprocessing in a system

• State machine models model the system’s State machine models model the system’s behaviour in response to internal or external behaviour in response to internal or external eventsevents

Page 42: System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed

Key pointsKey points• Semantic data models describe the Semantic data models describe the

logical structure of data which is logical structure of data which is imported to or exported by the systemsimported to or exported by the systems

• Object models describe logical system Object models describe logical system entities, their classification and entities, their classification and aggregationaggregation

• Object models describe the logical Object models describe the logical system entities and their classification system entities and their classification and aggregationand aggregation

• CASE workbenches support the CASE workbenches support the development of system modelsdevelopment of system models