ast parsing

Parsing source code into abstract syntax trees and extracting syntactic nodes and metrics to support static analysis, vulnerability signals, mapping behavioral data (e.g., eye-tracking) to code structure, and multilingual term detection.

astparsing

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

MLCPD: A Unified Multi-Language Code Parsing Dataset with Universal AST Schema

Oct 18, 2025
JG
Jugal Gajjar
🏛️ The George Washington University

Existing code datasets are predominantly confined to single-language lexical features or isolated parsers, hindering cross-lingual syntactic reasoning and structural analysis. To address this, we propose a language-agnostic, universal Abstract Syntax Tree (AST) abstraction schema that enables structural alignment and semantic normalization across ten mainstream programming languages. We introduce the first large-scale, high-fidelity multilingual code parsing dataset—comprising over 7 million source files—generated via a unified compilation pipeline and stored in Parquet format, accompanied by reproducibility scripts and interactive visualization tools. The dataset is publicly released on Hugging Face and GitHub. Empirical analysis reveals substantial syntactic structural commonalities across languages, providing foundational support for cross-lingual program understanding, pretraining of code models, and static program analysis.

Enabling consistent cross-language reasoning and structural learningProviding hierarchical tree structures with universal AST schemaUnifying syntactic code representations across ten programming languages

This work proposes a unified framework that integrates graph neural networks with large language models (LLMs) to jointly detect, explain, and repair software maintainability and security issues. Addressing the high false-positive rates and maintenance overhead of existing code smell and vulnerability detection tools—stemming from their lack of structured contextual awareness—the approach uniquely fuses multi-dimensional program graphs, including abstract syntax trees (ASTs), control flow graphs (CFGs), and program dependence graphs (PDGs), with deep code embeddings. The resulting model is cross-lingual, interpretable, and readily integrable into CI/CD pipelines. Empirical evaluation on multilingual datasets demonstrates significant improvements over conventional rule-based analyzers and single-model baselines, achieving higher detection accuracy and generating more practical repair suggestions.

AI-assisted code reviewcode smellsprogram analysis

This work addresses the challenge of identifying structural and semantic similarities across imperative programs written in different languages by proposing a unified graph representation that integrates abstract syntax trees with neural semantic embeddings. The approach transforms annotated programs into typed, attributed graphs and leverages CodeBERT and SentenceTransformer to generate rich semantic embeddings. By constructing consistent graph representations across multilingual verification datasets—including C/ACSL, Java/JML, and Dafny—it achieves, for the first time, joint modeling of syntactic structure and formal semantics. This unified framework offers a viable pathway for cross-language reuse of verification artifacts and demonstrates strong generality and effectiveness across diverse programming languages and specification frameworks.

graph constructionimperative programsprogram representation

Automating the Analysis of Parsing Algorithms (and other Dynamic Programs)

Dec 29, 2025
TV
Tim Vieira
🏛️ Johns Hopkins University | ETH Zürich

This paper addresses the challenge of establishing performance guarantees for dynamic programming (DP) parsing algorithms in natural language processing. We present the first automated analysis system that unifies program analysis and complexity inference within a DP framework. Our approach integrates static analysis, type inference, abstract interpretation, and dependency graph modeling to enable formal verification and synthesis of efficient data structures. Key contributions include: (1) a unified formal model capturing DP control flow, data flow, and recurrence structure; (2) automatic inference of precise types, detection of dead code, and identification of redundant computations; and (3) generation of tight, parameterized upper bounds on time and space complexity. We evaluate our system on canonical parsing algorithms—including CKY, Earley, and Neural PCFG—demonstrating substantial improvements in both the automation level and precision of complexity analysis.

Automating analysis of parsing algorithms and dynamic programsInferring types, dead code, and verifying algorithm propertiesProviding guarantees on runtime and space complexity bounds

AI-Driven Code Refactoring: Using Graph Neural Networks to Enhance Software Maintainability

Apr 14, 2025
GB
Gopichand Bandarupalli
🏛️ Campbellsville University

This work addresses the declining maintainability of software caused by high cyclomatic complexity and coupling in code refactoring. We propose the first end-to-end Graph Neural Network (GNN)-driven, semantics-aware refactoring method. By modeling Abstract Syntax Trees (ASTs) as graphs and integrating AST embeddings with static analysis, our approach automatically identifies and optimizes high-complexity, high-coupling code fragments. Unlike conventional rule-based or shallow-model approaches, ours is the first to systematically apply GNNs across the entire refactoring decision pipeline. Evaluated on 2 million Python code snippets, our method achieves 92% refactoring accuracy, reduces average cyclomatic complexity by 35%, and decreases coupling by 33%. These improvements significantly outperform established baselines—including SonarQube and decision tree–based methods—demonstrating both technical novelty and practical efficacy in automated, semantics-guided code refactoring.

Comparing GNN performance against rule-based and decision tree methodsReducing code complexity and coupling with AI-driven refactoringUsing GNNs to improve software maintainability via code refactoring

Latest Papers

What's happening recently
View more

Existing algorithm identification methods often suffer from poor usability, limited scalability, and insufficient evaluation. This work proposes a novel paradigm that integrates domain-specific languages (DSLs) with abstract syntax tree (AST) pattern matching: algorithmic characteristics are formally specified using a DSL to construct a reusable library of AST patterns, enabling automatic recognition of common algorithm implementations in source code. Evaluated on a subset of BigCloneEval, the approach achieves an average F1 score of 0.74, substantially outperforming CodeLlama (0.35) and state-of-the-art code clone detectors, which attain a recall of only 0.20 compared to our method’s 0.62. This advance represents a dual improvement in both precision and practical applicability for algorithm identification.

abstract syntax treealgorithm recognitionautomated analysis

SemEval-2026 Task 13 investigates machine-generated code detection across multiple programming languages and application scenarios, asking participating systems to generalize to unseen languages and domains. This paper describes our participation in Subtask A (binary classification) and explores both pretrained code encoders and lightweight feature-based methods. We design ratio-based features that are less sensitive to snippet length. To support the extraction of descriptiveness-related signals, we use parsing engines and a programming-language classifier. Additionally, we train a separate code-vs-text line classifier to identify raw natural language segments embedded within samples. We combine a shallow decision tree with heuristic rules derived from data analysis to produce the final predictions. Our approach is computationally efficient, requires only CPU resources for training, and achieves near-instant inference time, offering a lightweight alternative to large pretrained models.

code authenticitycross-language generalizationLLM-generated code detection

This work proposes VulStyle, a novel approach to vulnerability detection that addresses two key limitations of existing methods: the neglect of risk-prone programming habits implicit in code style and the structural complexity introduced by full abstract syntax trees (ASTs). VulStyle is the first to incorporate code style (CStyle) as an auxiliary signal for vulnerability detection, integrating function-level source code, a pruned non-terminal AST, and stylistic features within a multimodal pre-training framework. This design preserves semantic hierarchy while reducing structural complexity and enables cross-language transferability. Experimental results demonstrate that VulStyle achieves F1 score improvements of 4%–48% over prior methods on the BigVul and VulDeePecker benchmarks and attains state-of-the-art or best average performance across five standard datasets.

abstract syntax treecode representationcode stylometry

Static code analysis tools often suffer from generating excessive non-actionable warnings, leading to developer alert fatigue and reduced practical utility. This work proposes STAF, a novel approach that, for the first time, leverages Sentence Transformers to classify the actionability of static analysis alerts. By employing sentence embeddings within a binary classification framework, STAF is trained and evaluated on a large-scale dataset of Java projects. Experimental results demonstrate that STAF achieves an F1 score of 89% in within-project settings, outperforming existing methods by at least 11%. In cross-project scenarios, it improves performance by at least 6%, substantially reducing non-actionable alerts and significantly enhancing the overall quality of analysis reports.

alert fatiguecode qualitynon-actionable alerts

Hot Scholars

SJ

S. Joe Qin

Lingnan University, Hong Kong, President, Member of EASA, Fellow of HKAE, NAI, IEEE, IFAC, AIChE
Process data analyticsdata scienceprocess controlsystem identification
HX

Haoran Xie

Professor & Person-in-Charge, Director, Associate Dean, Lingnan University, Hong Kong
Large Language ModelNLPLanguage LearningArtificial Intelligence in Education
QL

Qing Li

Chair Professor (Data Science), the Hong Kong Polytechnic University
databasedata warehousemultimedia retrievalweb services
WL

Wenna Lai

Department of Computing, The Hong Kong Polytechnic University
Natural Language ProcessingAffective Computing
WL

Wenqiang Liu

Senior Manager/Senior Staff Researcher,Tencent
Deep LearningMachine LearningNLPMultilingual