Keeping Secrets Within a Family: Rediscovering Parnas H. Conrad Cunningham Computer & Information Science, University of Mississippi Cuihua Zhang Computer.

Slides:



Advertisements
Similar presentations
PROGRAMMING LANGUAGE (JAVA) UNIT 42 BY ROBERT BUTTERFIELD TELEPHONE Data Structures and Algorithms.
Advertisements

Software Design Fundamentals
CSE594 Fall 2009 Jennifer Wong Oct. 14, 2009
Using the Divide & Conquer Strategy to Teach Java Framework Design Conrad Cunningham, Yi Liu University of Mississippi Cuihua Zhang Northwest Vista College.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Database Concepts Lec. 5. What Is a Database? Data are unprocessed raw facts that include text, number, images, audio, and video. Information is processed.
Designing a Flexible Framework for a Table Abstraction H. Conrad Cunningham 1 Yi Liu 2 Jingyi Wang 3 1 University of Mississippi 2 South Dakota State University.
Software Testing and Quality Assurance
What do Computer Scientists and Engineers do? CS101 Regular Lecture, Week 10.
Architecture is More Than Just Meeting Requirements Ron Olaski SE510 Fall 2003.
Designing Software for Ease of Extension and Contraction
Edward Tsai – CS 239 – Spring 2003 Strong Security for Active Networks CS 239 – Network Security Edward Tsai Tuesday, May 13, 2003.
Abstract Data Types (ADT)
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
03 - ParnasCSC4071 A Sketchy Evolution of Software Design 1960s –Structured Programming (“Goto Considered Harmful”, E.W.Dijkstra) Emerged from considerations.
PROGRAMMING LANGUAGES The Study of Programming Languages.
Chapter 10 Architectural Design
COMPUTING FOR BUSINESS AND ECONOMICS-III. Lecture no.6 COURSE INSTRUCTOR- Ms. Tehseen SEMESTER- Summer 2010.
Component Software: A New Software Engineering Course H. Conrad Cunningham, Yi Liu, Pallavi Tadepalli, and Mingxian Fu Software Architecture Research Group.
Designing a Flexible Framework for a Table Abstraction H. Conrad Cunningham 1 Yi Liu 2 Jingyi Wang 3 1 University of Mississippi 2 South Dakota State University.
Systematic Approaches to Literature Reviewing. The Literature Review ? “Literature reviews …… introduce a topic, summarise the main issues and provide.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
Concurrency Programming Chapter 2. The Role of Abstraction Scientific descriptions of the world are based on abstractions. A living animal is a system.
1 The Architectural Design of FRUIT: A Family of Retargetable User Interface Tools Yi Liu, H. Conrad Cunningham and Hui Xiong Computer & Information Science.
Mapping Component Specifications to Enterprise JavaBeans Implementations Yi Liu and H. Conrad Cunningham Software Architecture Research Group Department.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Java in the Box: Implementing the BoxScript Component Language Yi Liu Electrical Engineering and Computer Science South Dakota State University H. Conrad.
On the Criteria to Be Used in Decomposing Systems into Modules Team 3 Nupur Choudhary Aparna Nanjappa Mark Zeits.
SOFTWARE DESIGN.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Key Principles of Software Architecture and Design (I) adapted from Dave Penny’s.
Model-Driven Analysis Frameworks for Embedded Systems George Edwards USC Center for Systems and Software Engineering
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
CSE403 Software Engineering Autumn 2001 Design (Information Hiding) Gary Kimura Lecture #8 October 17, 2001.
A Little Language for Surveys: Constructing an Internal DSL in Ruby H. Conrad Cunningham Computer and Information Science University of Mississippi.
Building a Layered Framework for the Table Abstraction H. Conrad Cunningham Dept. of Computer & Information Science University of Mississippi Jingyi Wang.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
1 The Modular Structure of Complex Systems Presented by: SeyedMasoud Sadjadi and Wei Zhu David L. Parnas, Paul C. Clement, and David M. Weiss ICSE 1984.
Specifying Software Component Frameworks using UML and OCL H. Conrad Cunningham Yi Liu Software Architecture Research Group Dept. of Computer & Information.
Design Concepts By Deepika Chaudhary.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Component 4: Introduction to Information and Computer Science Unit 6a Databases and SQL.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Software Design Process
Abstraction ADTs, Information Hiding and Encapsulation.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Design Methods Instructor: Dr. Jerry Gao. Software Design Methods Design --> as a multistep process in which we design: a) data structureb) program structure.
On the design and development of program families Presented by: M. Deng and J. Zhang 4/15/2002 CSE870 Advanced Software Engineering, Spring 2002.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Designing Abstract Interfaces for Device Independency Designing Abstract Interfaces for Device Independency Review of A Procedure for Designing Abstract.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes.
“Architecture” The outcome of top-level design, reflecting principal design decisions Can (and should) be modified and updated Analogous to architecture.
(1) ICS 313: Programming Language Theory Chapter 11: Abstract Data Types (Data Abstraction)
February 19, February 19, 2016February 19, 2016February 19, 2016 Azusa, CA Sheldon X. Liang Ph. D. Software Engineering in CS at APU Azusa Pacific.
Chapter 2 Principles of Programming and Software Engineering.
Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes.
DESIGN PROCESS AND CONCEPTS. Design process s/w design is an iterative process through which requirements are translated into a “blueprint” for constructing.
Chapter 9 Architectural Design. Why Architecture? The architecture is not the operational software. Rather, it is a representation that enables a software.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
The Software Lifecycle Stuart Faulk. Definition Software Life Cycle: evolution of a software development effort from concept to retirement Life Cycle.
Chapter 0: Introduction
CSE594 Fall 2009 Jennifer Wong Oct. 14, 2009
Model-Driven Analysis Frameworks for Embedded Systems
CSE 403: Notkin #2 of 3 on software change
Software Fundamentals
Chapter 9 Architectural Design.
CSE594 Fall 2009 Jennifer Wong Oct. 14, 2009
Presentation transcript:

Keeping Secrets Within a Family: Rediscovering Parnas H. Conrad Cunningham Computer & Information Science, University of Mississippi Cuihua Zhang Computer & Information Systems, Northwest Vista College Yi Liu Computer & Information Science, University of Mississippi

2 Program Family Set of programs sharing many common properties sharing many common properties worthwhile to study as a group before each individually worthwhile to study as a group before each individually David Parnas: “If you are developing a family of programs, you must do that consciously, or you will incur unnecessary long-term costs.”

3 Our Viewpoint Students should : learn to design program families learn to design program families –also known as software frameworks or product lines be taught appropriate development principles and techniques be taught appropriate development principles and techniques see examples of both good and bad designs see examples of both good and bad designs apply what they are taught on relevant exercises apply what they are taught on relevant exercises Parnas and others articulated many elegant and useful ideas in the 1970’s and 1980’s.

4 How Much Progress? In 1976, Parnas published the seminal article “On the Design and Development of Program Families.” In 1976, Parnas published the seminal article “On the Design and Development of Program Families.” In 2001, Parnas wrote: In 2001, Parnas wrote: “Although there is now growing … interest and some evidence of … success in applying the idea, the majority of industrial programmers seem to ignore it in their rush to produce code.”

5 Parnas Principles Information hiding modules Information hiding modules Abstract interfaces Abstract interfaces Program families Program families

6 Parnas Principle: Information-Hiding Modules Module Work assignment given to a programmer or group of programmers Work assignment given to a programmer or group of programmers Information hiding Design modules around assumptions that are likely to change Design modules around assumptions that are likely to change Hide a design decision within a module Hide a design decision within a module –as its secret

7 Table Framework Example Table ADT collection of records collection of records –each a finite sequence of data fields –key field value uniquely identifies record within collection Operations Operations –insert –delete –retrieve –etc. key1data1 key2data2 key3data3 key4data4

8 Table Framework Requirements Provide Table ADT functionality (in Java) Provide Table ADT functionality (in Java) Support large domain of client-definable records and keys Support large domain of client-definable records and keys Enable many possible implementations of Table ADT Enable many possible implementations of Table ADT Separate key-based record access mechanisms from storage mechanisms Separate key-based record access mechanisms from storage mechanisms

9 Table Framework Modules Table Access Table Access –enables key-based access to records Secret: set of data structures and algorithms used in accessing records Record Storage Record Storage –manages physical storage Secret: detailed nature of storage medium Client Record Client Record –provides key and record data types Secret: structure of the client’s record

10 Teaching Perspective: Information Hiding What Parnas says: “consider it the most important and basic software design principle” “consider it the most important and basic software design principle” “mentioned in very many textbooks, but it is treated in a very shallow manner” “mentioned in very many textbooks, but it is treated in a very shallow manner” “can be explained in 40 minutes” “can be explained in 40 minutes” “takes at least a semester of practice to learn how to use” “takes at least a semester of practice to learn how to use” Thus explain thoroughly, give illustrative examples, assign meaningful exercises, and evaluate student work rigorously

11 Parnas Principle: Abstract Interfaces Interface set of assumptions a programmer needs to make about another program to demonstrate correctness of his program set of assumptions a programmer needs to make about another program to demonstrate correctness of his program Abstract Interface module interface that does not change when one module implementation is substituted for another module interface that does not change when one module implementation is substituted for another

12 Abstract Interface Design Parnas two-phase approach List assumptions common to all implementations of the module—in precise English List assumptions common to all implementations of the module—in precise English Give specific operations and describe syntax and semantics of each operation—in programming notation Give specific operations and describe syntax and semantics of each operation—in programming notation

13 Table Framework Design: Client Record Module Interface Assumption list 1. Records are objects from which the keys can be extracted and compared using a total ordering. 2. As needed, records can be converted to and from a sequence of bytes. It is possible to determine the number of bytes in the record.

14 Table Framework Design: Client Record Module Interface Programming interface interface Comparable to represent totally ordered keys interface Comparable to represent totally ordered keys int compareTo(Object key)  from Java API interface Keyed to represent records for table access interface Keyed to represent records for table access Comparable getKey() interface Record to represent storable records interface Record to represent storable records void writeRecord(DataOutput) void readRecord(DataInput) int getLength()

15 Teaching Perspective: Abstract Interfaces Concept not difficult to introduce, but takes much practice to learn to use well Concept not difficult to introduce, but takes much practice to learn to use well –use case studies to illustrate –give design guidelines –assign relevant exercises –evaluate student designs rigorously Little-used two-phase procedure is good approach for education Little-used two-phase procedure is good approach for education –no new notations or technologies to learn –students consider explicit assumptions about module in design of programming interface

16 Parnas Principle: Program Families Set of programs sharing many common properties sharing many common properties worthwhile to study as a group before each individually worthwhile to study as a group before each individually Specification approach Identify “design decisions which cannot be common properties of the family” Identify “design decisions which cannot be common properties of the family” Hide each decision as the secret of a module Hide each decision as the secret of a module Define an abstract interface suitable for all likely variants of module Define an abstract interface suitable for all likely variants of module

17 Table Framework Design Table Access module implementations –Simple in-memory index –Hashed index Record Storage module implementations –In-memory array –Random-access file on disk Challenge –Design of abstract interface for Record Storage with sufficient capability for Table Access but realizable on multiple media

18 Teaching Perspective: Program Families Give strong foundation in design of information- hiding modules with abstract interfaces Give strong foundation in design of information- hiding modules with abstract interfaces –build on capabilities of OOP language Teach to recognize and define scope of possible families Teach to recognize and define scope of possible families Introduce techniques for commonality/variability analysis of families Introduce techniques for commonality/variability analysis of families Start by using software frameworks Start by using software frameworks –hotspot analysis and systematic generalization techniques

19 Conclusion Students should learn to design program families Students should learn to design program families Design principles publicized by Parnas 30 years ago are still valuable Design principles publicized by Parnas 30 years ago are still valuable Good software design is hard work requiring understanding and practice Good software design is hard work requiring understanding and practice The approach to design of software families can be stated as keeping secrets within a family The approach to design of software families can be stated as keeping secrets within a family

20 References: Information-Hiding D. L. Parnas. “On the Criteria to Be Used in Decomposing Systems into Modules,” Communications of the ACM, Vol. 15, No.12, pp , D. L. Parnas. “On the Criteria to Be Used in Decomposing Systems into Modules,” Communications of the ACM, Vol. 15, No.12, pp , 1972.

21 References: Abstract Interfaces K. H. Britton, R. A. Parker, and D. L. Parnas. “A Procedure for Designing Abstract Interfaces for Device Interface Modules,” In Proceedings of the 5 th International Conference on Software Engineering, pp , March K. H. Britton, R. A. Parker, and D. L. Parnas. “A Procedure for Designing Abstract Interfaces for Device Interface Modules,” In Proceedings of the 5 th International Conference on Software Engineering, pp , March 1981.

22 References: Program Families D. L. Parnas. “On the Design and Development of Program Families,” IEEE Transactions on Software Engineering, Vol. SE-2, No. 1, pp. 1-9, March D. L. Parnas. “On the Design and Development of Program Families,” IEEE Transactions on Software Engineering, Vol. SE-2, No. 1, pp. 1-9, March 1976.

23 Acknowledgements Acxiom Corporation grant: Acxiom Corporation grant: –The Acxiom Laboratory for Software Architecture and Component Engineering (ALSACE). Students in ENGR 660 Software Engineering class in Fall 2003 Students in ENGR 660 Software Engineering class in Fall 2003