Next: Variable Links Up: Appearance Previous: Function Links

Data Type Links

Most non-trivial C programs make extensive use of data structures. For the user attempting to understand unfamiliar code, comprehending the data structures at the heart of a program may be at least as important as understanding the details of functional dependencies.

HyperCode provides links from programmer-defined data type names in variable declarations to the corresponding data structure definitions. A user browsing HyperCode with Mosaic, for instance, can click on a type name to view the definition of the structure that the type name represents (Figure 5). Of course, if a data structure contains elements which are of programmer-defined types, they are linked to their respective definitions. HyperCode thus enables a user to explore data structure dependencies as easily as function dependencies.

Further parallelling the treatment of functions, HyperCode provides links from type definitions to lists of their use sites (Figure 6). Each element of a type backtrace list is, in turn, linked to the site in the code which it describes; thus, from a type definition, a user can discover each variable which is declared to be of that type.

As with function links, the data type links provided by HyperCode explicitly represent an important aspect of program structure; specifically, data type links encode the entire set of data structure relationships used by a program. Again as with function links, data type links are extremely useful to a user considering modifying particular structures: data type links make it easy to evaluate the effects of a proposed modification to a data structure on every dependent data structure and variable.


jhbrown@ai.mit.edu
Mon Sep 19 08:19:50 EDT 1994