ser ex4 introduction

5
1 Universität Stuttgart Institute of Industrial Automation and Software Engineering Prof. Dr.-Ing. Dr. h. c. P. Göhner © 2004 IAS, Universität Stuttgart Exercises Software Engineering for Real-Time Systems Exercise 4: Basic Techniques Introduction Basic Techniques Summary 2 © 2004 IAS, University of Stuttgart Function Tree Consists-of hierarchy (definition phase): A consists of B and C Calling hierarchy (design phase): A calls B and C. A B C Composition Rules: Functions being pooled by a common parent function should be in a close context to each other Functions being at the same hierarchy level should have the same abstraction level Car Body Motor ...

Upload: andreluizpsilveira77

Post on 20-Jul-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Ser Ex4 Introduction

1

1

Universität StuttgartInstitute of Industrial Automation and Software Engineering

Prof. Dr.-Ing. Dr. h. c. P. Göhner

© 2004 IAS, Universität Stuttgart

Exercises Software Engineering for Real-Time Systems

Exercise 4: Basic Techniques

Introduction

Basic Techniques Summary

2© 2004 IAS, University of Stuttgart

Function Tree

– Consists-of hierarchy (definition phase): A consists of B and C

– Calling hierarchy (design phase): A calls B and C.

A

B C

– Composition Rules:

– Functions being pooled by a common parent function should be in a close context to each other

– Functions being at the same hierarchy level should have the same abstraction level

Car

Body Motor ...

Page 2: Ser Ex4 Introduction

2

3© 2004 IAS, University of Stuttgart

ER Diagram (Entity Relationship Diagram)

Aim: Specification of objects (persistent data) and the relationships between them.

Example: ”Customer"

Salutation: HerrTitle: Dipl.-Ing.Name: SchulzStreet: Poststr. 12City: 44112 Dortmund

Customer

Customer ID

Salutation

Title

. . .

– Entity Type: Collection of entities having identical properties

– Attribute: Property of an entity type or the existing objects of that entity type respectively

– Descriptive attributes

– Identifying attributes (keys)

[P. Chen, 1976]

– Entity (object): An individual and identifiable sample of the reality being described by a set of properties

4© 2004 IAS, University of Stuttgart

ER Diagram - Associations (1)

– Association (Relationship):Relation between entity types or the existing objects of these entity types respectively

– Cardinalities (Degree of Complexity):Number of entities a certain entity has to be or can be involved with

A1A2A3

B1B2B3

Ais

associatedwith

B1 1

1:1 - Association

Mr MeyerMr MüllerMr Schulz

Ms MeyerMs MüllerMs Schulz

Husbandis

marriedwith

Wife1 1

Page 3: Ser Ex4 Introduction

3

5© 2004 IAS, University of Stuttgart

ER Diagram - Associations (2)

1:n - Association

A1A2

B1B2..

Ais

associatedwith

B1 M

SchulzMeyer

AlfredJanUwe

...

Married-couple

has Child1 m

m:n - Association

Ais

associatedwith

Bm n

A BMüllerMeyerSchulz

...

Javacourse

C++course

Courseis

attendedby

Paticipantm n

6© 2004 IAS, University of Stuttgart

Data Flow Diagram (DFD) (1)

Notation

Function

Memory

Data Flow

Interface

Syntactic Rules

– A DFD contains at least one interface

– In general each interface exists only once

– There are no data flows between interfaces

– Each data flow has a name (exception: data flow from and to memory don’t need a name)

– There cannot be any direct data flows between memories

– There cannot be any direct data flows between interfaces and memories

Aim: Specification of the data or information exchange between functions, memories and interfaces.Aim: Specification of the data or information exchange between functions, memories and interfaces.

[De Marco, 1979]

Page 4: Ser Ex4 Introduction

4

7© 2004 IAS, University of Stuttgart

Data Flow Diagram (DFD) (2)

Semantic Rules

– DFDs describe the data flow, but not the control flow (i.e. no decisions or loops, no initialization or termination statements)

– Interfaces specify the original source or sink of an information(e.g. Registration data of an event originate from the visitor rather than from the official in charge to process the registrations)

– Important: interfaces are detached from involved I/O media or peripherals (i.e. the interface is not the keyboard or printer by which the information is passed in or out)

– Data flow names are composed of a noun only (e.g. Street Name) or a noun plus an adjective (e.g. New Street Name)

– Function names are composed of a verb specifying some action followed by an object (e.g. Create Address Label)

8© 2004 IAS, University of Stuttgart

Finite State Machines

– In many systems the reaction does not depend a single input only but on a upstream history of inputs the system has passed through. Finite State Machines can be used to describe such a behavior.

– The Finite State Machine consists of a finite number of internal configurations named states.

– States contain the information, which

• results from all previous inputs and• is needed in addition to the current input in order to determine the

actual reaction of the system

Initial State

End Sate

Notation Example: Clock

DateMode

TimeMode

Button pressed

Button pressedEvent

Transition

State NameState

Page 5: Ser Ex4 Introduction

5

9© 2004 IAS, University of Stuttgart

Decision Table

Aim: Definition of actions to be performed depending on whether several conditions are true or false.

Conditions

Actions

Condition indicator

Action indicator

Name Rule

if

then

C1 The sun is shining

C2 There is some snow

A1 Cross-country skiing

A2 Hiking

A3 Having a walk

A4 Staying at home

R1 R2 R3 R4

Y

Y

X

Y

N

X

N

Y

X

N

N

X

Example

Decision Tables can be validated for

– Completeness

– Consistence

– Unambiguousness