Depending on the maintenance task in hand, SPAs must process different source programs and answer different types of program queries.
Flexibility is, therefore, a desirable property of SPAs.
In this paper, we describe a program query language, called PQL, that facilitates the design of flexible SPAs. PQL is a conceptual level, source language-independent notation to specify program queries and program views. In PQL, we can query global program design as well as search for detail code patterns. Program design models and PQL form the core of an SPA conceptual model. We based the SPA's architecture on this conceptual model.