|
Abstract : |
Abstract. This paper presents a graph parsing approach to recognizing common, stereotypical computational structures, called cliches, in computer programs. Recognition is a powerful technique for e ciently reconstructing useful design information from existing software. We use a ow graph formalism, which is closely related to hypergraph formalisms, to represent programs and cliches and we use attributed ow graph parsing to automate recognition. The formalism includes mechanisms for tolerating variations in programs due to structure sharing (a common optimization in which a structural component is used to play more than one functional role). The formalism has also been designed to capture aggregation relationships on graph edges, which is used to encode aggregate data structure cliches and the abstract operations on them. A chart parsing algorithm is used to solve the problem of determining which cliches in a given cliche library are in a given program. 1 Program Recognition, |