@MISC{Xu08aformal, author = {Hao Xu and David Stotts}, title = { A Formal Language for Training a Design Pattern Detector}, year = {2008} }
Share
OpenURL
Abstract
Research in automated pattern detection from source code has focused on the efficiency of pattern extraction mechanisms; there are fewer projects on making the act of pattern definition easier and more accessible to practicing software engineers. We have developed the Program-Structured Pattern Definition Language (PsPDL) with the goal of giving programmers a familiar notation (more algorithmic, less mathematical) with which to create new pattern definitions for the catalogs that drive pattern recognition tools. The syntax of PsPDL resembles that of Java, with a few additional constructs added to express first-order or set theoretic concepts (such as quantification over identifiers); PsPDL also includes a simple module system that faciliates reusing pattern definitions. The semantics of PsPDL are based on a translation to first-order logic with a focus on modeling the dependencies among the semantic entities of OO programs. PsPDL is a first step towards solving the problem of training pattern catalogs directly in programming language source code.