arXiv-2022 A Survey of Deep Learning Models for Structural Code Understanding
Paper: A Survey of Deep Learning Models for Structural Code Understanding
Survey: Deep Learning Models for Structural Code Understanding
Abstract
Methods and applications for code understanding continue to proliferate. This survey groups recent code-understanding work into sequence-based and graph-based models. It also covers metrics, datasets, and downstream tasks, and offers recommendations for future research on structural code understanding.
Introduction
Structural modeling of code: how to represent structural information in code effectively, and how to select structural signals that help a given downstream task.
General-purpose code representation learning: how to learn code representations that transfer beyond a single programming language.
Task-specific adaptation: how to choose architectures tailored to downstream tasks, handle task-specific data, and adapt models under few-shot learning, transfer learning, and cross-language settings.
Preliminary
Structures in code


Lexical analysis yields natural code sequences (NCS); syntactic analysis yields abstract syntax trees (AST); semantic analysis and intermediate-code generation further yield control-flow graphs (CFG) and data-flow graphs (DFG).
Other structures
Intermediate Representation
Examples obtained from compilers include Static Single Assignment (SSA) and Program Dependency Graph (PDG).
The Unified Modeling Language
UML diagrams of software systems.
Sequence-based models

type-1: depth-first traversal
type-2: AST paths
type-3: injection of structural information
type-4: partial retention of the AST
Tasks








<HR align=left color=#987cb9 SIZE=1>