Services on Demand
Journal
Article
Indicators
Cited by SciELO
Access statistics
Related links
Similars in SciELO
Share
Enfoque UTE
On-line version ISSN 1390-6542Print version ISSN 1390-9363
Abstract
LEITON-JIMENEZ, Jason et al. GAST: A Generic AST Representation for Language-Independent Source Code Analysis. Enfoque UTE [online]. 2023, vol.14, n.4, pp.17-34. ISSN 1390-6542. https://doi.org/10.29019/enfoqueute.957.
Organizations use various programming languages to develop their systems. These aim to take advantage of the most appropriate features of each language for a given domain and require programmers to command different languages and also to face the growing complexity of software development and maintenance. So, they need tools to help them analyze programs to identify relationships between their internal elements, uncover patterns, and calculate quality metrics. However, most tools have limited support for parsing multiple programming languages and high acquisition costs. Therefore, there is a need for new methods to analyze code written in multiple programming languages. This article describes the design of a method to automatically transform the syntax of various programming languages into a universal language with a generic syntax. The function of the generic language is to encapsulate the specificities of each specific language, so that the analysis of programs is facilitated in a single programming syntax and not in multiple syntaxes. The advantage of this approach is that only one analysis engine is required, not multiple code analyzers, to study the programs.
Keywords : Code transformation; Generic Abstract Syntax Tree; Generic Language; Code Analysis.