Active Object Systems Redacted for Privacy Abstract Approved
Total Page:16
File Type:pdf, Size:1020Kb
AN ABSTRACT OF THE THESIS OF Sungwoon Choi for the degree of Doctor of Philosophyin Computer Science presented on February 6, 1992. Title: Active Object Systems Redacted for Privacy Abstract approved. v '" Toshimi Minoura An active object system isa transition-based object-oriented system suitable for the design of various concurrentsystems. An AOS consists of a collection of interacting objects, where the behavior of eachobject is determined by the transition statements provided in the class of that object.A transition statement is a condition-action pair, an equational assignmentstatement, or an event routine. The transition statements provided for eachobject can access, besides the state of that object, the states of the other objectsknown to it through its interface variables. Interface variablesare bound to objects when objects are instantiated so that desired connections among objects are established. The major benefit of the AOS approach is thatan active system can be hierarchically composed from its active software componentsas if it were a hardware system. An AOS provides better encapsulation andmore flexible communication protocols than ordinary object oriented systems, since control withinan AOS is localized. ©Copyright by Sungwoon Choi February 6, 1992 All Rights Reserved Active Object Systems by Sungwoon Choi A THESIS submitted to Oregon State University in partial fulfillment of the requirements for the degree of Doctor of Philosophy Completed February 6, 1992 Commencement June 1992 APPROVED: Redacted for Privacy Professor of Computer Science in charge ofmajor Redacted for Privacy Head of Department of Computer Science Redacted for Privacy Dean of Gradu to School Or Date thesis presented February 6, 1992 Typed by Sungwoon Choi for Sungwoon Choi To my wife Yejung ACKNOWLEDGEMENTS I would like to express my sincere gratitude tomy major professor, Dr. Toshimi Minoura, who was a constantsource of ideas and encouragement through the research. I would also like to thank other members inmy Ph.D. committee, Dr. Timothy Budd, Dr. Bella Bose, Dr. Bruce D'Ambrosio,Dr. Walter Rudd, and Dr. Albert Stetz for their helpful comments, encouragement andhonest criticism. Most of all I wish to expressmy gratitude to my parents, for their emotional support and encouragement. Finally, I would like to thankmy wife Yejung. Without her patience, under- standing, and personal sacrifice,none of this would have been possible. Table of Contents 1 Introduction 1 1.1 Overview 1 1.1.1 Role of Abstraction 1 1.1.2Object Oriented Approach 2 1.1.3 Active Object Systems 4 1.2 Related Work 7 1.2.1 Object-Oriented Concurrent Systems 7 1.2.2AI Systems 9 1.2.3Structural Composition 10 1.2.4User Interface Systems 11 1.3Research Goals and Results 12 1.4Thesis Plan 13 2 Active Object System 15 2.1Overview 15 2.2Simple Queuing System 16 2.3AOS Features 21 2.3.1 Structural Composition 22 2.3.2Behavior Description 23 2.3.3Examples 25 3 User Interface System Basedon Active Objects 29 3.1 Overview 29 3.2 Simple Examples 30 3.2.1 Labeled Push-Button 30 3.2.2 Button Group 32 3.3 AOUIMS Features 34 3.3.1 Composition of AUTO 35 3.3.2 Behavior Description 36 3.3.3Multiple views 39 4 Implementation Issues 44 4.1 AOS Runtime Environment 44 4.1.1 Event Scheduling 44 4.1.2 Trigger Setup 47 4.2 Translation Issues 52 4.2.1 Transition Rules 52 4.2.2 Always Statements 57 4.2.3Event Routines 57 4.2.4 With Clauses 64 4.2.5 Initialization Order 64 4.3 AOUIMS Implementation Issues 65 4.3.1 Classes 65 4.3.2 Class UlObject 67 4.3.3Top level 74 4.3.4Monitor 74 4.3.5Control Variables 74 4.3.6 Converting X Events to AOS Events 80 5 Additional Examples 83 5.1Manufacturing Line Simulation 83 5.1.1 Manufacturing Line 84 5.1.2Job-Flow Model 85 5.1.3 Process Model 86 5.2Flow-Line Manufacturing 89 5.3Flexible Manufacturing 95 6 Comparisons 104 6.1 Manufacturing Control System 104 6.2Production Systems 106 6.3Object-Oriented Systems 109 6.4Hybrid Systems 110 6.5AOS 114 7 Conclusions and Future Research 119 Bibliography 122 Appendices 127 A AOS Runtime Library 127 A.1 aos.h 127 A.2 aos.cc 129 B AOUIMS Classes 133 B.1 uims.h 133 B.2 uims.cc 138 List of Figures Figure Page 1. Queuing system with 2processors and 3 queues 16 2. Queuing system main. 17 3. Timer. 17 4. Job. 18 5. Generator. 18 6. Queue. 19 7. Processor. 20 8. Component hierarchy of the queuing system given in Section 2 2 22 9. Button Group. 25 10.Classes Graphical Object and Button 26 11.Button group A. 26 12.Button group B. 27 13.Button group C. 28 14.Labeled Push-Button. 30 15.Class UlObject 31 16.Class Button. 31 17.Class PushButton. 32 18.Button Group. 33 Figure Page 19.Class RadioButton 33 20.Class ButtonGroupA. 34 21.Component Hierarchy of the Button Group. 35 22.Class ButtonGroupB 38 23.Multiple Views 39 24.Class Multiple Views 40 25.Class Bar Chart 40 26.Class Filled Rectangle. 41 27.Class Pie Chart. 42 28.Class Text. 42 29.Triggers and transitions. 45 30. AOS runtime environment. 46 31.Trigger lists and path lists 49 32.A change of a dynamic path pointer value 50 33. Changing a dynamic path pointer value. 50 34.The methods addElements and removeElements. 51 35.Syntax of a transition rule 52 36.Class Int. 54 37.C++ translation of class Queue in Queuing example 55 38.C++ translation of class Processor in Queuing example. 56 39.C++ translation of class Bar Chart in multiple view example 58 40.C++ translation of class Multiple Views in multipleview ex- ample 59 41.Syntax of an event routine. 59 42.Message handler classes. 60 43.C++ translation of class Button Group 61 44.AOS class Button. 62 45.C++ translation of class Button. 63 Figure Page 46.Initialization order 65 47.C++ translation of queuing system main. 66 48.AOUIMS class hierarchy 67 49.Class UlObject (Part 1 of 3). 68 50.Function insert 69 51.Class UlObject (Part 2 of 3). 71 52.Class UlObject (Part 3 of 3). 72 53. Function ifSelected 72 54. Additional behavior definition in class Radio Button. 73 55.Initialization order of AUIOs. 73 56. Class Top level (part 1 of 2). 75 57. Class Top level (part 2 of 2). 76 58.Class Monitor. 77 59.Component hierarchy. 77 60.Integrated event handling routine 81 61.A manufacturing line. 84 62.Main program. 85 63.A Petri net-based sequence controller. 87 64.AOS main program for the manufacturing line. 88 65.A manufacturing line. 89 66. Classes for flow-line manufacturing. 90 67.Main program for flow-type manufacturing. 91 68.Class Job. 91 69.Class Stage. 92 70. Class Mover. 92 71.Class MoverA. 93 72.Class MoverB. 94 73. A flexible manufacturing system. 95 Figure Page 74.Jobsteps. 96 75.Timelines. 96 76.Jobstep schedule. 97 77. FMS Classes. 97 78.FMS main program. 98 79.Class Job. 98 80.Class Jobstep. 99 81.Class AGV (part 1 of 2) 100 82.Class AGV (part 2 of 2) 101 83. Class AGVJobstep 102 84.System state. 103 85.Manufacturing Control System. 105 86.OPS5 for Manufacturing Control System. 107 87.Class Hierarchy for Manufacturing Control System. 109 88. C++ Main Control Flow for Manufacturing Control System. 110 89.LOOPS for BitAmplifier. 112 90.AOS for Bit Amplifier. 113 91.AOS for manufacturing control system 115 92. AOS main program for the manufacturing system. 116 List of Tables Table Page 1. Active Object and Active Value 111 2. Comparisons 118 Active Object Systems Chapter 1 Introduction This chapter gives an overview of the researchon active object systems (AOSs), explains related work, and describes the thesis plan. 1.1Overview We first discuss the role of abstraction in programming languages and refer to object-oriented programming as the best known approach to support abstraction. We then describe the objectives of active object systems, comparing them with those of ordinary object-oriented systems. 1.1.1Role of Abstraction The concept of abstraction is one of the major themes in designing computerpro- gramming environments. By considering programming in terms of abstract entities and their behaviors, apart from memory locations and operation code,one can get more productivity and maintainability in software development. 2 When symbolic names andmacros were introduced to assembly languages, sig- nificant improvements in readability and modifiabilityof programs were achieved. The first high level languages,e.g., FORTRAN, COBOL, and ALGOL 60, pro- vided another level of abstraction, includingprocedures and structured data types such as arrays and records. These featureswere useful in supporting structured programming. Starting with SIMULA 67, several programminglanguages tried to provide a facility for defining abstract data types. An abstractdata type is a user defined data type that providesa set of services to its user, encapsulating its internal data structure and operational details. 1.1.2Object Oriented Approach The object-oriented approach introduceda new way of designing and program- ming a software system and is believedto be the best known approach tocope with the complexity of a software system [BIRT73,BUDD91, GOLD80, MEYE88, STR0861. Objects In an object-oriented design,a physical or abstract reality to be modeled bya soft- ware system is understood in terms of interacting objects, whichare abstractions of real entities. An object-oriented softwaresystem is constructed as a collection of software objects that closely model real-worldobjects. A software object isper- ceived as a coherent unit possessing itsown identity, state, and behavior.