Low Level Design Activities. Implementation (Low Level Design) What is a Good Low Level Module? Black Box Aspects. Black box aspects White box aspects

Similar documents
Part 5. Verification and Validation

Checklist for Requirements Specification Reviews

Components Based Design and Development. Unit 3: Software Design Quick Overview

Lethbridge/Laganière 2005 Chapter 9: Architecting and designing software 6

Chapter 8: Class and Method Design

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

COSC 2P95. Procedural Abstraction. Week 3. Brock University. Brock University (Week 3) Procedural Abstraction 1 / 26

Absolute C++ Walter Savitch

Chapter 1: Programming Principles

Chapter 8. Achmad Benny Mutiara

Improving Software Testability

Testing. Unit, integration, regression, validation, system. OO Testing techniques Application of traditional techniques to OO software

Lecture Notes on Memory Layout

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Three General Principles of QA. COMP 4004 Fall Notes Adapted from Dr. A. Williams

Chapter 11, Testing, Part 2: Integration and System Testing

Computer Science and Software Engineering University of Wisconsin - Platteville 9-Software Testing, Verification and Validation

Chapter 4 Defining Classes I

Verification and Validation

Verification & Validation of Open Source

Summary of the course lectures

Lecture 15 Software Testing

Problem Solving with C++

CS 370 The Pseudocode Programming Process D R. M I C H A E L J. R E A L E F A L L

Testing Object-Oriented Software. 22 November 2017

Verification and Validation. Assuring that a software system meets a user s needs. Verification vs Validation. The V & V Process

CS 307: Software Engineering. Lecture 10: Software Design and Architecture

Sample Question Paper. Software Testing (ETIT 414)

Chapter 11, Testing, Part 2: Integration and System Testing

AXIOMS OF AN IMPERATIVE LANGUAGE PARTIAL CORRECTNESS WEAK AND STRONG CONDITIONS. THE AXIOM FOR nop

Topics in Software Testing

Abstraction and Specification

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

Outline. iterator review iterator implementation the Java foreach statement testing

Programming II. Modularity 2017/18

This wouldn t work without the previous declaration of X. This wouldn t work without the previous declaration of y

Alan J. Perlis - Epigrams on Programming

Software Testing TEST CASE SELECTION AND ADEQUECY TEST EXECUTION

Software Development. Modular Design and Algorithm Analysis

18-642: Code Style for Compilers

CMSC 330: Organization of Programming Languages. OCaml Imperative Programming

18-642: Code Style for Compilers

Programming Languages Third Edition

Software Engineering (CSC 4350/6350) Rao Casturi

Chapter 1: Principles of Programming and Software Engineering

CMSC 330: Organization of Programming Languages. OCaml Imperative Programming

Object Oriented Programming

Self-checking software insert specifications about the intent of a system

Dataworks Development, Inc. P.O. Box 174 Mountlake Terrace, WA (425) fax (425)

Software Engineering

Operating Systems CMPSCI 377, Lec 2 Intro to C/C++ Prashant Shenoy University of Massachusetts Amherst

Program Correctness and Efficiency. Chapter 2

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

People tell me that testing is

Chapter 5 Object-Oriented Programming

Software Requirements Specification. <Project> for. Version 1.0 approved. Prepared by <author(s)> <Organization> <Date created>

Write for your audience

12/30/2013 S. NALINI,AP/CSE

Regression testing. Whenever you find a bug. Why is this a good idea?

Software Testing. Massimo Felici IF


Software Architecture

Index. Index. More information. block statements 66 y 107 Boolean 107 break 55, 68 built-in types 107

QUIZ How do we implement run-time constants and. compile-time constants inside classes?

Method Description for Semla A Software Design Method with a Focus on Semantics

Software Architectures. Lecture 6 (part 1)

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters.

EXAMINING THE CODE. 1. Examining the Design and Code 2. Formal Review: 3. Coding Standards and Guidelines: 4. Generic Code Review Checklist:

Good Practices in Parallel and Scientific Software. Gabriel Pedraza Ferreira

Test requirements in networked systems

D Programming Language

Lecture Chapter 2 Software Development

Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 22 Slide 1

Object-Oriented Programming for Scientific Computing

Functions: Decomposition And Code Reuse

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file?

Where are we going? EEC 521: Software Engineering. A Note on Quality. What is Design? Introduction to Design. Our focus

Lecture 17: Testing Strategies. Developer Testing

Agenda. Peer Instruction Question 1. Peer Instruction Answer 1. Peer Instruction Question 2 6/22/2011

Steps for project success. git status. Milestones. Deliverables. Homework 1 submitted Homework 2 will be posted October 26.

Testing Objectives. Successful testing: discovers previously unknown errors

Chapter 11, Testing, Part 2: Integration and System Testing

Software Testing Strategies. Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

10. Software Testing Fundamental Concepts

Software Quality Assurance & Testing

G Programming Languages - Fall 2012

Mei Nagappan. How the programmer wrote it. How the project leader understood it. How the customer explained it. How the project leader understood it

Minsoo Ryu. College of Information and Communications Hanyang University.

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 11/10/2015

Where are we going? EEC 421/521: Software Engineering. What is Design? A Note on Quality. Introduction to Design. Many levels of design: Our focus

The Software Design Process. CSCE 315 Programming Studio, Fall 2017 Tanzir Ahmed

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture

Software Engineering Fall 2014

SOFTWARE ARCHITECTURE & DESIGN INTRODUCTION

Sample Exam. Advanced Test Automation Engineer

Lecture 8 Requirements Engineering

Static program checking and verification

Complexity-Reducing Design Patterns for Cyber-Physical Systems. DARPA META Project. AADL Standards Meeting January 2011 Steven P.

Solution of Out-of-Core Lower-Upper Decomposition for Complex Valued Matrices

Quality Assurance: Test Development & Execution. Ian S. King Test Development Lead Windows CE Base OS Team Microsoft Corporation

Transcription:

Low Level Design Activities Implementation (Low Level Design) Implement Document Deskcheck Basic Test PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 2 What is a Good Low Level Module? Black Box Aspects Black box aspects White box aspects Fulfilled functionality Fulfilled characteristics Easy to use Integratable Reusable Testable Traceable Backward Compatible Balanced role PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 3 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 4

Fulfilled Functionality Fulfilled Characteristics Stimuli from asynchronously applied use cases. Response times Processor load Static data size Dynamic data size Code size Depends on used algorithms and data structure! PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 5 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 6 Easy to Use Well documented Users Manual Understandable role Intuitive functionality Simple interface Powerful functionality Low dependency Integratable Correct tolerance level Avoid unnecessary limitations, but... Also avoid defensive programming Never hide a fault! Strive for self containment No cyclic dependencies Design by Contract Preconditions Postconditions Invariants PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 7 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 8

Reusable More generic than what is explicitly required. Broader value ranges Arbitrary data types. Caution: Do not spend time on this! Document actual functionality Testable Good test script Test interface State observability Flow observability Testable algorithms Observable test harness PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 9 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 10 Traceable (Valid for traceable functionality only) Future impacts must be verified against all existing users. Existing solutions can not be understood if already implemented requirements are lost. Risk that existing system functionality stops working after modifications. Other modules may require change to allow changes in this module. Backward Compatible Requirement for non-traceable modules. Desired for traceable modules. All existing use must be supported by new releases. Tough and expensive requirement to fulfill. PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 11 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 12

Balanced Role Inappropriate functional decomposition often discovered during low level design. Functionality and responsobilities may better be moved to other modules. Deviations from input design documentation sometimes acceptable. Deviations must be approved by project management and higher level design. Use with caution. If possible, wait until next iteration. (The bigger the project, the harder to deviate.) PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 13 White Box Aspects Deductable Understandable Modifiable Fault free PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 14 Deductable Try to find an intuitive coupling between problem and solution. Internal structure should reflect the modules role. Implementation correctness should be possible to determine by desk check. Understandable (1) Repairmans Manual Comments What is the role of arguments What is the purpose of the next code segment? Why is a decision taken?... Low complexity Structured programming Use the most understandable solution unless in conflict with characteristics requirements. PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 15 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 16

Understandable Self explanatory code Expressive function names Imperative or functional names. Be consequent, follow standards. Expressive variable names Expressive data typing Standards!!! (Rules & recommendations) Naming Body language (indentations, bracket placement...) Commenting style Idioms (code patterns) Modifiable (1) Code will be modified by someone else. It s your fault he misunderstands anything you did. No hidden side effects. Use explicit communication Avoid widely scoped variables Sophisticated OO constructs requires experience and discipline. Don t get carried away! PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 17 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 18 Modifiable (2) Keep influence local. Encapsulation Limit scope of data, functions, definitions Encapsulate base classes and local classes as well. Avoid C++ friend relationships outside file scope. Fault Free Uninitialized variables Incorrect loop terminations Invalid pointers Incorrect type casting Data outside valid value ranges Index outside array bounds Memory leaks Unexpected signals Unexpected recursion Syntactical pitfalls if (i = 0)... Copy & paste mistakes PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 19 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 20

The Detailed Design Document Service Information a Abstract b TOC c Document status and history PART 1 General Description 1 Introduction 1.1 Purpose 1.2 Scope 1.3 Glossary 1.4 References 1.5 Overview 2 Project Standards, Conventions and Procedures 2.1 Design standards 2.2 Documentation standards 2.3 Naming conventions 2.4 Programming standards 2.5 Software development tools PART 2 Component Design Specifications I Component i (its name) I.1 Type I.2 Purpose I.3 Function I.4 Subordinates I.5 Dependencies I.6 Interfaces I.7 Resources I.8 References I.9 Processing I.10 Data Appendix A: Source Code Listings Appendix B: Software Requirements Vs. Components Traceability Matrix Implementation Work Flow Describe Coordination & Information Exchange Write Code Compile & Execute Quality Assurance Slightly adapted from ESA s Software Engineering Standards PSS-05-0 (see [ESA 96]) PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 21 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 22 Low Level Quality Assurance (1) Basic test Execution of code on lowest level Automated tools Test scripts Test harnesses Desk check Check list for common faults Checking rate ~100 LoC / hour Low Level Quality Assurance (2) Tool supported analysis Execution coverage Performance Memory leaks Common pitfalls Complexity Array bounds PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 23 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 24

Fault vs Failure can lead to can lead to human error fault failure Error Handling Highlight faults Never hide a fault Disastrous symptoms are good during testing Use error logs for delivered systems Avoid failures Try to reduce effect in target system. Failure avoidance strategy depends on criticality Unusual conditions are not faults (e.g. disk full) Lack of handling of them are! PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 25 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 26 Criticality Consumer products Professional tools Industrial systems Medical systems Auto pilots. More on Quality Assurance Coming soon to a theatre near You! PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 27 PVK--HT00 Copyright 1997-1999, jubo@cs.umu.se/epltos@epl.ericsson.se 28