Docs / further-reading · Edit on GitHub

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

WorkStatusrgBuilderCLI / docs
Ferrante et al. — Program Dependence Graph (TOPLAS 1987)Implementedpdg.rs — data + control depsinspect, slice
Weiser — Program slicing (ICSE 1981)Implementedslicing.rs, interprocedural_slicing.rsrg-build sliceUser Guide §8
Reaching-definitions dataflow (standard compiler analysis)Implementeddataflow.rs → PDG data edgesvia discover --with-cfg
Cooper, Harvey & Kennedy — Simple fast dominance (SPE 2001)Implementeddominance.rs (iterative CHK-style)rg-build inspect
Control-flow graphsImplementedcfg.rs, cfg_builder.rsdiscover --with-cfg, inspect
Forward taint (source → sink + sanitizers)Implementedtaint.rsrg-build slice --taintIntroduction § Taint

Tests: slicing.rs, taint_security.rs (CWE-oriented taint/security patterns).

Graph algorithms & architecture metrics

WorkStatusrgBuilderCLI
Page & Brin — PageRank (1998)Implementedcentrality.rsFastPageRank on FlatGraphIndex; adaptive gating >500k nodesrg-build metrics --pagerank
Brandes — Betweenness centrality (2001)Implementedcentrality.rs, centrality_approx.rs — exact / sampled Brandesrg-build metrics --betweenness
Boldi & Vigna — HyperANF / HyperBallImplementedcentrality_approx.rs — parallel HyperLogLog propagationdiscover / migration harmonic term
Raghavan et al. — Label propagation (2007) + Newman modularityImplementedcommunity.rsrg-build metrics --communities

Tests: centrality_audit.rs.

Reachability, blast radius, and the “R”

IdeaStatusrgBuilderCLI
Sparse pre-computed call reachabilityImplemented (rgBuilder engineering)Blast engine + compressed snapshots — see graph-storage-architecture.mdrg-build blast-radius, rg-build check
Rich relation matrix (30+ edge types)Implementedschema.rs, extraction pipelinerg-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

WorkStatusOverlap with rgBuilderGap / opportunity
CodexGraph (NAACL 2025)InspiredGQL, rich node metadata, -f json, JSON API, exportDual-agent “write then translate” query planner not implemented — good contribution target
Codebadger — CPG + LLM (ICSE 2026)InspiredCFG + PDG + slice + taint stack (CPG-shaped)No Joern import; interprocedural taint depth varies — see TASK_PLAN Phase 12/13
TAILOR / hybrid AST+CFG+DFGReadingTree-sitter AST + CFG/PDG layerLearned embeddings not in scope today
Reliable Graph-RAG for Codebases (2026)AlignedAST-derived graph via Tree-sitter, not LLM-extracted KGBenchmark comparisons welcome

Security standards

StandardStatusrgBuilder
CWE / OWASP-style categoriesImplemented (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:

  1. Interprocedural taint with sanitizer summaries across call boundaries (Codebadger / CPG literature).
  2. Query planning for agents — natural language → GQL / blast-radius without token-heavy file reads (CodexGraph direction).
  3. Migration-specific relations — framework API pairs, deprecated symbol tracking (ReCode / environment-in-the-loop papers).
  4. Benchmarks — publish repro scripts comparing rgBuilder JSON output vs file-grep baselines on coolstore or your repo.
  5. 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

  1. 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
  2. CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databases (NAACL 2025)

    • arXiv
    • PDF
    • 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)
  1. 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
  2. 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

  1. 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
  2. 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
  3. Learning Graph-based Code Representations for Source Code (TAILOR)

    • PDF
    • Uses Code Property Graphs (CPG) combining AST, CFG, and DFG
    • Encodes both syntax and semantics
  4. 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

  1. 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
  2. User-Customizable Transpilation of Scripting Languages (DuoGlot) (OOPSLA 2023)

    • ACM DL
    • Translates Python to JavaScript with 90% accuracy
    • User-customizable transpilation framework
  3. Code Transformation by Direct Transformation of ASTs (IWST)

    • ACM DL
    • Direct AST transformation approaches

Dependency Management & Migration

  1. DepsRAG: Managing Software Dependencies using Large Language Models (arXiv 2024)

    • arXiv
    • Constructs direct and transitive dependencies as Knowledge Graph
    • Addresses software supply chain security
  2. Knowledge Graph Based Repository-Level Code Generation (ICSE 2025, LLM4Code)

Classic Foundational Work

  1. The Program Dependence Graph and Its Use in Optimization (TOPLAS 1987)

  2. Program Slicing (Weiser, ICSE 1981)

  3. A Simple, Fast Dominance Algorithm (Cooper, Harvey & Kennedy, SPE 2001)

  4. Enhancing program dependency graph based clone detection using approximate subgraph matching

    • PDF
    • 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