Interaction Graphs: A System for Specifying and Generating Object Interactions

Neeraj Sangal, Edward J. Farrell, Karl J. Lieberherr · 1998

Unified Modeling Language (UML) defines a number of different diagrams to help in the construction, analysis and comprehension of Object Oriented Programs. In our view, of all those diagrams, two of the most important kinds are the Class Diagrams and the Object Interaction Diagrams. Class Diagrams give the static view of how classes relate to each other. Object Interaction Diagrams give the dynamic view of how a program organizes the interaction of these classes to perform specific functions. However, there is a key difficulty. UML is the stuff we use to think and communicate with while we use a programming language, like Java, for actual implementation. Unfortunately, once you begin writing in Java it becomes nearly impossible to go back to UML. With Java and other object oriented languages, it has become possible to map class diagrams to code and vice versa. In this paper we will show a new technique of how you can start from an Object Interaction Diagram and generate actual Java code from it. Furthermore, it is possible to do round-trip-engineering with the generated code. This ability to do roundtrip engineering with Object Interaction Diagrams is new and significant. In this paper, we will show how an Object Interaction Diagram can be extended into an Interaction Graph. We will formalize the concept of Interaction Graphs which are composed from actions. Looking at a program in terms of action structure gives a useful overview abstracting away from data structure and code details. Additional key contributions are the untangling of actions and properties and the handling of object transportation based on the structure of the actions. By thinking of actions as parameterized code blocks which have inputs and outputs we were able to build a powerful system for visually representing and composing data structure operations and ultimately to creating a general system for representing Object interactions and generating code which implements those interactions. This paper starts with an example of a library system. We will first show a sequence diagram to represent a checkout process and then show how to build an interaction graph from it. After this example we will formally define Interaction Graphs and Actions and explain how objects are actually tracked and transported.

Read the paper · More papers on PaperTik