• No results found

Abstract views of the object graph

Jitan users can abstract an object graph that represents a Java

program's execution. An abstraction lets programmers consider real Java programs with a large number of objects and threads. It also

provides a clearer view of a selected part of the constructed graph. An abstraction can focus on an object subgraph—for example, by graying out the other parts of the global graph without changing shapes. An abstract view also can visualize only this subgraph and what happens to it during program execution.

An abstraction of the global object graph can visualize only threads and objects that are directly or indirectly referenced by a given thread (indicated by the user). During program debugging, we may find it interesting to precisely analyze a new thread in the graph execution without seeing the other threads, which are known not to cause any problem. On the other hand, to precisely study interactions and

possible deadlocks between two threads on a shared object, we must see both thread subgraphs,.

Figures 16 and 17 give an example of an abstraction of a given program. The main thread #T0 (the thread related to the main method) creates two well-known patterns: a binary tree and a

producer-consumer system. Every BinTree object is built through an object factory method, which explains the references between the main thread and all the BinTree objects. The obtained object graph, visualized in Figure 16 without user instrumentation, is complex. In such a view, detecting patterns or independent subgraphs is difficult.

But if we ask for an abstraction of thread #T2, we see a partial view of the object graph, as shown in Figure 17. In this view, we can

immediately recognize a classical binary-tree pattern.

Figure 16. Global view of an object graph.

Figure 17. View of the object graph abstracted to the thread #T1 subgraph.

The additional insights offered by abstraction are very important for the understanding of a large application. This capability enables programmers to find recurrent patterns or to precisely study independent subgraphs at runtime.

Our current platform demonstrates the feasibility of the approach we have described here. Other environments can also use these

principles. Graphical visualization can be useful even for

single-threaded systems. For instance, in the context of smart cards, only a few (less than 20) objects are involved, but security issues make program understanding crucial. Discovering an object shared by two different applications on a card would be a major security issue.

Moreover, we can imagine designers using Jitan to automatically produce an object topology for use in reverse engineering. Teachers might use the environment for teaching concurrent and

object-oriented concepts.

In terms of performance and scalability, Jitan is operational and

already supports medium-size programs. It has handled applications with more than 100 objects, running on standard workstations. For the sake of animation, we must slow down the execution speed, so that the user can see and understand what is happening during

program execution. When needed, we can show only an abstract view of the object graph (a subgraph of a given thread). This feature lets us handle complex systems efficiently and increase scalability. (For further information, see http://www.inria.fr/oasis/jitan.)

O

ur further experiments will focus on two main goals. First, in

graphical abstraction, we are exploring techniques for displaying only threads (not objects) or only certain types of objects. These

techniques require specific rules and treatments because graph connectivity is not obvious and is therefore difficult to maintain. We also want to add a feature that would let the user control interleaving between all threads (for example, artificially blocking or slowing

threads). This feature would allow programmers to explore various potential behaviors such as infrequent deadlock conditions.

1. J. Gosling, B. Joy, and G. Steele, The Java Language Specification, Addison-Wesley, Reading, Mass., 1996.

2. S. Oaks and H. Wong, Java Threads, O'Reilly, Sebastopol, Calif., 1997.

3. M. Campione and K. Walrath, The Java Tutorial (Object-Oriented Programming for the Internet), Addison-Wesley, Reading, Mass., 1998.

4. G. Kahn, "Natural Semantics," Proc. Symp. Theoretical Aspects of Computer Science, Vol. 247, Lecture Notes in Computer Science, Springer-Verlag, Amsterdam, 1987, pp. 22-39.

5. G.D. Plotkin, A Structural Approach to Operational Semantics, Report DAIMI FN-19, Computer Science Dept., Aarhus Univ., Aarhus, Denmark, 1981.

6. P. Borras et al., "Centaur: The System," Proc. ACM SIGSOFT/SIGPLAN Software Eng. Symp. Practical Software Development Environments, ACM Press, New York, 1988, pp. 14-24.

7. G. Kahn, B. Lang, and B. Mélèse, "Metal: A Formalism to Specify Formalisms,"

Science of Computer Programming, Vol. 3, North-Holland, Amsterdam, 1983.

Isablle Attali is a senior researcher and the project leader of the Oasis team at INRIA (Institut National de Recherche en Informatique et Automatique), Sophia Antipolis, France. Her main research interests are the semantics of object-oriented programming languages, concurrent object-oriented programming languages, and parallel functional languages. Attali holds a master's degree in computer science from the University of Bordeaux and a PhD in computer science from the University of Nice. Contact her at isabelle.attali@sophia.inria.fr.

Denis Caromel is a professor in the Computer Sciences Department at the University of Nice, Sophia Antipolis, France. His main research interests are parallel concurrent and distributed object-oriented programming languages. Caromel received an MS and a PhD, both in computer science, from the University of Nancy, France. Contact him at denis.caromel@sophia.inria.fr.

Marjorie Russo is a PhD candidate at the University of Nice, Sophia Antipolis. Her main research interests are the formal semantics of concurrent object-oriented programming languages and the proofs of their properties. Russo holds an engineer diploma from the Ecole Supérieure d'Ingénieurs de Luminy and an MS from the University of Marseille, both in computer science. Contact her at marjorie.russo@sophia.inria.fr.

References

Related documents