SPQR: Use of a First-Order Theorem Prover for Flexibly Finding Design Patterns in Source Code (2003)
| Citations: | 2 - 2 self |
BibTeX
@TECHREPORT{Smith03spqr:use,
author = {Jason McC. Smith and David Stotts},
title = {SPQR: Use of a First-Order Theorem Prover for Flexibly Finding Design Patterns in Source Code},
institution = {},
year = {2003}
}
OpenURL
Abstract
Previous approaches to discovering design patterns in source code have suffered from a need to enumerate static descriptions of structural and behavioural relationships, resulting in a finite library of variations on pattern implementation. Our approach, System for Pattern Query and Recognition, or SPQR, differs in that we do not seek statically to encode each pattern and each variant that we wish to find. Rather, we encode in a formal denotational semantics a small number of fundamental OO concepts (elemental design patterns), encode the rules by which these concepts are combined to form patterns (reliance operators), and encode the structural/behavioral relationships among components of objects and classes (rho-calculus). We then use a logical inference system to reveal large numbers of patterns and their variations from this small number of definitions. Our system finds patterns that were not explicitly defined, but instead are inferred dynamically during code analysis by a theorem prover, providing practical tool support for software construction, comprehension, maintenance, and refactoring. We describe our approach in this paper with a concrete example to drive the discussion, accompanied by formal treatment of the foundational topics.







