Extending an Object-Oriented Design Method

Extending an Object-Oriented Design Method

EXTENDING AN OBJECT-ORIENTED DESIGN METHOD: A C++ EXTENSION FOR IDEF4 A Thesis by LI- TSUNG HSIEH Submitted to Texas A&M University in pardal fulfillment of the requirements for the degree of MASTER OF SCIENCE Approved as to style and content by: z' / Ric ard J. Mayer (Chair of Committee) / / / Chuan-Jun Su y 'th (Member)g' em William . Lively Way Kuo (Member) (Head of Department) May 1994 Major Subject: Industrial Engineering Extending an Object-ariented Design Method: a C++ Extension for IDEF4. (May 1994) Li-Tsung Hsieh, B.S. , Tunghai University Chair of Advisory Comminee: Dr. Richard J. Mayer This research introduces an object-oriented implementation design method- IDEF4/C++. IDEF4/C++ is an extension of the IDEF4 object-oriented design method that incorporates C++ language considerations and practice to provide guidance and structure to ease the transition from an IDEF4 conceptual design to its implementation in C++. To guide the development of IDEF4/C++, three IDEF5 ontological models are built: (I) an ontology of general object-oriented concepts; (2) an ontology of the IDEF4 method concepts; and (3) an ontology of the C++ programming language. Together these ontologies form the conceptual foundation of this research effort. They also provide a formal platform for understanding the mappings between the terminology and primitive concepts in these domains. Extensions included in the IDEF4/C++ are: (I) an extended method syntax; (2) a transformation heuristic for transforming an IDEF4 conceptual design to an IDEF4/C++ implementation specification; (3) an IDEF3 model of the IDEF4/C++ design process with design evolution configuration managemenr, and (4) best practice guidelines for the application of lDEF4/C++, especiall focusing on design reuse. The thesis concludes with a discussion of an integrated framework for object-oriented system development. Without increasing the complexity of the IDEF4 method, IDEF4/C++ takes advantage of C++ language features and best practice experience to bridge the gap between the conceptual design phase and the implementation phase in a software development project. @@SI8lQR $4%42. To my Mom, Mrs. Su-Xue Hsieh. ACKNOWLEDGMENTS Sincere thanks goes to Dr. Richard J. Mayer, my advisor. Without whose intensive guidance and limitless patience, this research would not be possible. I thank him for bringing me into the wonderfid world of system engineering and, he if anyone, is the IDEF4/C++ method's godfather. I also wish to express my appreciation to Dr. Chuan- Jun Su for his valuable suggestions on my work in the Knowledge Based Systems Laboratory. I also wish to thank Dr. Jeffrey S. Smith and Dr. William M. Lively, the other members of my committee, for their suggested clarlfications and constructive comments which make this thesis a more complete document. This thesis also owes much to many friends. Much credit goes to the other members of the IDEF4/C++ development team, David Browne, Sue Wells, and Jim. Together we conquered this challenge and I am deeply grateful for their contributions. Special thanks goes to David for his intelligent ideas and incredible knowledge in C++. I also would like to express my appreciation to Dr. Paula S. deWitte at the Knowledge Based Systems, Inc. for her moral and financial support of this research. I am also grateful to my friends in the KBS lab. Thanks goes to Sun, Wu, CFD, Su, Eddie, Joe, and Mark. Those "day and night" discussions with them have been invaluable in my study. Special thanks to Jyh and Jack for whose precious time and generous input to both my academic study and personal growth. Finally, I would like to express gratitude to Jake Stockton. I am indebted to Jake for his patient navigation through the English language and constant encouragement during my study-life overseas. TABLE OF CONTENTS ACKNOWLEDG~ . TABLE OF CONTENTS .. LIST OF TABLES.. LIST OF FIGURES CHAPTER I INTRODUCTION . 1.1 Introduction. 1 1.2 Motivation. .. .. .. 2 1.3 Research Goal and Objectives. .. 7 1.4 Organization of the Thesis. 7 II BACKGROUND .. 2. 1 Literature Review. 9 2. 2 Domain Ontologies. .. 11 2.2. 1 Ontology of General Object-oriented Concepts .. .. 1 2 2.2. 2 Ontology of the IDEF4 Method Concepts .. .. 16 2.2. 3 Ontology of the C++ Programming Language .. .. 19 III METHOD CONCEPTS .. 23 3. 1 Introduction. 23 3.2 Classes. 24 3.2. 1 Classes vs. Types .. .. .. 24 3.2. 2 Classes vs. Objects. 25 3.2. 3 Class Box .. 26 3.2. 4 Class Inheritance. 27 3.3 Features .. .. 3 1 3.3. 1 Taxonomy of Features. 32 3.3. 2 Inheritance of Features. 33 3.3. 3 Presence of Features 34 3.3. 4 Type of Features . 36 3.4 Methods. 37 3.4. 1 Methods, Contracts, and Method Sets .. .. 38 3.4. 2 Taxonomy of Method Sets. 39 3.5 Constraints . 42 IV METHOD S YNTAX 4. 1 Organization of IDEF4/C++ Diagrams. .. 4.2 Class Lattice Diagrams. 47 TABLE OF CONTENTS (CONTINUED) CH|~R Page 4.3 Class Inheritance Diagrams 50 4.3. 1 Extended Class Box Syntax. .. „. .. , .. .. 50 4.3. 2 Public, Protected, and Private Inheritance Links. .. .. 52 4.3. 3 Virtual Inheritance. .. 53 4.3. 4 Feanne Symbols and Their Extensions. .. .. 55 4.3. 5 Inheritance Diagrmns. 4.3. 6 Class Invariant Data Sheets .. 63 4.4 Method Taxonomy Diagrams. 67 4.5 Type Diagrams. , 71 4.6 Friend Diagrams. 78 4.7 Template Diagrams. .. .. 80 4.8 Client Diagrams .. 81 4.9 Instantiation Diagrams. 84 4. 10 Dispatch Mapping, . 86 V METHOD PROCEDURE . 88 5. 1 Introduction. .. 88 5.2 Transformation from Generic IDEF4 to IDEF4/C++. .. 89 5.3 IDEF4/C++ Design Development Activities .. .. 92 5.4 IDEF4/C++ Design Development Process with Multiple Developers . 95 VI METHOD USES. 6. 1 Introduction. .. 104 6. 1, 1 Inheritance vs. Aggregation. .. 104 6. 1.2 Broadening the Design Scope . 106 6.2 Inheritance and Feature Access Control .. .. 107 6.2. 1 Protected Feature Access Control .. .. 108 6.2. 2 Private Inheritance and Access Specifier. .. .. 109 6.2. 3 Public Inheritance and Feature Access Control .. .. 112 6.3 Constructors and Destructors. 113 6.3. 1 Protected Constructors. 114 6.3. 2 Passing Parameters to Base Constructors .. .. 115 6.3. 3 Virtual Destructors. .. 116 6.4 Pure Virtual Functions and Abstract Base Classes .. 1 17 6.5 Designing Dynamic Polymorphism in IDEF4/C++. .. 1 1 8 6.6 Implementation for Conflicting and Non-conflicting Features .. 124 6.7 Features with Multiple Return Types .. 1 26 6.8 Avoiding Redundancy in Multiple Inheritance. .. 1 29 6.9 Design with Reuse .. 1 34 6.9. 1 Abstract Base Class and Pure Virtual Functions .. .. 1 35 6.9. 2 Private Inheritance and Forwarding. .. .. 1 36 6.9. 3 Aggregation with Forwarding. .. .. 1 3 8 6.9. 4 Delegation .. .. .. 140 6.9. 5 Rules of Thumb for Design with Reuse. .. .. .. .. 1 45 VII CONCLUSION AND FUTURE EXTENSIONS. .. .. 147 TABLE OF CONTENTS (CONTINUED) Page 7. 1 Conclusion . 147 7, 2 Future Extensions. .. 148 REFERENCES . 152 APPENDIX A. 155 VITA .161 LIST OF TABLES Table 3-1. Presence of the Feanue Pay in the EmPloyee Class Hierarchy, .. 36 Table 5-1. Transformation fmm IDEF4 to IDEF4/C++. .. 90 LIST OF FIGURES Page Figure 1-1. CLOS and C++ Code Examples of Name Conflicts. .. , .. 3 Figure 1-2. Different Name Conflict Resolutions of CLOS and C++. .. , .. , .. 5 Figure 2-1. Design Refinement and Implementation Refinement: P-Correct and S-Correct. 10 Figure 3-1. Class Box in IDEF4. 27 Figure 3-2. Representation for Class Inheritance in IDEF4. .. 28 Figure 3-3, Partial Inheritance Diagram for an Employee Class. .. 30 Figure 3-4. Feature Taxonomy Hierarchy 32 Figure 3-5. Inheritance of Features. 33 Figure 3-6. Redefining Inherited Features in Class Inheritance. .. , .. 34 Figure 3-7. Classification of the Presence of Features. .. .. ., .. .. .. .. 35 Figure 3-8. A Partial Type Diagram Defining Types of Feamres. .. .. 37 Figure 3-9. Print Method Taxonomy and Associated Routines. .. .. .. 41 Figure 4-1. Organization of IDEF4/C++ Diagrams. 46 Figure 4-2. Example Class Lattice Diagram for an Employee Management System. , 48 Figure 4-3. Example C++ Code for the Class Project. .49 Figure 4-4. Extended Class Box Syntax. 51 Figure 4-5. Inheritance of a Base Class and a Derived Class. .. , .. .. .. 5 1 Figure 4-6. Comparison of Public, Protected, and Private Inheritances. .. .. 53 Figure 4-7. Virtual Inheritance in IDEF4/C++. 55 Figure 4-8. Example of Feature Symbols. 56 Figure 4-9. Example of a Redefined Feature with New Contract. .. .. .. .. .. 57 Figure 4-10. Example of Extended Feature Symbols. Figure 4-11. A Partial Inheritance Diagram of Employee Management System. .. 62 Figure 4-12. The Programmer Class. Figure 4-13. Class-invariant Data Sheet for Class Pmgrammer. .. .. .. 66 Figure 4-14. Contract Data Sheet. 68 Figure 4-15. Work pay Method Taxonomy Diagram with Dispatching Mapping. 69 Figure 4-16. Employee Inheritance Diagram with Dispatch Mapping. .. .. .. .. .. 70 Figure 4-17. Single-valued Type Link 72 LIST OF FIGURES (CONTINUED) Page Figure 4-18. Multi-valued Type Link. 72 Figure 4-19. Single-valued Inverse Type Link. .. 73 Figure 4-20. Partial Inverse Type Link. 74 Figure 4-21. Textual Notation for Feature Return Types. .. 76 Figure 4-22. An Example Type Diagram for the Employee Management System. .. 77 Figure 4-23. A Friend Diagram and C++ Code Example for Class Worker. .. , .. 79 Figure 4-24. A Template Diagram and C++ Code Example for Class Template Array. 81 Figure 4-25. Client Diagram for Show-project-information of Class Project- Manager. 82 Figure 4-26. C++ Code Example for Show-project-information. .. 83 Figure 4-27. An Instance Box - John. 84 Figure 4-28. Example Instantiation Diagrams.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    173 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us