Next: Development Directions Up: Advanced Applications Previous: Advanced Applications

Framework for Global Code Sharing

The database supporting advanced HyperCode stores code primarily at the granularity of individual function and data type definitions. The database itself is constructed in such a way as to be language-independent, and can therefore be used as a repository for code of all languages.

An augmented version of our compile-time HyperCode generator can decompose C programs into functions and data structures, then insert them into the code database. Alternatively, once basic HyperCode has been generated for a program, a simple tool can extract a particularly interesting individual function, along with all of its dependencies (both functions and data structures) from a larger piece of code, and insert each of them into the database. Programs in other languages than C can be handled in a similar fashion by language-specific tools.

Code submissions are accompanied by full linkage information; interesting functions and applications should be accompanied by lists of keywords for use in database searches. When an entire application is being submitted, an application context object is added to the database; each of the code subcomponents stored maintains a pointer to this application context. Application contexts also indicate application dependencies; for instance, Mosaic requires xv for full functionality.

Some pieces of code may be used in multiple application contexts; rather than being repeatedly entered in the database, a single entry for each function keeps track of the various application contexts.

A publicly accessible HyperCode server/database helps programmers avoid reinventing the wheel by enabling easy code distribution and sharing. Programmers throughout the Web can contribute their work to the code database, while developers can search the database for needed functions or applications. When a desirable function is discovered, a developer can use a special client to communicate directly with the database, gathering only those dependencies which he has not previously downloaded. Thus, using HyperCode, a developer can remove a function from a program, bringing along all of the context necessary for it to operate. The developer can then apply the function in entirely different applications with none of the difficulty of tracking down support functions, data structure definitions, and similar context traditionally associated with porting code in this fashion.

In addition, by contributing to and taking advantage of server-supported HyperCode, programmers encourage code development and evolution. Placing code in a publicly accessible database presents the opportunity to leverage the programming expertise and computing power of the entire World-Wide Web. Server-supported HyperCode supports code evolution in a two major ways: first, by allowing additional information such as user comments, profiling information, and bug reports to be stored with a piece of code; and second, by allowing new code submissions to be explicitly linked as improvements and variants of in-database code. In the first case, virtual hypertext is used to generate HyperCode views decorated with selected subsets of the accumulated information; through such views, programmers are provided with a wealth of information about code they submit, and code they consider utilizing. In the second case, users discover new links from code they are using to improved code which serves the same function; they can therefore ``evolve'' their applications by incorporating the newer versions. The emerging paradigm of Global Cooperative Computing is further described in [DBE+94].



Next: Development Directions Up: Advanced Applications Previous: Advanced Applications


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