Disciplined Software Engineering Lecture #10 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 Sponsored by the U.S. Department.

Slides:



Advertisements
Similar presentations
Verification and Validation
Advertisements

Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #7 Software Engineering.
Personal Software ProcessSM
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Software Quality Metrics
Chapter 15 Design, Coding, and Testing. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Design Document The next step in the Software.
Chapter 9 Describing Process Specifications and Structured Decisions
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Chapter 1 Program Design
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #14 Software Engineering.
S/W Project Management
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Overview of the Database Development Process
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Introduction to RUP Spring Sharif Univ. of Tech.2 Outlines What is RUP? RUP Phases –Inception –Elaboration –Construction –Transition.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Chapter 2 The process Process, Methods, and Tools
Chapter 9 Describing Process Specifications and Structured Decisions
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Disciplined Software Engineering Lecture #8 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Disciplined Software Engineering Lecture #4 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Disciplined Software Engineering Lecture #6 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Disciplined Software Engineering Lecture #7 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
SE: CHAPTER 7 Writing The Program
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #8 Software Engineering.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
1 Introduction to Software Engineering Lecture 1.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 3 1 Software Size Estimation I Material adapted from: Disciplined.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #4 Software Engineering.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 7 1 Design and Code Reviews - Overview What are design and code.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Disciplined Software Engineering Lecture #3 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Disciplined Software Engineering Lecture #2 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #2 Software Engineering.
Personal Software ProcessSM
Disciplined Software Engineering Lecture #13 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
1-1 Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life.
CS 350: Introduction to Software Engineering Slide Set 2 Process Measurement C. M. Overstreet Old Dominion University Fall 2005.
Disciplined Software Engineering Lecture #12 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #12 Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
INFO 637Lecture #71 Software Engineering Process II Product Implementation INFO 637 Glenn Booker.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
Winter 2011SEG Chapter 11 Chapter 1 (Part 1) Review from previous courses Subject 1: The Software Development Process.
Focus on design principles and on a process for doing design = To produce a precise, complete, high- quality foundation for product implementation.
Software Requirements Specification (SRS)
Software Requirements Specification Document (SRS)
Software Quality Assurance and Testing Fazal Rehman Shamil.
Copyright © 1994 Carnegie Mellon University, 2002 James P Alstad CSCI511Personal Software Process - Design Verification 1 1 Disciplined Software Engineering.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Chapter 6 Guidelines for Modelling. 1. The Modelling Process 1. Modelling as a Transformation Process 2. Basic Modelling Activities 3. Types of Modelling.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
MANAGEMENT INFORMATION SYSTEM
Unified Modeling Language
Disciplined Software Engineering Lecture #10
Disciplined Software Engineering Lecture #6
About the Presentations
Verification and Validation
Chapter 11 Describing Process Specifications and Structured Decisions
Presentation transcript:

Disciplined Software Engineering Lecture #10 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense

Software Design - Overview Design –constraints –process –representation Users’ needs Design dimensions Design templates

Design Constraints The requirements must parallel design - they will often not be completely understood until you have a working product. Each design level debugs higher level designs –the specification debugs the requirements –the high-level-design debugs the specification –the detailed design debugs the high-level design –the implementation debugs the detailed design

Gather data on user requirements Analyze the requirements data Conceive of a high level design Refine and document the design Validate the design against the requirements Obtain answers to requirements questions Initial Requirements Completed Design

Implementation Design Unit test Integration test System test Acceptance Use User Requirements

The Design Cycle Requirements definition System specification System high-level design Product N specification Product N high-level design Product 1 specification Product 1 high-level design Component 1-1 specification Component 1-1 high-level design Component 1-n specification Component 1-n high-level design Module 1nk specification Module 1n1 specification Module 1n1 detailed design Module 1nk detailed design

The Design Process - 1 Software design is the creative process of producing a precise and effective solution to an ill-defined problem. The design process cannot be –reduced to a routine procedure –automated –precisely controlled or predicted

The Design Process - 2 The design process can be structured to –separate the routine from the creative activities –ensure that the design work is properly performed –identify potential design support tools and methods It is important to separate two issues –how to do the design –how to represent the design when it is completed

The Design Process - 3 There are many design methods –none have been proven best for every domain –the best method may depend on the individual –individual preferences are also important –a widely-usable process must work with many different design methods There are also many types of representations –graphics assist in visualizing structure –formality provides precision –text provides intuitive understanding –all three are often needed

The PSP Design Process The PSP focuses on what a design should contain when it is completed. This is necessary because –it provides criteria for determining when a given design phase is completed –it provides a basis for reviewing the design –since there is no single best design method, the PSP must be capable of supporting multiple methods

Poor Design Representations Cause Defects - 1 Levels of design –an obvious design concept may not be obvious during implementation –reconstructing the design context during implementation is time consuming and error prone –to save time and prevent defects, the design should be precisely recorded when it is conceived

Poor Design Representations Cause Defects - 2 Design visibility –complex designs are difficult to visualize –a poor representation compounds this problem –a well-represented design is unambiguous Design redundancy –a redundant design is often inconsistent –inconsistency breeds errors and causes defects –a quality design has minimum duplication

Design Representation - Requirements The design representation must –precisely define all significant design aspects –include all important details –communicate the designers’ intent –help identify design problems and omissions Also –the design should be compact and easy to use –the design topics must be readily located –redundancy must be avoided

The Users of the Design - 1 The principal users of the design are –implementors –design reviewers –testers and test developers –documentors, maintainers, and enhancers

The Users of the Design - 2 The users all need –a clear statement of the program’s logic –a description of all external calls and references –a list of all external variables, parameters, and constants –a specification for all related objects and classes –a description of all files and messages –the specification of all system constraints –the specification of all implementation constraints

The Users of the Design- 3 In addition, the design and code reviewers need –a picture of where and how the program fits into the system –a structural view of the product –a precise statement of the program’s external functions The other users need –typical user scenarios –the specification of special error checks or conditions –the reasons for the design choices

The Users of the Design - 4 This is potentially a large amount of material –not all of it is needed immediately –some can be obtained from other sources –it is wise to limit the design workload as much as possible It is thus important to identify the critical design subset that the designers must provide. Where possible, the other items should be provided later or by other people or groups.

The Users of the Design - 5 The critical materials that must be provided by the designers before implementation are –a clear statement of the program’s logic –a specification of all external calls and references –a list of all external variables, parameters, and constants –a specification for all related objects and classes –a picture of where and how the program fits into the system –a structural view of the product

Design Dimensions Object Specification Static Dynamic InternalExternal Attributes Constraints Inheritance Class Structure State MachineServices Messages

Design Templates Four design templates are used in the PSP –logic specification template - static, internal –state specification template - dynamic, internal –functional specification template - dynamic and static, external –operational scenario template - dynamic, external

Logic specification State specification Functional specification Operational Scenario Module/object specifications The Design Hierarchy Program requirements: what the user needs Program specifications: what the program does High-level design: how the program works

Logic specification State specification Functional specification Operational Scenario Module source code Module requirements: what the program needs Module specifications: what the module does Detailed design: how the module works The Implementation Hierarchy

Using Design Templates These templates comprise one way to represent a design –their intent is to be precise, unambiguous, non-redundant, and complete –use the design templates with the PSP where you can Other representations may be substituted if they are equally precise, unambiguous, non-redundant, and complete. Additional representations are acceptable.

Template Dimensions Object Specification Static Dynamic InternalExternal Logic Specification Template Functional Specification Template State Specification Template Functional Specification & Operational Scenario Templates

Functional Specification Template - 1 The purpose of the functional specification template is to unambiguously define all the external functional services provided by this product –the objects, classes, and inheritance –the externally visible attributes –the precise external functions provided by each object

Functional Specification Template - 2 Where possible, each function call and return should be specified in a formal notation. The functional specifications of related objects/classes should grouped together in common templates.

Example Functional Specification Template ASet (CData) ListState (0 - 4) ListPosition(0 - N) void Push(data D) char *Pop(data &D) int AddSet(data D) int SubtractSet(data D) int MemberSet(data D) :: insert D at position 1 && Reset Empty’ :: return D.name && delete first && reset || Empty :: return “Empty” D not in ASet :: Push(D) && Reset && return true || D in ASet :: Reset&& return false D in ASet :: delete(D) && Reset && return true || D not in ASet :: Reset && return false D in ASet :: return ListPosition || D not in ASet && N==1 :: ListPostition = 1 && ListState = 1 && return false || D not in ASet && N>1 :: ListPosition = N && ListState = 4 && return false

State Specification Template 1 An object is a state machine when –identical inputs produce different responses –previous history is remembered by the states The state specification template precisely defines the object’s states and the transitions among them.

State Specification Template 2 For each object state machine, the template specifies –the name of every state –the attributes that characterize each state –the attribute values for that state –a brief description of the state –the precise conditions that cause transitions from the state to itself –the precise conditions that cause transitions from any other state to this state

Example State Machine* *Note: the transitions of a state to itself are not shown EmptySet First&Only FirstOfSeveral MiddleOfSeveralLastOfSeveral

A Partial State Specification First&Only the set has one member N = 1 ListState = 1 ListPosition = 1 EmptySet First&Only FirstOfSeveral MiddleOfSeveral LastOfSeveral Clear || Pop || (SubtractSet(D) && D in ASet) Reset || StepForward || StepBackward || (AddSet(D) && D in ASet) || (SubtractSet(D) && D not in ASet) || MemberSet || Empty || Last || Status || Position Push || (AddSet(D) && D not in ASet) Impossible

State Specification Template Considerations Define all the object state machines –the trivial ones should be trivial to define –often seemingly simple state machines are not –when state machines involve multiple objects, that could be a sign of poorly selected objects Check for completeness and consistency –the set of attribute conditions for all the states must be complete and orthogonal –the set of all transition conditions from any given state must be complete and orthogonal

Logic Specification Template 1 The logic specification template precisely defines the program’s internal logic Describe the logic in a convenient notation –a pseudocode compatible with the implementation language is often appropriate –formal notation is also appropriate –the implementors must be fluent with the notation used

Logic Specification Template 2 The logic specification template should specify –the logic for each method of each object and for the main program –the precise call to the program or method –includes –special data types and data definitions –the project name, date, and developer

Operational Scenario Template - 1 The operational scenario template is used to ensure that the users’ normal and abnormal interactions with the system are considered and defined both before and during the design. The operational scenario template can be used –to define test scenarios and test cases –to resolve development questions about operational issues –to resolve requirements discussions with users

Operational Scenario Template - 2 The operational scenario template uses a scenario format. It contains –the principal user actions and system responses –the anticipated error and recovery conditions

Assignment #10 Read Chapter 10 in the text. Using PSP2.1, write program 9A to calculate the degree to which a string of N real numbers is normally distributed. –assume N is >20 and an even multiple of 5 –use program 8A to sort the numbers into ascending order. Read the process and report specifications in Appendix C and the program specifications in Appendix D.

Messages to Remember from Lecture While design is a creative process, its routine aspects can be defined. 2. The definition of the design products and the use of established formats can improve the quality of your designs. 3. Experiment with the 4 PSP design templates in the course exercises and, if you find them helpful, use them in your other work.