Abstract
We propose a mechanism to raise the abstraction level of source-code analysis and robustly support multiple languages. Built on top of the LARA framework, it allows sharing language specifications between LARA source-to-source compilers, and enables the mapping of a virtual AST over the nodes of ASTs provided by different, unrelated parsers. We use this approach to create a language specification for Object-Oriented (OO) languages and add support for three different LARA compilers. We evaluate it by implementing a library of 18 software metrics using this language specification and apply the metrics to source code in four programming languages (C, C++, Java, and JavaScript). We compare the results with other tools to evaluate the approach.
Author supplied keywords
Cite
CITATION STYLE
Teixeira, G., Bispo, J., & Correia, F. F. (2021). Multi-language static code analysis on the LARA framework. In SOAP 2021 - Proceedings of the 10th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis, co-located with PLDI 2021 (pp. 31–36). Association for Computing Machinery, Inc. https://doi.org/10.1145/3460946.3464317
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.