Lecture 6 & 7 System Models.

Slides:



Advertisements
Similar presentations
Chapter 7 System Models.
Advertisements

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Alternative Approach to Systems Analysis Structured analysis
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
Software Engineering, COMP 201 Slide 1 Automata and Formal Languages Moore and Mealy Automata Ralf Möller Hamburg Univ. of Technology based on slides by.
System Modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers. Different.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
SWE Introduction to Software Engineering
1 SWE Introduction to Software Engineering Lecture 13 – System Modeling.
Systems Analysis and Design in a Changing World, Fourth Edition
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
CS 425/625 Software Engineering System Models
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
7M701 1 Software Engineering Systems Models Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 7 (some items)
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models September 29, 2008.
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 71 System models l Abstract descriptions of systems whose requirements are being analysed.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
7M822 Software Engineering: System Models 14 September 2009.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 1.
Chapter 7: System models
6 Systems Analysis and Design in a Changing World, Fourth Edition.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 6: The Traditional Approach to Requirements
Software Engineering 8. System Models.
Chapter 6 The Traditional Approach to Requirements
Systems Analysis and Design in a Changing World, Fifth Edition
Phase 2: Systems Analysis
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models. System modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with.
System Models Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn Lecture 6 & 7.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
SYSTEM MODELS MUHAMMAD RIZWAN. Objectives  To explain why the context of a system should be modelled as part of the RE process  To describe behavioural.
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 Object-oriented and Structured System Models.
October 5, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
Chapter 7 System models.
Slide 1 System models. Slide 2 Objectives l To explain why the context of a system should be modelled as part of the RE process l To describe behavioural.
System models l Abstract descriptions of systems whose requirements are being analysed.
Pertemuan 19 PEMODELAN SISTEM Matakuliah: D0174/ Pemodelan Sistem dan Simulasi Tahun: Tahun 2009.
CS 4310: Software Engineering Lecture 4 System Modeling The Analysis Stage.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Rekayasa Perangkat Lunak (Software Engineering) M.Sukrisno Mardiyanto Kuliah Umum Universitas Dian Nuswantoro Semarang, 16 Oktober 2008.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
SWEN 5231 FORMAL METHODS Slide 1 System models u Abstract presentations of systems whose requirements are being analyzed.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Systems Analysis and Design in a Changing World, Fourth Edition
Specification Techniques. System models are abstract descriptions of systems whose requirements are being analyzed Objectives  To explain why specification.
Chapter 6: System Models Omar Meqdadi SE 273 Lecture 6 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
6 Systems Analysis and Design in a Changing World, Fourth Edition.
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
September 15, 2009COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
© 2000 Franz Kurfess System Design Methods 1 CSC 205: Software Engineering I Dr. Franz J. Kurfess Computer Science Department Cal Poly.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Systems Analysis and Design in a Changing World, Fourth Edition
Software Engineering Lecture 4 System Modeling The Analysis Stage.
Object-oriented and Structured System Models
Abstract descriptions of systems whose requirements are being analysed
IS301 – Software Engineering V:
System models October 5, 2005.
Subject Name: SOFTWARE ENGINEERING Subject Code:10IS51
Dynamic Modeling Lecture # 37.
Presentation transcript:

Lecture 6 & 7 System Models

System models are abstract descriptions of systems whose requirements are being analysed Objectives To explain why the context of a system should be modelled as part of the RE process To describe Behavioural modelling (FSM, Petri-nets), Data modelling and Object modelling (Unified Modeling Language, UML)

System modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers Different models present the system from different perspectives External perspective showing the system’s context or environment Behavioural perspective showing the behaviour of the system Structural perspective showing the system or data architecture

System models weaknesses They do not model non-functional system requirements They do not usually include information about whether a method is appropriate for a given problem They may produce too much documentation The system models are sometimes too detailed and difficult for users to understand

Model types Data processing model showing how the data is processed at different stages Composition model showing how entities are composed of other entities Architectural model showing principal sub-systems Classification model showing how entities have common characteristics Stimulus/response model showing the system’s reaction to events

1. Context models Context models are used to illustrate the boundaries of a system Social and organisational concerns may affect the decision on where to position system boundaries Architectural models show the a system and its relationship with other systems

The context of an ATM system

Process models Process models show the overall process and the processes that are supported by the system Data flow models may be used to show the processes and the flow of information from one process to another

Equipment procurement process

2 Behavioural models Behavioural models are used to describe the overall behaviour of a system Two types of behavioural model Data processing models that show how data is processed as it moves through the system State machine models that show the systems response to events Both of these models are required for a description of the system’s behaviour

2.1 Data-processing models Data flow diagrams are used to model the system’s data processing These show the processing steps as data flows through a system IMPORTANT part of many analysis methods Simple and intuitive notation that customers can understand Show end-to-end processing of data

Order processing DFD

Data flow diagrams DFDs model the system from a functional perspective Tracking and documenting how the data associated with a process is helpful to develop an overall understanding of the system Data flow diagrams may also be used in showing the data exchange between a system and other systems in its environment

2.2 State machine models State Machine models the behaviour of the system in response to external and internal events They show the system’s responses to stimuli so are often used for modelling real-time systems State machine models show system states as nodes and events as arcs between these nodes. When an event occurs, the system moves from one state to another Statecharts are an integral part of the UML

Microwave oven model State machine model does not show flow of data within the system

Microwave oven stimuli

Finite State Automata (FSA) Finite state machines Finite State Machines (FSM), also known as Finite State Automata (FSA) are models of the behaviours of a system or a complex object, with a limited number of defined conditions or modes, where mode transitions change with circumstance.

Finite state machines - Definition A model of computation consisting of a set of states, a start state, an input alphabet, and a transition function that maps input symbols and current states to a next state Computation begins in the start state with an input string. It changes to new states depending on the transition function. states define behaviour and may produce actions state transitions are movement from one state to another rules or conditions must be met to allow a state transition input events are either externally or internally generated, which may possibly trigger rules and lead to state transitions

Variants of FSMs There are many variants, for instance, machines having actions (outputs) associated with transitions (Mealy machine) or states (Moore machine), multiple start states, transitions conditioned on no input symbol (a null) or more than one transition for a given symbol and state (nondeterministic finite state machine), one or more states designated as accepting states (recognizer), etc.

Finite State Machines with Output (Mealy and Moore Machines) Finite automata are like computers in that they receive input and process the input by changing states. The only output that we have seen finite automata produce so far is a yes/no at the end of processing. We will now look at two models of finite automata that produce more output than a yes/no.

This machine might be considered as a "counting" machine. Moore machine Basically a Moore machine is just a FA with two extras. 1. It has TWO alphabets, an input and output alphabet. 2. It has an output letter associated with each state. The machine writes the appropriate output letter as it enters each state. This machine might be considered as a "counting" machine. The output produced by the machine contains a 1 for each occurrence of the substring aab found in the input string.

Mealy machine Mealy Machines are exactly as powerful as Moore machines (we can implement any Mealy machine using a Moore machine, and vice versa). However, Mealy machines move the output function from the state to the transition. This turns out to be easier to deal with in practice, making Mealy machines more practical.

A Mealy machine produces output on a transition instead of on entry into a state. Transitions are labelled i/o where i is a character in the input alphabet and o is a character in the output alphabet. Mealy machine are complete in the sense that there is a transition for each character in the input alphabet leaving every state. There are no accept states in a Mealy machine because it is not a language recogniser, it is an output producer. Its output will be the same length as its input. The following Mealy machine takes the one's complement of its binary input. In other words, it flips each digit from a 0 to a 1 or from a 1 to a 0.

Statecharts Allow the decomposition of a model into sub-models (see a figure) A brief description of the actions is included following the ‘do’ in each state Can be complemented by tables describing the states and the stimuli

Petri Nets Model Petri Nets were developed originally by Carl Adam Petri, and were the subject of his dissertation in 1962. Since then, Petri Nets and their concepts have been extended, developed, and applied in a variety of areas. While the mathematical properties of Petri Nets are interesting and useful, the beginner will find that a good approach is to learn to model systems by constructing them graphically.

The Basics Place with token A Petri Net is a collection of directed arcs connecting places and transitions. Places may hold tokens. The state or marking of a net is its assignment of tokens to places. P1 Arc with capacity 1 T1 Place Transition P2

Capacity Arcs have capacity 1 by default; if other than 1, the capacity is marked on the arc. Places have infinite capacity by default. Transitions have no capacity, and cannot store tokens at all. Arcs can only connect places to transitions and vice versa. A few other features and considerations will be added as we need them.

Enabled transitions and firing A transition is enabled when the number of tokens in each of its input places is at least equal to the arc weight going from the place to the transition. An enabled transition may fire at any time.

When arcs have different weights… When fired, the tokens in the input places are moved to output places, according to arc weights and place capacities. This results in a new marking of the net, a state description of all places.

A collection of primitive structures that occur in real systems

3. Semantic data models Used to describe the logical structure of data processed by the system Entity-relation-attribute model sets out the entities in the system, the relationships between these entities and the entity attributes Widely used in database design. Can readily be implemented using relational databases No specific notation provided in the UML but objects and associations can be used

Software design semantic model

Data dictionary entries Data dictionaries are lists of all of the names used in the system models. Descriptions of the entities, relationships and attributes are also included

4. Object models Object models describe the system in terms of object classes An object class is an abstraction over a set of objects with common attributes and the services (operations) provided by each object Various object models may be produced Inheritance models Aggregation models Interaction models

Object models Natural ways of reflecting the real-world entities manipulated by the system More abstract entities are more difficult to model using this approach Object class identification is recognised as a difficult process requiring a deep understanding of the application domain Object classes reflecting domain entities are reusable across systems

The Unified Modeling Language Devised by the developers of widely used object-oriented analysis and design methods Has become an effective standard for object-oriented modelling Notation Object classes are rectangles with the name at the top, attributes in the middle section and operations in the bottom section Relationships between object classes (known as associations) are shown as lines linking objects Inheritance is referred to as generalisation and is shown ‘upwards’ rather than ‘downwards’ in a hierarchy