Further Reading
Research that informs rgBuilder — what we implement today, what we read for inspiration, and where you can push the project forward.
If a paper sparks an idea (new relation type, better slice precision, agent retrieval pattern), open a GitHub issue or PR and point at the row below. We treat this doc as a living map, not marketing copy.
See also: Introduction (features) · Graph storage architecture (caches)
Research foundations in rgBuilder
Legend: Implemented = algorithm or structure in the codebase with tests; Inspired = aligned design, not a full reproduction; Reading = related work, not yet in code.
Classic program analysis
| Work | Status | rgBuilder | CLI / docs |
|---|---|---|---|
| Ferrante et al. — Program Dependence Graph (TOPLAS 1987) | Implemented | pdg.rs — data + control deps | inspect, slice |
| Weiser — Program slicing (ICSE 1981) | Implemented | slicing.rs, interprocedural_slicing.rs | rg-build slice — User Guide §8 |
| Reaching-definitions dataflow (standard compiler analysis) | Implemented | dataflow.rs → PDG data edges | via discover --with-cfg |
| Cooper, Harvey & Kennedy — Simple fast dominance (SPE 2001) | Implemented | dominance.rs (iterative CHK-style) | rg-build inspect |
| Control-flow graphs | Implemented | cfg.rs, cfg_builder.rs | discover --with-cfg, inspect |
| Forward taint (source → sink + sanitizers) | Implemented | taint.rs | rg-build slice --taint — Introduction § Taint |
Tests: slicing.rs, taint_security.rs (CWE-oriented taint/security patterns).
Graph algorithms & architecture metrics
| Work | Status | rgBuilder | CLI |
|---|---|---|---|
| Page & Brin — PageRank (1998) | Implemented | centrality.rs — FastPageRank on FlatGraphIndex; adaptive gating >500k nodes | rg-build metrics --pagerank |
| Brandes — Betweenness centrality (2001) | Implemented | centrality.rs, centrality_approx.rs — exact / sampled Brandes | rg-build metrics --betweenness |
| Boldi & Vigna — HyperANF / HyperBall | Implemented | centrality_approx.rs — parallel HyperLogLog propagation | discover / migration harmonic term |
| Raghavan et al. — Label propagation (2007) + Newman modularity | Implemented | community.rs | rg-build metrics --communities |
Tests: centrality_audit.rs.
Reachability, blast radius, and the “R”
| Idea | Status | rgBuilder | CLI |
|---|---|---|---|
| Sparse pre-computed call reachability | Implemented (rgBuilder engineering) | Blast engine + compressed snapshots — see graph-storage-architecture.md | rg-build blast-radius, rg-build check |
| Rich relation matrix (30+ edge types) | Implemented | schema.rs, extraction pipeline | rg-build gql, rg-build export |
This is the core differentiator for LLM agents: deterministic reachability answers in compact JSON instead of dumping whole files into context.
Modern code graphs & LLM agents
| Work | Status | Overlap with rgBuilder | Gap / opportunity |
|---|---|---|---|
| CodexGraph (NAACL 2025) | Inspired | GQL, rich node metadata, -f json, JSON API, export | Dual-agent “write then translate” query planner not implemented — good contribution target |
| Codebadger — CPG + LLM (ICSE 2026) | Inspired | CFG + PDG + slice + taint stack (CPG-shaped) | No Joern import; interprocedural taint depth varies — see TASK_PLAN Phase 12/13 |
| TAILOR / hybrid AST+CFG+DFG | Reading | Tree-sitter AST + CFG/PDG layer | Learned embeddings not in scope today |
| Reliable Graph-RAG for Codebases (2026) | Aligned | AST-derived graph via Tree-sitter, not LLM-extracted KG | Benchmark comparisons welcome |
Security standards
| Standard | Status | rgBuilder |
|---|---|---|
| CWE / OWASP-style categories | Implemented (pattern + taint hooks) | taint.rs, taint_security.rs — SQLi (CWE-89), XSS (CWE-79), command injection (CWE-78), etc. |
Ideas we welcome
Read a paper above and want to land it in rgBuilder? High-value openings:
- Interprocedural taint with sanitizer summaries across call boundaries (Codebadger / CPG literature).
- Query planning for agents — natural language → GQL / blast-radius without token-heavy file reads (CodexGraph direction).
- Migration-specific relations — framework API pairs, deprecated symbol tracking (ReCode / environment-in-the-loop papers).
- Benchmarks — publish repro scripts comparing rgBuilder JSON output vs file-grep baselines on coolstore or your repo.
- Cross-language reachability — richer IMPORTS / IMPLEMENTS for polyglot monorepos.
Open an issue with the paper link, which row in the table above you extend, and a sketch of the CLI or JSON shape you want.
External bibliography
Research papers on code graphs, migration, LLM agents, and program analysis — for depth beyond what rgBuilder ships today.
Language & Framework Migration
-
Environment-in-the-Loop: Rethinking Code Migration with LLM-based Agents (arXiv 2026, ReCode 2026)
- arXiv Paper
- ReCode 2026 Conference
- Proposes an LLM-based environment-driven migration framework to replace linear manual processes
- Highlights that LLMs perform poorly (~30% runtime errors) without actual environment interaction
- Covers refactoring, API adaptation, and dependency updates
-
CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databases (NAACL 2025)
- arXiv
- ACL Anthology
- Integrates LLM agents with graph database interfaces for code structure-aware context retrieval
- Evaluated on CrossCodeEval, SWE-bench, and EvoCodeBench benchmarks
- Uses structural properties of graph databases for precise retrieval
- rgBuilder: Inspired — see table above (GQL + JSON; dual-agent planner is a gap)
2b. Codebadger: Bridging Code Property Graphs and Language Models (ICSE 2026)
- arXiv
- CPG + MCP + backward slicing for vulnerability analysis; reports large context reduction via slicing
- rgBuilder: Inspired — see table above (CFG/PDG/slice/taint; not Joern-compatible)
-
Code Graph Model (CGM): A Graph-Integrated Large Language Model (arXiv 2025, NeurIPS 2025)
- arXiv PDF
- OpenReview
- Built on open-source LLMs enhanced through agentless Graph RAG framework
- Four modules: Rewriter, Retriever, Reranker, and Reader
-
CodeGRAG: Bridging Natural Language and Programming Language via Graphical RAG (arXiv 2024/2025)
- arXiv
- Builds graphical views based on control flow and data flow
- Facilitates LLM understanding of code syntax
AST & Graph-Based Code Transformation
-
Reliable Graph-RAG for Codebases: AST-Derived Graphs vs LLM-Extracted Knowledge Graphs (arXiv 2026)
- arXiv
- Benchmarks AST-derived Knowledge Graph RAG built via Tree-sitter parsing
- Focuses on static code analysis and software maintenance
-
AST-Enhanced or AST-Overloaded? The Surprising Impact of Hybrid Graph Representations on Code Clone Detection (arXiv 2025)
- arXiv
- Shows ASTs dominate deep learning approaches for code analysis
- Enriches AST representations with CFGs and DFGs
-
Learning Graph-based Code Representations for Source Code (TAILOR)
- Uses Code Property Graphs (CPG) combining AST, CFG, and DFG
- Encodes both syntax and semantics
-
Improving AST-Level Code Completion with Graph Retrieval and Multi-Field Attention (ICPC 2024)
- ACM DL
- Graph-based retrieval for AST-level code completion
Language Translation & Transpilation
-
MISIM: A Neural Code Semantics Similarity System
- arXiv
- Explicitly addresses language-to-language translation (transpilation)
- Uses context-aware semantics structure (CASS) to lift semantic meaning from code syntax
- Compares classical AST representations (code2vec, code2seq) with XFG and SPT
-
User-Customizable Transpilation of Scripting Languages (DuoGlot) (OOPSLA 2023)
- ACM DL
- Translates Python to JavaScript with 90% accuracy
- User-customizable transpilation framework
-
Code Transformation by Direct Transformation of ASTs (IWST)
- ACM DL
- Direct AST transformation approaches
Dependency Management & Migration
-
DepsRAG: Managing Software Dependencies using Large Language Models (arXiv 2024)
- arXiv
- Constructs direct and transitive dependencies as Knowledge Graph
- Addresses software supply chain security
-
Knowledge Graph Based Repository-Level Code Generation (ICSE 2025, LLM4Code)
- ICSE 2025 Conference
- Industry Perspective (Quantiphi)
- Transforms code repositories into knowledge graphs
- Hybrid search systems for retrieving relevant sub-graphs
Classic Foundational Work
-
The Program Dependence Graph and Its Use in Optimization (TOPLAS 1987)
- ACM DL
- Seminal work on PDG representing data and control dependences
- Foundation for program slicing and transformation
- rgBuilder: Implemented — see classic program analysis table
-
Program Slicing (Weiser, ICSE 1981)
- ACM DL
- Original backward slicing criterion
- rgBuilder: Implemented
-
A Simple, Fast Dominance Algorithm (Cooper, Harvey & Kennedy, SPE 2001)
- DOI
- rgBuilder: Implemented
-
Enhancing program dependency graph based clone detection using approximate subgraph matching
- rgBuilder: Reading — clone detection not a CLI feature today; PDG substrate exists
Survey & Review Papers
-
Graph Retrieval-Augmented Generation: A Survey (ACM TOIS)
-
Awesome-Code-as-Agent-Harness-Papers - Curated list of papers
-
AwesomeLLM4SE (SCIS 2025) - Survey on LLMs for Software Engineering
-
A Multi-Perspective Investigation into Code Migration for Large Language Models
Industry & Applied Research
-
AI-Powered Legacy App Modernization to Reduce Transformation Costs
-
Refactoring & Migrations with AI: Smarter Code Transformation at Scale
-
LLMs for Legacy System Migration: A Modern Guide
-
How AI Knowledge Graphs Turn Legacy Code into Structured Intelligence
Key Findings from Recent Research (2025-2026)
Effectiveness Metrics
- 60-70% reduction in code-understanding time with LLM-assisted analysis
- 40-60% drop in migration effort for COBOL-to-Java/Python migrations
- Work that previously took a senior engineer three weeks now completed in three to five days
Technical Performance
- Recall improvements: Prompt enhancement yields 15.6% → 86.7% recall in refactoring opportunity identification
- DuoGlot achieves 90% translation accuracy for Python to JavaScript
- LLMs show nearly 30% runtime errors without environment interaction
Common Graph Structures
- Code Property Graphs (CPG): Combining AST + CFG + DFG dominates modern approaches
- AST-derived Knowledge Graphs: Via Tree-sitter parsing for static analysis
- Hybrid representations: Enriching ASTs with control flow and data flow graphs
Emerging Trends
- Hybrid approaches: Combining symbolic (graph-based) and neural (LLM) methods
- Environment-in-the-loop: Moving beyond static analysis to actual execution feedback
- Graph RAG: Retrieval-Augmented Generation using code graphs for context
- Repository-level understanding: Moving from file-level to full codebase comprehension
Research Venues & Conferences
Active publication venues for this research area:
- NeurIPS (Neural Information Processing Systems)
- NAACL (North American Chapter of the ACL)
- ICSE (International Conference on Software Engineering)
- OOPSLA (Object-Oriented Programming, Systems, Languages & Applications)
- TOPLAS (ACM Transactions on Programming Languages and Systems)
- ICPC (International Conference on Program Comprehension)
- ReCode (International Workshop on Refactoring and Code Evolution)
- LLM4Code Workshop
Related Topics
- Program Slicing: Using PDGs to extract relevant program subsets
- Clone Detection: Graph-based similarity for identifying code duplicates
- API Migration: Automated adaptation to new library versions
- Monolith to Microservices: Decomposition using dependency analysis
- Software Supply Chain Security: Dependency graph analysis for vulnerabilities
- Code Completion: AST-based context for intelligent suggestions
Last updated: 2026-07-06