Patent Publication Number: US-6216149-B1

Title: Method and system for efficient control of the execution of actions in an object oriented program

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     The present application is related to U.S. patent application Ser. No. 05/175,999, now abandoned in favor of U.S. patent application Ser. No. 08/402,408, filed Mar. 10, 1995, entitled “A Computer System for Executing Action Slots Including Multiple Action Object Classes,” further identified by U.S. patent application Ser. No. 08/175,465, entitled “A System for Processing an Application Program Including Application Objects,” further identified by U.S. patent application Ser. No. 08/176,000, now abandoned in favor of U.S. Patent Application Ser. No. 08/396,368, filed Feb. 25, 1995, entitled “A System for Processing Application Programs Including a Language Independent Context Management Technique,” further identified by filed of even date herewith by the inventors hereof and assigned to the assignee herein, and incorporated by reference herein. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Technical Field 
     The present invention relates to data processing systems, and more particularly to data processing systems employing object oriented programming to construct programs for execution on a data processing system. 
     2. Description of the Related Art 
     Object oriented programming systems provide means for creation and reuse of objects for the purpose of program generation, database management, graphical user interface generation and similar applications. To make most efficient use of object oriented programming, a variety of tools or utilities are required to overcome deficiencies in programming language and operating systems. More particularly, in the design and implementation of application program frameworks, there is a need to create object libraries and to extend well-known programming languages such as the C language to have object oriented capabilities. Further, applications should be designed and implemented so that they may be operating system independent and be able to be run on multiple diverse operating system platforms such as OS/2, AIX, UNIX or Windows. A reference text book which provides a description of Object Oriented Systems, including terminology and structure, is  Object-Oriented Analysis and Design with Applications,  second edition, by Grady Booch, published by Benjamin/Cummings Publishing Co., Inc. 1993. Reference to this text may be made for definition of terms related to Object-Oriented Systems. 
     In the prior art, there have been many articles published relating to object oriented programming and several patents which describe implementations of inventions related to object oriented programming where the patents deal primarily with database or file system management in a computer system. 
     U.S. Pat. No. 4,953,080 is an example of an object oriented system for file system management in a computer. The file system includes a plurality of application programs, a plurality of data files, a plurality of class data structures, and a plurality of object data structures. Each class data structure includes a reference to an application program within the plurality of application programs. Each object data structure includes a reference to a class data structure from the plurality of class data structures and a reference to at least one data file from the plurality of data files. The use of object data structures adds a layer between a user of the computer and data files. This allows for the computer to refer to an object data structure and associated access files using a tag which is inaccessible to the user. The user refers to an object based on the physical location of the object on the screen. The user may also give the object data structure a name, which is totally unconnected to the value of the tag. This allows a user to, for instance, give two objects in the same directory, the same name. Further, the file system includes a plurality of link data structures, each link data structure including a reference to a first object data structure in the plurality of object data structures which serves a parent object off the link, and including a reference to a second object data structure in the plurality of object data structures which serves as a child object of the link. 
     Although the patent generally describes an object management facility for a file management system in a computing system, the patent does not describe an object oriented system in accordance with the present invention in which an abstract action object class is created to allow other objects to have their behavior customized at run time under different triggering conditions for activation of the action. 
     U.S. Pat. No. 5,050,074 describes a system for facilitating coordination of activities by a plurality of actors with an object data base and state/action identification. The system according to the patent includes a plurality of objects each associated with a constituent, with each object including state information defining a state and constituent information containing information relating to a constituent. The system further includes tables to identify processing actions in connection with the various states of each object, state transitions for each object in connection with each action defined by the action definition table, and actors associated with each constituent. The system initially determines, in response to constituent information from an actor and the object access definition table, the association of the actor with respect to a constituent and selectively processes the object associated with the constituent as defined by the action definition table and modifies the state of the object as defined by the state transition definition table. In the system according to the present invention, the actions related to the various states of each object are kept as part of the state that belongs to that object. The action information is not stored in a global action definition table as in the prior art. This improves the overall response time of the system. The system described in U.S. Pat. No. 5,050,074 also includes a table to keep state transitions for each objects actions. In other words, the actions are limited to primitive state transitions. In the system according to the present invention, the actions can be defined through method calls, scripts, procedure calls, and action slot executions. 
     IBM Technical Disclosure Bulletin, Vol. 32, No. 4A, September 1989 at p. 182 includes an article entitled “Method for Direct Object Manipulation” which describes a method for implementing a protocol to facilitate and manage direct object manipulation between independently developed programs displayed on a computer terminal display. Direct object manipulation is described as the capability to select an object on the display screen and dynamically drag that object to another area on the screen and leave the object in the new location on the screen. 
     There are two primary forms of actions implied with direct object manipulation; the first is a direct repositioning of the object to another location on the screen, and the second is an action-object type of direct object manipulation where the object undergoing direct object manipulation is dragged over another object, the target object, initiating an action. Direct object manipulation provides a set of messages and functions to accomplish both forms of direct object manipulation and is used in the IBM OS/2 Presentation Manager program. As described above, there are two primary forms of actions implied with direct manipulations; direct repositioning, and a target object initiating an object. These are simple cases of actions and they are tailored to be used for direct manipulation. The system according to the present invention is not limited to just “a direct manipulation”, it is the general purpose system that can be used to create compound objects with complex interactions. Furthermore, the action orientation described in the Technical Disclosure Bulletin article is not object oriented in the sense that the action information is kept as state variables in the source or target objects. The action information is not represented as a first class object. In the system according to the present invention, action objects are first class objects thus providing the advantages like extendibility and modularity. 
     U.S. Pat. No. 4,967,371 entitled “Method and Apparatus for Inference” describes a method of inference using frame based knowledge representation which enables the simultaneous realization of high accuracy and high speed in the process of inference. The method includes the steps of accompanying each slot with procedure information which indicates procedure for deriving the slot value of the slot from the other slot values, providing pointer information indicating the slots related to each other by the procedure indicated by the procedure information, accompanying each slot with sign information which indicates the validity of the slot value currently given, deriving the slot value in accordance with the procedure indicated by the procedure information when the slot value is missing and when the slot value is indicated by the accompanying sign information as invalid, changing the indication of the sign information accompanying the slots which are indicated by the pointer information as being related to the slot whose slot value is derived, and storing the derived slot value. 
     The patent deals with, among other things, slots in an expert system context and does not teach nor suggest the use of action slots containing multiple action objects, or the addition at run-time of additional actions slots within an observable object for controlling execution of action objects in an object oriented system for application framework or interface generation according to the present invention. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is an object of the present invention to control interaction between application objects in an object oriented system executed on a data processing system wherein the object oriented programming system includes action objects of a number of different classes, one or more of which may be placed within a plurality of action slot container objects associated with an observable object. Additionally, the present invention provides a method of adding additional action slot container objects at run-time permitting the system to respond to newly defined abstract events. 
     The system, according to the present invention, employs compound object technology and provides an application framework for interactive elements of application programs. Application programs are constructed of highly integrated components called application objects. Each application object contains two main parts. The first is the data part and the second is the presentation part. The data part is packaged into an object that is persistent and observable. Persistent means that changes made to the state of the object (i.e. the data) are preserved from execution to execution. Observable means that changes in the state of the object are visible to other objects. Such data objects are called persistent observable data objects (POD). The presentation part of an object is called the View object and is also observable. A View object is analogous to the user interface part of a traditional application program. There may be several views of the same persistent observable data object. The end-users of application objects modify PODs through their Views. A View may be used to present information contained in several persistent observable data objects. The PODs may be grouped into an Inset. An Inset is a collection of PODs with at least one default View for these PODs. The Inset is also a type of POD and is therefore both persistent and observable. 
     In the system according to the present invention, object observability is achieved by the use of action slots and action objects. Each observable object may have any number of predefined and/or user defined action slots. The predefined action slots are determined at the design stage of the application object. The user defined action slots are determined by the user when the objects are embedded in each other to create compound application objects. The action slots for an observable object are each identified through a unique name. An action slot is a container object to store one or more action objects. Action objects can be added to the action slot by specifying the unique name and action object initialization information. An action slot can be executed which causes execution of each action object in the action slot. 
     An action object of a first class is an abstract object that has a state where the state is used to invoke the specified application programming interfaces. Thus, an action object respond to means to set its state as well as means to execute the action object. The action object of a first class is used to create specialized action objects of subclass such as a second class. This is achieved by utilizing object oriented programming. Several subclass action objects which might be created by the abstract action object (first class) are method, script, procedure and slot. These action objects of a second class implement the logic for programming interfaces defined in the action object of the first class. This type of customization is achieved by overwriting elements of the first class action object by the action objects of the second class. 
     Other prior art application frameworks employing object oriented programming systems employ only one type of action object which limits their ability to construct and customize compound objects. 
     Therefore, a computer system according to the present invention includes a processor, storage, a bus connecting the storage to the processor and a display subsystem connected to the bus wherein control of the interoperability of applications running on the system is maintained by an object oriented programming system. 
     The observable protocol, in accordance with the present invention, is based on the use of action slots and action objects. An action slot is a container object or a named queue of actions. Each observable object has a number of predefined and user defined action slots. The action slot names for a given observable object must be unique. The activation of an action slot causes the activation of all action objects within the action slot. An action object has the following features: 
     An action object is extensible in that subclasses of different types of action objects may be formed. The action object hides the implementation form of action supporting such subclasses of action objects such as method, script, procedure and slot action objects. The action object contains some action to be performed such as a method (by method name) or extension language code, etc. The action object also contains a target object on which the action is to be performed. Action objects can be saved and restored through visual programming objects. An action object can be activated individually or as part of the action slot. 
     An action object can also be defined to invoke a method of a target object. Such action objects are called method action objects. An action object may be defined to activate the action slot of a target object which is referred to as a slot action object. An action object may also be defined to invoke an external function written in some high level programming language. Such action objects are called procedure action objects. An action object may also be defined to interpret an extension language script. Such action objects are referred to as script action objects. 
     Action slots have the following features: 
     action slots define abstract events; 
     multiple actions may be specified for each action slot; 
     multiple action slots may be specified per application object; and 
     the action slots of application objects are extensible. 
     The above as well as additional objects, features, and advantages of the present invention will become apparent in the following detailed written description. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself however, as well as a preferred mode of use, further objects and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein: 
     FIG. 1 is a diagram of a computer system implementing the present invention. 
     FIG. 2 is a block diagram of elements of the computer system of FIG.  1 . 
     FIG. 3 is a block diagram of the system for controlling the operation of the computer system in accordance with the present invention. 
     FIG. 4 is a diagram showing the components available in the compound object utilities in accordance with the present invention. 
     FIG. 5 is a block diagram showing the process for setting up and initializing action objects in accordance with the present invention. 
     FIG. 6 is a diagram showing the structure and relationship of action objects in accordance with the present invention. 
     FIG. 7 is a block diagram showing the relationship of action slots, action objects and triggers. 
     FIG. 8 is a flow diagram describing the creation of an action object of a second class in accordance with the present invention. 
     FIG. 9 is a diagram showing the relationship between action slots and action objects in accordance with the present invention. 
     FIG. 10 is a schematic diagram of an action object and a target object on which an action is to be taken in accordance with the present invention. 
     FIG. 11 is a diagram showing the action object as a push button object operating on a rectangular object to change color in accordance with the present invention. 
     FIG. 12 is a schematic diagram showing a data object with two action objects where each action object relates to a different view of the data object in accordance with the present invention. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENT 
     Referring now to FIGS. 1 and 2, a data processing system in accordance with the present invention will be generally described. Data Processing System  10  may be for example a stand-alone graphics workstation having a system unit  12 , a color graphics monitor  14 , a keyboard  16 , and a mouse or other cursor control device  18 . Modern graphics workstations are very powerful data processing systems which combine state of the art processing capability with large internal main memories coupled to peripheral storage systems such as magnetic disk drives or optical compact disks to provide the large amount of readily available storage required for graphics applications. 
     Data Processing System  10  includes processor  22 , storage  24 , bus  26 , display subsystem  28  which drives a display device  30 , cursor control logic  32  and input/output channel  34 . 
     Referring now to FIG. 3, the control system will be generally described. 
     The data processing system described above with reference to FIGS. 1 and 2 may be controlled by a commercially available and well-known multi-tasking operating system such as OS/2* (OS/2 is a registered trademark of International Business Machines Corporation). Among many other tasks which the OS/2 system controls in operating Data Processing System  10 , a group of utilities referred to as compound object utilities  38  facilitate the implementation of the use of action objects and action slots in accordance with the present invention. The compound object utilities will be described with reference to FIG.  4 . 
     Referring to FIG. 4, it can be seen that the components of compound object utilities  38  are grouped into several major categories. Among these are a visual builder component (there are many visual builder components available for generating visual objects in object oriented programming systems currently available). Visual object components such as push button, entry field, label, list, and combination box, etc., nonvisual objects such as tables, dictionaries, calculators, etc., editors, such as action objects, layout, properties, dictionaries, and tables, etc., and subclass action objects such as method, script, script, procedure and slot. 
     The visual builder is used to create applications visually. Visual builder provides a tool pallet which contains visual and nonvisual objects. The user can use drag/drop operations to create and update application user interfaces visually through a layout editor. Visual builder provides editors to edit or customize different features of an application. For example, property editor is used to change the properties of the objects such as color of a label object or text of a push button object. 
     The property editor is used to change the properties of objects. The dictionary editor is used to populate a dictionary with integer, real, string and object values. A table editor is used to create a table of numbers. The label editor is used to layout visual objects in compound applications. The second class action object such as method, script, procedure and slot are provided to extend the behavior of visual and nonvisual objects. The action object editor is used to create action objects and add them to the visual or nonvisual objects. Visual objects are used to create the graphical user interface (GUI) for compound applications. Nonvisual objects are used to create the data objects of the compound applications. 
     Referring now to FIG. 5, the process employed by the compound object utilities will be described. When a compound application is to be created, the layout editor is used to create the graphical user interface for the compound application. Next, the action object editor is used to create action objects and to add the action objects to one or more selected action slots in the visual or nonvisual objects. The dictionary editor adds an entry to the dictionary and the table editor initializes table objects. 
     Referring now to FIGS. 6 and 7, the structure of first class action objects and second class action objects will be described. Triggerable Object  62  has an attribute called object key  61 . First class action object  64  has among other attributes an attribute called target  63 . Any subclass action objects such as method action object  65 , procedure action object  66 , script action object  67  or slot action object  68  will have at least two attributes which can be set or accessed by using one of the following methods: 
     Get_object key (gets the value of the object key); 
     Set_object key (sets the value of the object key); 
     Get_target (gets the value of the target); 
     Set_target (sets the value of the target); 
     “Target” attribute holds the address of a target object. “Object Key” attribute holds the information related to the triggerable object  62 . The contents of “object key” will be interpreted differently by subclass action objects  65 ,  66 ,  67  and  68 , respectively. For example, method action object  65  will interpret object key  61  as the method name. Slot action object  68  will interpret object key  61  as the action slot name. Script action object  67  will interpret object key  61  as a macro which requires interpretation. Procedure action object  66  will interpret object key  61  as the name of the dynamic library and the procedure entry name in that library (not shown). 
     In summary, subclass action objects method  65 , procedure  66 , script  67 , and slot  68  do not have any inherent state defined, but rather they inherit the state of the parent (higher class action objects) and can access them through “get” and “set” attribute messages. 
     FIG. 7 in addition to the structure described above includes an action slot  72  which may contain a number of action objects as will be described below with respect to FIG. 9 and a link to primitive link list  74  which is a prior art nonobject oriented programming technique for controlling execution of a sequence of commands or accessing data in a predetermined sequence. 
     Referring now to FIG. 8, the creation of a subclass action object will be described using the method action object as an example. It should be noted that other subclass action objects such as slot, procedure, and script can be created in the same way. These subclass action objects inherit the behavior from the parent objects such as the abstract action object of the first class or the triggerable object as described above with reference to FIG. 6 and 7. The behavior is customized by overwriting “trigger”, “action kind”, and “get string form” methods. The implementation of these methods are different for different action objects. For example, “trigger” method for a method action object sends a message to the target object. “Trigger” method for a slot action object triggers an action slot on the target object, etc. 
     A method action object is created by the following process. The target object is initialized as shown in the initialize target object step at block  82 . An action object is then allocated by the message: 
     action object equals method new (); as illustrated by block  84 . 
     The target object is then set as illustrated at block  86  by sending set target message: 
     set_target (action object, target);. 
     And lastly, the method name is set by sending set object key message: 
     set_object key (action object, “print self”); as illustrated in block  88 . 
     In the subclass action object such as method action object  65  (see FIG.  6 ), the implementation of abstract methods like “trigger” accesses the state variables through the “get” and “set” methods. 
     The interface definition files (idl) which follow (within Appendix A), provide additional detail on the implementation of an object oriented system for constructing and executing programs to run on a data processing system in accordance with the method and system of the present invention. 
     Referring now to FIG. 9, the relationship between action objects and action slots will be further described. A number of action slots such as action slot  1   92 , action slot  2   94 , and action slot n  96  each having a unique name are included in the system. Each action slot has one or more action objects such as A 01 , 1 ; A 0 , 2 ; . . . A 01 , n for action slot  1   92 . Action slot A 02 , 1 ; A 02 , 2 ; . . . A 02 ,n for action slot  2   94 . Action slot n  96  may include action objects A 0 n, 1 ; A 0 n, 2 ; . . . A 0 n,n. Since each action slot is identified by a unique name, the name of the action slot can be used to perform a search of the action slot on a source object. If a trigger object is employed to trigger an action slot on a source object, and the action slot with the unique name identifier is found, all action objects in the action slot will be executed to complete the desired operation. 
     In accordance with an important feature of the present invention, an observable object having a fixed number of action slots may be modified by the user at run-time to incorporate additional action slots, greatly enhancing the efficiency of the system. Thus, a “push button” observable object having two action slots: “Pressed” and “Released,” may be modified to include a third action slot such as “Rotated.” This new action slot may be populated with one or more action objects which will permit the “push button” observable object to respond to an abstract event which was not contemplated at the time of the object&#39;s initial design. 
     Referring now to FIGS. 10 and 11, an example will be described. A display screen  1002  may include a push button object  1004  and a rectangle object  1006 . The desired action is when the push button is pressed, the color of a rectangle object  1006  should change by sending a “change color” message to the rectangle object  1006 . The push button object may have an action slot named “pressed” and another action named “released”. When push button  1004  is pressed, such as by action of cursor control mouse  18  (see FIG.  1 ), each of the action objects in action slot named “pressed” is then executed. 
     The “pressed” action slot may contain one or more action objects to perform the functions on the target object desired by the user. A method action object  1008  (see FIG. 11) includes the rectangle object  1006  as the target and “change_color” as the method name. This method action object  1008  will be part of the persistent state of the push button, thus this action object will be saved from execution to execution so that whenever push button  1004  is pressed, the pressed action slot will be triggered causing the triggering of method action object  1008  which changes the color of rectangular object  1006 . 
     Referring now to FIG. 12, different views of a data object are shown with the relationship of the data object and the views to the action objects. Data object  1202  may be presented in two views: view  1 ,  1204  and view  2 ,  1206 , respectively. View  1  is controlled by action object  1   1208  and view  2  is controlled by action object  2   1212 . View objects  1204  and  1206  register with data object  1202  by adding a method action object to the “data changed” action slot  1214  of data object  1202 . Action object  1   1208  and action object  2   1212  are components of data change action slot  1214 . When data in data object  1202  is changed, action object  1   1208  is triggered with a target of view  1  and a method of redraw which causes view  1  to be redrawn with the new data in data object  1202 . Similarly, view  2  is modified by action object  2   1212  and redrawn with the new data from data object  1202 . 
     The above example illustrates the observability of objects and views in accordance with the present invention through the use of action slots and action objects to revise data in views when, for example, a data object changes. 
     The present invention, as described above, expands the capabilities of object oriented programming systems over prior art techniques. 
     While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.