23 Action-Oriented Design Methods 1. Use Cases 2. Structured - - PowerPoint PPT Presentation

23 action oriented design methods
SMART_READER_LITE
LIVE PREVIEW

23 Action-Oriented Design Methods 1. Use Cases 2. Structured - - PowerPoint PPT Presentation

Fakultt Informatik, Institut fr Software- und Multimediatechnik, Lehrstuhl fr Softwaretechnologie 23 Action-Oriented Design Methods 1. Use Cases 2. Structured Analysis/Design (SA/SD) 3. Structured Analysis and Design Technique (SADT)


slide-1
SLIDE 1

Fakultät Informatik, Institut für Software- und Multimediatechnik, Lehrstuhl für Softwaretechnologie

23 Action-Oriented Design Methods

Ø

  • Prof. Dr. U. Aßmann

Ø

Technische Universität Dresden

Ø

Institut für Software- und Multimediatechnik

Ø

http://st.inf.tu-dresden.de

Ø

Version 11-0.1, 28.12.11

  • 1. Use Cases
  • 2. Structured Analysis/Design

(SA/SD)

  • 3. Structured Analysis and Design

Technique (SADT)

slide-2
SLIDE 2

Obligatory Reading

Ø Balzert, Kap. 14 Ø Ghezzi Ch. 3.3, 4.1-4, 5.5 Ø Pfleeger Ch. 4.1-4.4, 5

  • Prof. U. Aßmann

Action Oriented Design

slide-3
SLIDE 3

Secondary Literature

Ø Usually, action-oriented design is structured, i.e., based on

hierarchical stepwise refinement.

Ø Resulting systems are

Ø reducible, i.e., all results of the graph-reducibility techniques apply. Ø Often parallel, because processes talk with streams

Ø SA and SADT are important for embedded systems because

resulting systems are parallel and hierarchic

  • Prof. U. Aßmann

Action Oriented Design

slide-4
SLIDE 4

23.1 ACTION-ORIENTED DESIGN

  • Prof. U. Aßmann

Action Oriented Design

slide-5
SLIDE 5

23.1 Action-oriented Design

Ø Action-oriented design is similar to function-oriented design, but

admits that the system has states. Ø It asks for the internals of the system Ø Actions require state on which they are performed (imperative, state-

  • riented style)

Ø Divide: finding subactions Ø Conquer: grouping to modules and processes Ø Example: all function-oriented design methods can be made to

action-oriented ones, if state is added

  • Prof. U. Aßmann

Action Oriented Design

What are the actions the system should perform?

slide-6
SLIDE 6

23.2 ACTION-ORIENTED DESIGN WITH SA/SD

Data-flow connects processes (parallel actions)

  • Prof. U. Aßmann

Action Oriented Design

slide-7
SLIDE 7

Structured Analysis and Design (SA/SD)

Ø [DeMarco, T. Structured Analysis and System Specification,

Englewood Cliffs: Yourdon Press, 1978]

Ø Representation

Ø Function trees (action trees, process trees): decomposition of system

functions

Ø Data flow diagrams (DFD), in which the actions are called processes Ø Data dictionary (context-free grammar) describes the structure of the

data that flow through a DFD

Ø Pseudocode (minispecs) describes central algorithms Ø Decision Table and Trees describes conditions (see later)

  • Prof. U. Aßmann

Action Oriented Design

slide-8
SLIDE 8

Structured Analysis and Design (SA/SD) – The Process

Ø On the highest abstraction level:

Ø Elaboration: Define interfaces of entire system by a top-level function

tree

Ø Elaboration: Identify the input-output streams most up in the function

hierarchy

Ø Elaboration: Identify the highest level processes Ø Elaboration: Identify stores

Ø Refinement: Decompose function tree hierarchically Ø Change Representation: transform function tree into process

diagram (action/data flow)

Ø Elaboration: Define the structure of the flowing data in the Data

Dictionary

Ø Check consistency of the diagrams Ø Elaboration: Minispecs (pseudocode)

  • Prof. U. Aßmann

Action Oriented Design

slide-9
SLIDE 9
  • Prof. U. Aßmann

Action Oriented Design

slide-10
SLIDE 10

Function Trees (Action Trees) and DFDs

Ø Function trees are homomorphic to DFD Ø RepresentationChange: Construct a function tree and transform it

to the actions of a DFD

  • Prof. U. Aßmann

Action Oriented Design

produce tea put tea in pot add boiling water wait composition

put tea in pot add boiling water wait produce tea Pot store/file action Cup

fetch tea from tea box

  • pen

pot close pot

slide-11
SLIDE 11

Decomposition of DFDs and Actions

Ø Subtrees in the function tree lead to reducible subgraphs in the DFD

  • Prof. U. Aßmann

Action Oriented Design

Fetch tea from tea box Open pot Close Pot put tea in pot Pot Pot put tea in pot Pot put tea in pot fetch tea from tea box

  • pen

pot close pot

slide-12
SLIDE 12

Data Flow in UML

Ø UML function trees can be formed from actions, and aggregation Ø Activity diagrams can specify dataflow

Ø UML 2.0 offers reducible activity diagrams

  • Prof. U. Aßmann

Action Oriented Design

Fetch tea from tea box Open pot Close Pot put tea in pot Pot put tea in pot Pot put tea in pot

  • pen

pot Pot close pot fetch tea from tea box

slide-13
SLIDE 13
  • Prof. U. Aßmann

Action Oriented Design

slide-14
SLIDE 14

Typing Edges with Types from the Data Dictionary

Ø In an SA model, the data dictionary describes the context free

structure of the data flowing over the edges

Ø For every edge in the DFDs, it contains a context-free grammar that

describes the flowing data items

Ø Notation is also called Extended Backus-Naur Form (EBNF)

  • Prof. U. Aßmann

Action Oriented Design

Notation Meaning Example ::= or = Consists of A ::= B. Sequence + Concatenation A ::= B+C. Sequence <blank> Concatenation A ::= B C. Selection [ | ] Alternative A ::= [ B | C ]. Repetition { }^n A ::= { B }^n. Limited repetition m { } n Repetition from m to n A ::= 1{ B }10. Option ( ) Optional part A ::= B (C).

slide-15
SLIDE 15

Example Data Dictionary

  • Prof. U. Aßmann

Action Oriented Design

DataInPot ::= TeaPortion WaterPortion. TeaAutomatonData ::= Tea | Water | TeaDrink. Tea ::= BlackTea | FruitTea | GreenTea. TeaPortion ::= { SpoonOfTea }. SpoonOfTea ::= Tea. WaterPortion ::= { Water }.

slide-16
SLIDE 16

Adding Types to DFDs

Ø Nonterminals from the data dictionary become types on flow edges Ø (Alternatively, types from a UML class diagram can be annotated)

  • Prof. U. Aßmann

Action Oriented Design

put tea in pot add boiling water wait produce tea Pot Water GreenTea Cup TeaDrink

slide-17
SLIDE 17

Minispecs in Pseudo Code

Ø Minispecs describes the processes in the nodes of the DFD in

pseudo code. They describe the data transformation of every process

Ø Here: specification of the minispec attachment process:

  • Prof. U. Aßmann

Action Oriented Design

procedure: AddMinispecsToDFDNodes target.bubble := select DFD node; do while target-bubble needs refinement if target.bubble is multi-functional then decompose as required; select new target.bubble; add pseudocode to target.bubble; else no further refinement needed endif enddo end

slide-18
SLIDE 18

Good Languages for Pseudocode

Ø SETL (Schwartz, New York University)

Ø Dynamic sets, mappings Ø Iterators

Ø PIKE (pike.ida.liu.se)

Ø Dynamic arrays, sets, relations, mappings Ø Iterators

Ø ELAN (Koster, GMD)

Ø Natural language as identifiers of procedures

Ø Smalltalk (Goldberg et.al, Parc) Ø Attempto Controlled English (ACE, Prof. Fuchs, Zurich)

Ø A restricted form of English, easy to parse

  • Prof. U. Aßmann

Action Oriented Design

slide-19
SLIDE 19

Structured Analysis and Design (SA/SD) - Heuristics

Ø Consistency checks

Ø Several consistency rules between diagrams (e.g., between function trees

and DFD)

Ø Corrections necessary in case of structure clash between input and output

formats

Ø Advantage of SA

Ø Hierarchical refinement: The actions in the DFD can be refined, I.e., the DFD

is a reducible graph

Ø SA leads to a hierarchical design (a component-based system)

  • Prof. U. Aßmann

Action Oriented Design

slide-20
SLIDE 20

Difference to Functional and Modular Design

Ø SA focusses on actions (activities, processes), not functions

Ø Describe the data-flow through a system Ø Describe stream-based systems with pipe-and-filter architectures

Ø Actions are processes

Ø SA and SADT can easily describe parallel systems

Ø Function trees are interpreted as action trees (process trees) that

treat streams of data

  • Prof. U. Aßmann

Action Oriented Design

slide-21
SLIDE 21

Result: Data-Flow-Based Architectural Style

Ø SA/SD design leads to dataflow-based architectural style Ø Processes exchanging streams of data Ø Data flow forward through the system Ø Components are called filter, connections are pipes

  • Prof. U. Aßmann

Action Oriented Design

Filter Filter Filter System pipe pipe

slide-22
SLIDE 22

Examples

Ø Shell pipes-and-filters Ø Image processing systems Ø Signal processing systems (DSP-based embedded systems)

Ø The satellite radio Ø Video processing systems Ø Car control Ø Process systems (powerplants, production control, …)

Ø Content management systems (CMS)

  • Prof. U. Aßmann

Action Oriented Design

slide-23
SLIDE 23

23.3 SADT

  • Prof. U. Aßmann

Action Oriented Design

slide-24
SLIDE 24

Structured Analysis and Design Technique (SADT)

Ø SADT is a action- and data-flow-oriented method Ø Reducible graphs with 2 main forms of diagrams:

Ø Activity diagrams: Nodes are activities, edges are data flow (like DFD)

Ø Data flow architectures result

Ø Data diagrams: Nodes are data (stores) and edges are activities Ø Layout constraint: edges go always from left to right, top to bottom

Ø Companies used to have standardized forms, marked with author,

date, version, name, etc..

  • Prof. U. Aßmann

Action Oriented Design

Activity Input Data Output Data Control Data Mechanism/ responsible Data Generating Activity Consuming Activity Control Activity Store

slide-25
SLIDE 25

Maintenance

Example: The Waterfall Software Model with Activity Diagram of SADT

Ø Activity Diagrams SADT – Similar to DFD Ø Read direction left to right, top to bottom Ø With designation of responsible

  • Prof. U. Aßmann

Action Oriented Design

Collect Requirements Design Designer Implementation Requirements Engineer Programmer Maintener Waterfall Software Construction SRS SD Program

slide-26
SLIDE 26

Refinement of Nodes

  • Prof. U. Aßmann

Action Oriented Design

Architectural Design Detailed Design Designer Architect Design Detailed Design Document Architectural Design Requirements

slide-27
SLIDE 27

Data Diagrams SADT

  • Prof. U. Aßmann

Action Oriented Design

Characters Tokens Syntax Tree Intermediate Code Machine code Buffer Pipe Memory File

  • Lex. Grammar

Grammar Tree Mapping Compiler

slide-28
SLIDE 28
  • Prof. U. Aßmann

Action Oriented Design

slide-29
SLIDE 29

Comparison SADT vs SA/SD

Ø SADT, SA/SD are system-oriented methods, known in other

disciplines

Ø Action-oriented methods

Ø they only distinguish between actions (processes) and data

Ø Stream-oriented, i.e., model streams of data flowing through the system Ø System-oriented, know the concept of a subsystem

Ø SA-DFDs are more flexible as SADT actitity diagrams, since the

layout is not constrained

Ø Function trees and DDs may be coupled with SADT

  • Prof. U. Aßmann

Action Oriented Design

slide-30
SLIDE 30

Why are SA and SADT Important?

Ø They lead to component-based systems (hierarchical systems)

Ø Component-based systems are ubiquituous for many areas Ø Object-orientation is not needed everywhere Ø Other engineers use SADT also

Ø SA and SADT can easily describe parallel systems in a structured

way

Ø SA and SADT are stream-based, i.e., for stream-based applications.

When your context model has streams in its interfaces, SA and SADT might be applicable

Ø Use case actions can be refined similarly as SA and SADT actions!

  • Prof. U. Aßmann

Action Oriented Design

slide-31
SLIDE 31

What Have We Learned

Ø Use case diagrams are an action-oriented diagram notation

Ø that can be coupled with several design methods (action trees,

communication diagrams)

Ø Besides object-oriented design, structured, action-oriented design

is a major design technique

Ø It will not vanish, but always exist for certain application areas Ø If the system will be based on stream processing, system-oriented design

methods are appropriate

Ø System-oriented design methods lead to reducible systems

Ø Don't restrict yourself to object-oriented design

  • Prof. U. Aßmann

Action Oriented Design

slide-32
SLIDE 32

The End

  • Prof. U. Aßmann

Action Oriented Design