Software engineering for realtime systems Section 4 Software

  • Slides: 23
Download presentation
Software engineering for real-time systems Section 4 Software design - core concepts SOFTWARE ENGINEERING

Software engineering for real-time systems Section 4 Software design - core concepts SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) Software design - core concepts - slide 1

Introduction Objectives To: · Outline fundamental software design strategies. · Describe how and why

Introduction Objectives To: · Outline fundamental software design strategies. · Describe how and why modular design is essential for the production of good software. SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 2

Design fundamentals Part 1 Design fundamentals SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E.

Design fundamentals Part 1 Design fundamentals SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 3

Overview of the design and development process SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J.

Overview of the design and development process SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 4

Specification translation - high-level description SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling

Specification translation - high-level description SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 5

Translation to the general design level SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E.

Translation to the general design level SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 6

Detailed design level SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 7

Detailed design level SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 7

A design problem SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 8

A design problem SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 8

Control system software design - a functional approach SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (©

Control system software design - a functional approach SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 9

Control system software design - an object-based approach SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (©

Control system software design - an object-based approach SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 10

Control system software design - a data-flow approach SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (©

Control system software design - a data-flow approach SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 11

Modular design Part 2 Modular design SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E.

Modular design Part 2 Modular design SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 12

Introducing modularization Modularization - the process of forming a complete software system from a

Introducing modularization Modularization - the process of forming a complete software system from a set of individual units or modules. Module? A standardized part or independent unit in the construction of software. But how should a system be modularized? Example system: How should this be modularized? SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 13

Modularization – design solution 1 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling

Modularization – design solution 1 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 14

Modularization – design solution 2 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling

Modularization – design solution 2 SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 15

Modules - design decisions SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003)

Modules - design decisions SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 16

Evaluating modularization 1: coupling - the outside view • Methods to evaluate modularization (1)

Evaluating modularization 1: coupling - the outside view • Methods to evaluate modularization (1) - coupling. - The amount of interaction between modules. • Check points: - number of module interconnections. - complexity of module interconnections. • Desirable features - few interconnections having low complexity. SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 17

Coupling methods - overview SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003)

Coupling methods - overview SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 18

Coupling methods 1 Content coupling Common coupling (common resource sharing) SOFTWARE ENGINEERING for REAL-TIME

Coupling methods 1 Content coupling Common coupling (common resource sharing) SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 19

Coupling methods 2 Stamp coupling (data structure coupling) Data coupling by value SOFTWARE ENGINEERING

Coupling methods 2 Stamp coupling (data structure coupling) Data coupling by value SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) Data coupling by reference 20

Evaluating modularization 2: cohesion - the inside view Cohesion - ‘the inside view’ •

Evaluating modularization 2: cohesion - the inside view Cohesion - ‘the inside view’ • Methods to evaluate modularization (2) cohesion. • Look into the modules. • How well do the component parts (the internal software machines) relate to each other? • Strong relationships indicate a good cohesion or “glue” factor. • This example has high cohesion - remove any part and the machine won’t work. • High cohesion = “Good” SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 21

The seven level cohesion model SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling

The seven level cohesion model SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 22

Review of ‘Software design - core concepts’ END OF SECTION ‘Software design - core

Review of ‘Software design - core concepts’ END OF SECTION ‘Software design - core concepts’ SOFTWARE ENGINEERING for REAL-TIME SYSTEMS (© J. E. Cooling 2003) 23