Static program analyzers (SPA) are interactive tools that enhance program understanding by answering queries about programs. An SPA extracts relevant information from input programs and stores it in a program knowledge base (PKB). In this paper, we present a hybrid PKB design model that integrates a relational database with attributed syntax trees. In the hybrid PKB, global properties of programs are stored in a relational database and detailed program structures are stored as attributed syntax trees. The hybrid PKB approach simplifies the structure of the PKB and provides a flexible mechanism for analysis of complex structured objects such as syntax trees and control/data flow graphs. The model reduces the size of the database, and hence program queries can be answered efficiently.
展开▼