Copyright Nancy Leveson, Sept. 1999 1980S: oo design: added inheritance, multiple inheritance, and polymorphism to ADT In process added complexity and increased some types of connectivity Lots of claimed advantages -- so far empirical evaluation is not supporting them well 1990s: Architecture Patterns Frameworks Kits etc
c Copyright Nancy Leveson, Sept. 1999 1980s: OO design: added inheritance, multiple inheritance, and polymorphism to ADT. In process added complexity and increased some types of connectivity. Lots of claimed advantages -- so far empirical evaluation is not supporting them well. 1990s: Architecture Patterns Frameworks Kits etc. �
Copyright Nancy Leveson, Sept 1999 Software Design Principles Design is a creative, problem-solving activity No recipe for doing it- always need some type of"magic Quality and expertise of designers is determinant for success Simon An expert has over 50,000 chunks of domain knowledge at hand Solving a problem involves mapping into knowledge available The larger this knowledge and the more accessible, the more successful the process will be
Copyright Nancy Leveson, Sept. 1999 Software Design Principles c Design is a creative, problem-solving activity. No recipe for doing it - always need some type of "magic". Quality and expertise of designers is determinant for success. Simon: An expert has over 50,000 chunks of domain knowledge at hand. Solving a problem involves mapping into knowledge available. The larger this knowledge and the more accessible, the more successful the process will be. �
Software Design Principles(2 Brooks, Curtis: Successful software development often depends on small number of exceptional designers who think on a system level Curtis: Such people might not be particularly good programmers Design problem: How to decompose system into parts each with a lower complexity than system as a whole while minimizing interaction between the parts such that the parts together solve the problem No universal way of doing this
c Copyright Nancy Leveson, Sept. 1999 Software Design Principles (2) Brooks, Curtis: Successful software development often depends on small number of exceptional designers who "think on a system level." Curtis: Such people might not be particularly good programmers. Design problem: How to decompose system into parts each with a lower complexity than system as a whole while minimizing interaction between the parts such that the parts together solve the problem. No universal way of doing this. �
Four Primary Design Principles Separation of concerns Deal with separate aspects of a problem separate 2. Abstraction Identify important aspects of a phenomenon and ignore details that are irrelevant at this stage Hierarchical abstraction build hierarchical layers of abstraction Procedural (functional)abstraction · Data abstraction Control abstraction(abstract from precise sequence of events handled, e.g., nondeterminacy)
Copyright Nancy Leveson, Sept. 1999 Four Primary Design Principles 1. Separation of concerns c Deal with separate aspects of a problem separate. 2. Abstraction Identify important aspects of a phenomenon and ignore details that are irrelevant at this stage. Hierarchical abstraction: build hierarchical layers of abstraction Procedural (functional) abstraction Data abstraction Control abstraction (abstract from precise sequence of events handled, e.g., nondeterminacy) �
Nancy Leveson, Sept 1999 Four Primary Design Principles(2 3. Simplicity Emphasis on software that is clear, simple, and therefore easy to check, understand, and modify 4. Restricted visibility Locality of information
c Copyright Nancy Leveson, Sept. 1999 Four Primary Design Principles (2) 3. Simplicity Emphasis on software that is clear, simple, and therefore easy to check, understand, and modify. 4. Restricted visibility Locality of information �
General Software Design Concepts Implementations of the general principles · Decomposition Can decompose with respect to time order, data flow logical groupings, access to a common resource control flow or some other criterion Functional decomposition seems to be a natural way for people to solve problems as evidenced by its wide use Top-down decomposition: start at high levels of abstraction and progress to levels of greater and greater detail Bottom-up: form and layer groups of instruction sequences until work way up to a complete solution
Copyright Nancy Leveson, Sept. 1999 General Software Design Concepts Implementations of the general principles Decomposition Can decompose with respect to time order, data flow, logical groupings, access to a common resource, control flow, or some other criterion. Functional decomposition seems to be a natural way for people to solve problems as evidenced by its wide use. Top-down decomposition: start at high levels of abstraction and progress to levels of greater and greater detail. c Bottom-up: form and layer groups of instruction sequences until work way up to a complete solution. �
Copyright Nancy Leveson, Sept 1999 General Software Design Concepts(2 Decomposition(cont) Iterative decision making process List difficult decisions and decisions likely to change Design a module specification to hide each such decision Break module into further design decisions Continue refining until all design decisions hidden in a module Program Families: design for flexibility, not generality
Copyright Nancy Leveson, Sept. 1999 General Software Design Concepts (2) Decomposition (con’t.) Iterative decision making process: List difficult decisions and decisions likely to change Design a module specification to hide each such decision Break module into further design decisions. Continue refining until all design decisions hidden in a module Program Families: design for flexibility, not generality � c
General Software Design Concepts( 3) · Virtua| Machines A module provides a virtual machine: a set of operations that can be invoked in a variety of ways and orders to accomplish a variety of tasks Don't think of systems in terms of components that correspond to steps in processing Do provide a set of virtual machines that are useful for writing many programs Information hiding Each design unit hides internal details of processing activities Design units communicate only through well-defined interfaces Each design unit specified by as little information as possible If internal details change, client units should need no change
Copyright Nancy Leveson, Sept. 1999 General Software Design Concepts (3) c Virtual Machines A module provides a virtual machine: a set of operations that can be invoked in a variety of ways and orders to accomplish a variety of tasks. Don’t think of systems in terms of components that correspond to steps in processing. Do provide a set of virtual machines that are useful for writing many programs. Information Hiding Each design unit hides internal details of processing activities. Design units communicate only through well-defined interfaces. Each design unit specified by as little information as possible If internal details change, client units should need no change �
General Software Design Concepts(4) Modularity Separation of concerns 1. Deal with details of each module in isolation(ignoring details of other modules) 2. Deal with overall characteristics of all modules and their relationships in order to integrate them into a coherent system Base on hierarchy and abstraction Abstraction handled through information hiding Hierarchy by defining uses and is-composed-of relations Minimize connectivity
c Copyright Nancy Leveson, Sept. 1999 General Software Design Concepts (4) Modularity Separation of concerns: 1. Deal with details of each module in isolation (ignoring details of other modules) 2. Deal with overall characteristics of all modules and their relationships in order to integrate them into a coherent system. Base on hierarchy and abstraction: Abstraction handled through information hiding Hierarchy by defining uses and is-composed-of relations Minimize connectivity �
Copyright Nancy Leveson, Sept 1999 General Software Design Concepts(5) ° Modularity(cont) Sample things to modularize and encapsulate abstract data types algorithms(e.g, sort input and output formats processing sequence machine dependencies(e. g, character codes policies(e.g, when and how to do garbage collection external interfaces(hardware and software) Benefits Allows understanding each part of a system separately Aids in modifying system May confine search for a malfunction to a single module
c Copyright Nancy Leveson, Sept. 1999 General Software Design Concepts (5) Modularity (con’t.) Sample things to modularize and encapsulate: abstract data types algorithms (e.g., sort) input and output formats processing sequence machine dependencies (e.g., character codes) policies (e.g., when and how to do garbage collection) external interfaces (hardware and software) Benefits: Allows understanding each part of a system separately Aids in modifying system May confine search for a malfunction to a single module. ���