Download attributed graph-based representations for software view generation
Transcript
137
{ Search Graph Index(name): to nd the record corresponding to the given
graph name in the Graph Index table
Graph Index implementation
We implemented a Graph Index table as an array of records of the form
(name; graph). Due to the small size of this table, we used linear search to
implement the Search operation. We used simple array and record operations
to implement the other Graph Index operations.
Node Index Tables
A Node Index table is a collection of nodes; each node represents a vertex of
an APDG G = (N ; E ). A Node Index table is an implementation of one APDG.
The information in each node describes the relationships between this node and its
neighboring nodes. A multiple-le program may have several (Node Index) tables.
Node Index operations
{ Create(index): to create a new empty Node Index table (index)
{ Add(index; node): to insert a given node into the given index
{ Delete(index; node): to remove the given node from the given index
{ Find(index; identification number): to nd the node address corresponding to the given identication number in the given index
{ Number of nodes(index): to nd the number of nodes in this index
Node Index implementation
We implemented each table as an array of pointers to graph nodes. The index
of a node's pointer is the identication number of this node. All operation are
implemented using normal array operations.