Multilanguage Detection of Design Pattern Instances
Existing design pattern detection tools are predominantly language-specific, hindering consistent identification of pattern instances across multi-language codebases. To address this, we propose DP-LARA—a cross-language design pattern detection approach built upon the LARA framework and a novel virtual Abstract Syntax Tree (vAST). DP-LARA establishes the first unified, language-agnostic pattern matching paradigm by mapping Java and C/C++ source code to semantically equivalent vAST representations, then applying static analysis augmented with an extensible rule engine for precise and consistent pattern instance identification. Experimental evaluation demonstrates that DP-LARA achieves detection accuracy on par with state-of-the-art single-language tools for both Java and C/C++, while significantly improving cross-language result consistency and reducing language adaptation effort by over 60%. This work introduces a scalable, maintainable paradigm for multi-language software architecture analysis.