Outline: Software Design

Similar documents
Algorithms, Mechanisms and Procedures for the Computer-aided Project Generation System

COST PERFORMANCE ASPECTS OF CCD FAST AUXILIARY MEMORY

Parametric Abstract Domains for Shape Analysis

13.1 Numerical Evaluation of Integrals Over One Dimension

Compilation Lecture 11a. Register Allocation Noam Rinetzky. Text book: Modern compiler implementation in C Andrew A.

Pipelined Multipliers for Reconfigurable Hardware

A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR

On - Line Path Delay Fault Testing of Omega MINs M. Bellos 1, E. Kalligeros 1, D. Nikolos 1,2 & H. T. Vergos 1,2

Data Structures in Java

Interconnection Styles

- 1 - S 21. Directory-based Administration of Virtual Private Networks: Policy & Configuration. Charles A Kunzinger.

Extracting Partition Statistics from Semistructured Data

Test Case Generation from UML State Machines

System-Level Parallelism and Throughput Optimization in Designing Reconfigurable Computing Applications

Automatic Physical Design Tuning: Workload as a Sequence Sanjay Agrawal Microsoft Research One Microsoft Way Redmond, WA, USA +1-(425)

CleanUp: Improving Quadrilateral Finite Element Meshes

Torpedo Trajectory Visual Simulation Based on Nonlinear Backstepping Control

Flow Demands Oriented Node Placement in Multi-Hop Wireless Networks

The SODA AOSE Methodology

A Partial Sorting Algorithm in Multi-Hop Wireless Sensor Networks

The recursive decoupling method for solving tridiagonal linear systems

Facility Location: Distributed Approximation

A Load-Balanced Clustering Protocol for Hierarchical Wireless Sensor Networks

DETECTION METHOD FOR NETWORK PENETRATING BEHAVIOR BASED ON COMMUNICATION FINGERPRINT

What are Cycle-Stealing Systems Good For? A Detailed Performance Model Case Study

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking

COMP 181. Prelude. Intermediate representations. Today. Types of IRs. High-level IR. Intermediate representations and code generation

Constructing Transaction Serialization Order for Incremental. Data Warehouse Refresh. Ming-Ling Lo and Hui-I Hsiao. IBM T. J. Watson Research Center

Space- and Time-Efficient BDD Construction via Working Set Control

Detection and Recognition of Non-Occluded Objects using Signature Map

Direct-Mapped Caches

'* ~rr' _ ~~ f' lee : eel. Series/1 []J 0 [[] "'l... !l]j1. IBM Series/1 FORTRAN IV. I ntrod uction ...

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract

One Against One or One Against All : Which One is Better for Handwriting Recognition with SVMs?

Make your process world

Drawing lines. Naïve line drawing algorithm. drawpixel(x, round(y)); double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx; double y = y0;

NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION. Ken Sauer and Charles A. Bouman

High-level synthesis under I/O Timing and Memory constraints

Acoustic Links. Maximizing Channel Utilization for Underwater

Z8530 Programming Guide

Coprocessors, multi-scale modeling, fluid models and global warming. Chris Hill, MIT

Parallelizing Frequent Web Access Pattern Mining with Partial Enumeration for High Speedup

Fuzzy Meta Node Fuzzy Metagraph and its Cluster Analysis

A Novel Validity Index for Determination of the Optimal Number of Clusters

Approximate logic synthesis for error tolerant applications

C 2 C 3 C 1 M S. f e. e f (3,0) (0,1) (2,0) (-1,1) (1,0) (-1,0) (1,-1) (0,-1) (-2,0) (-3,0) (0,-2)

Boosted Random Forest

Series/1 GA File No i=:: IBM Series/ Battery Backup Unit Description :::5 ~ ~ >-- ffi B~88 ~0 (] II IIIIII

Gray Codes for Reflectable Languages

Cross-layer Resource Allocation on Broadband Power Line Based on Novel QoS-priority Scheduling Function in MAC Layer

Contents Contents...I List of Tables...VIII List of Figures...IX 1. Introduction Information Retrieval... 8

A service-oriented UML profile with formal support

Batch Auditing for Multiclient Data in Multicloud Storage

A {k, n}-secret Sharing Scheme for Color Images

This fact makes it difficult to evaluate the cost function to be minimized

1. Introduction. 2. The Probable Stope Algorithm

IN structured P2P overlay networks, each node and file key

Exploring the Commonality in Feature Modeling Notations

Plumber: a method for a multi-scale decomposition of 3D shapes into tubular primitives and bodies

FOREGROUND OBJECT EXTRACTION USING FUZZY C MEANS WITH BIT-PLANE SLICING AND OPTICAL FLOW

HEXA: Compact Data Structures for Faster Packet Processing

Improved flooding of broadcast messages using extended multipoint relaying

Performance Benchmarks for an Interactive Video-on-Demand System

Installation Guide. Expansion module 1

3-D IMAGE MODELS AND COMPRESSION - SYNTHETIC HYBRID OR NATURAL FIT?

Episode 12: TCP/IP & UbiComp

Recursion examples: Problem 2. (More) Recursion and Lists. Tail recursion. Recursion examples: Problem 2. Recursion examples: Problem 3

Multi-Piece Mold Design Based on Linear Mixed-Integer Program Toward Guaranteed Optimality

Partial Character Decoding for Improved Regular Expression Matching in FPGAs

Define - starting approximation for the parameters (p) - observational data (o) - solution criterion (e.g. number of iterations)

The AMDREL Project in Retrospective

represent = as a finite deimal" either in base 0 or in base. We an imagine that the omputer first omputes the mathematial = then rounds the result to

A Unified Subdivision Scheme for Polygonal Modeling

the data. Structured Principal Component Analysis (SPCA)

Z Combinatorial Filters: Sensor Beams, Obstacles, and Possible Paths

TOWARD HYBRID VARIANT/GENERATIVE PROCESS PLANNING

Graph-Based vs Depth-Based Data Representation for Multiview Images

TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS 1. Preserving Privacy in Distributed Systems

BENDING STIFFNESS AND DYNAMIC CHARACTERISTICS OF A ROTOR WITH SPLINE JOINTS

Chapter 2: Introduction to Maple V

Plot-to-track correlation in A-SMGCS using the target images from a Surface Movement Radar

TLP 350CV Setup Guide

Reading Object Code. A Visible/Z Lesson

The Minimum Redundancy Maximum Relevance Approach to Building Sparse Support Vector Machines

CA Test Data Manager 4.x Implementation Proven Professional Exam (CAT-681) Study Guide Version 1.0

Active Compliant Motion Control for Grinding Robot

Year 11 GCSE Revision - Re-visit work

On the Generation of Multiplexer Circuits for Pass Transistor Logic

Taming Decentralized POMDPs: Towards Efficient Policy Computation for Multiagent Settings

Test Case Generation from UML State Machines

CA Privileged Identity Manager r12.x (CA ControlMinder) Implementation Proven Professional Exam (CAT-480) Study Guide Version 1.5

Definitions Homework. Quine McCluskey Optimal solutions are possible for some large functions Espresso heuristic. Definitions Homework

Wireless Rear Speaker Kit

RAC 2 E: Novel Rendezvous Protocol for Asynchronous Cognitive Radios in Cooperative Environments

Reducing Runtime Complexity of Long-Running Application Services via Dynamic Profiling and Dynamic Bytecode Adaptation for Improved Quality of Service

Introduction to Seismology Spring 2008

Reading Object Code. A Visible/Z Lesson

A Formal Hybrid Analysis Technique for Composite Web Services Verification

A Dual-Hamiltonian-Path-Based Multicasting Strategy for Wormhole-Routed Star Graph Interconnection Networks

The Happy Ending Problem

Transcription:

Outline: Software Design. Goals History of software design ideas Design priniples Design methods Life belt or leg iron? (Budgen) Copyright Nany Leveson, Sept. 1999

A Little History... At first, struggling with programming languages, small programs, math algorithms. Worried about giving instrutions to mahine (effiieny) "Think like a omputer" Found that life yle osts depend far more on how well ommuniates with people than how fast it runs. Separated the two and more emphasis began on How to write software to ommuniate algorithms and struture to humans How to struture design proess itself. Copyright Nany Leveson, Sept. 1999

Strutured Programming Goal: mastering omplexity Dijkstra, Hoare, Wirth: Constrution of orret programs requires that programs be intelletually manageable Key to intelletual manageability is the struture of the program itself. Disiplined use of a few program building bloks failitates orretness arguments. Copyright Nany Leveson, Sept. 1999

Strutured Programming (2) Restrited ontrol strutures Levels of abstration Stepwise refinement Program families Abstrat data types System struture: Programming-in-the-large vs. programming-in-the-small Modularization Minimizing onnetivity Copyright Nany Leveson, Sept. 1999

Restriting Control Strutures Dijkstra: 3 main mental tools Enumerative reasoning Mathematial indution Abstration (e.g., variable, proedure, data type) 1. Restrit programs to onstruts that allow us to use these mental aids. Sequening and alternation (enumeration) Iteration and reursion (indution) Proedures, maros, and programmer-defined data types SESX Small proedures 2. Make program struture fit problem struture. Copyright Nany Leveson, Sept. 1999

Levels of Abstration 1968: Dijkstra paper on his experienes with T.H.E. Multiprograming system Designed using "levels of abstration" System design desribed in layers Higher levels ould use servies of lower levels Lower levels ould not aess higher levels Lowest level implemented first Provided a "virtual mahine" for implementation of next level Proess ontinued until highest level ompleted. A "bottom up" tehnique Copyright Nany Leveson, Sept. 1999

Stepwise Refinement Wirth (1971): "Divide and onquer" A top-down tehnique for deomposing a system from preliminary design speifiation of funtionality into more elementary levels. Program onstrution onsists of sequene of refinement steps. Use a notation natural to problem as long as possible. Refine funtion and data in parallel. Eah refinement step implies design deisions. Should be made expliit. Copyright Nany Leveson, Sept. 1999

Prime Number Program Copyright Nany Leveson, Sept. 1999 begin var table p; fill table p with first 1000 prime numbers print table p end Assumes type "table" and two operators Design deisions made: All primes developed before any printed Always want first 1000 primes Deisions not made: Representation of table Method of alulating primes Print format

Program Families Copyright Nany Leveson, Sept. 1999 Basi premise: Software will inevitably exist in many versions Different servies for slightly different markets Different hardware or software platforms Different resoure tradeoffs (speed vs. spae) Different external events and devies Bug fixes Think of development as a tree rather than a line Never modify a ompleted program Always begin with one of intermediate forms Continue from that point making design deisions Order of deisions important in how far have to bak up. Make early deisions only those that an be shared by all family members Put off deisions as long as possible.

Abstrat Data Types Copyright Nany Leveson, Sept. 1999 Defines a lass of objets ompletely haraterized by operations available on those objets. Really just programmer-defined data type Built-in types work same way Allows extending the type system Pasal, Clu, Alphard, Ada Want language to protet from foolish uses of types (strong typing or automati type onversion) Criteria: 1. Data type definition must inlude definitions of all operations appliable to objets of the type. 2. User of ADT need not know how objets of type are represented in storage 3. User of ADT may manipulate objets only through defined operations and not by diret manipulation of storage representation.

System Struture Copyright Nany Leveson, Sept. 1999 DeRemer and Kron (1976): Struturing a large set of modules to form a system is an essentially distint and different intelletual ativity from that of onstruting the individual modules (programming in the large, MILs) Ativity of produing detailed designs and implementations is programming in the small. Modularization Want to minimize, order, and make expliit the onnetions between modules. Combining modularity with hierarhial abstration turned out to be a very powerful ombination (part-whole and refinement abstrations)

Module Speifiation Copyright Nany Leveson, Sept. 1999 Started to distinguish between design and "pakaging" Design is proess of partitioning a problem and its solution into signifiant piees. Pakaging is proess of lustering piees of a problem solution into omputer load modules that run within system time and spae onstraints without unduly ompromising integrity of original design. Optimization should only be onsidered in pakaging and are should be taken to preserve design struture. Reuse Assumed hundreds of reusable building-blok modules ould be abstrated and added to program libraries. Why didn t happen?

Copyright Nany Leveson, Sept. 1999 Stepwise Refinement vs. Module Speifiation SR: Intermediate steps are programs that are omplete exept for implementation of ertain operators and operands. MS: Intermediate stages are not programs. Instead they are speifiations of externally visible olletive behavior of program groups alled modules. Similarities Preise representation of intermediate stages in program design. Postponement of deisions: Important deisions postponed until late stages or onfined to well-delineated subset of ode.

Copyright Nany Leveson, Sept. 1999 Stepwise Refinement vs. Module Speifiation (2) Differenes Deision Making SR: Deision-making order ritial. May have to baktrak more than really want. Sequening deisions made early beause intermediate reps are programs. MS: May be easier to reverse deisions without repeating so muh work. Sequening deisions made last. Effort SR: Less work than either lassial approah (beause keeps omplexity in ontrol) or MS. MS: Signifiant amount of extra effort beause only works if external harateristis of eah module suffiiently well speified that ode an be written without looking at implementation of other modules. In return, get independent development potential.

Minimizing Connetivity Copyright Nany Leveson, Sept. 1999 Yourdan; Constantine and Myers Cohesion: relationship between funtions a module provides Coupling: relationship between modules, intermodule onnetions Intermodule Frition Smaller modules tend to be interfaed by "larger surfaes" Replaement of module with large interfae auses frition, requiring rewrites in other modules. Uses relationship Primary goal: loality of visibility

Minimizing Connetivity (2) Copyright Nany Leveson, Sept. 1999 Advantages of reduing onnetivity (oupling) Independent development (deisions made loally, do not interfere with orretness of other modules). Corretness proofs easier to derive Potential reusability inreased. Redution in maintenane osts (less likely hanges will propagate to other modules) Comprehensibility (an understand module independent of environment in whih used). Some studies show less error-prone.