Code Semantic Zooming

📅 2025-10-07
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address the weak controllability of natural language prompts over code generation and the difficulty in constructing complex systems in LLM-assisted programming, this paper proposes Semantic Hierarchical Programming (SHP): a multi-level abstraction framework mediated by pseudocode, enabling interactive “semantic zooming” within VS Code—i.e., progressively refining high-level pseudocode into executable code. We formally define semantic zooming for the first time, integrating LLM-based generation, structured pseudocode parsing, and iterative refinement. An open-source VS Code extension implementing SHP is developed. Evaluation on two real-world development tasks demonstrates that SHP significantly improves code controllability, traceability, and development efficiency, effectively balancing expressive natural language input with precise programmatic control.

Technology Category

Application Category

📝 Abstract
Recent advances in Large Language Models (LLMs) have introduced a new paradigm for software development, where source code is generated directly from natural language prompts. While this paradigm significantly boosts development productivity, building complex, real-world software systems remains challenging because natural language offers limited control over the generated code. Inspired by the historical evolution of programming languages toward higher levels of abstraction, we advocate for a high-level abstraction language that gives developers greater control over LLM-assisted code writing. To this end, we propose Code Semantic Zooming, a novel approach based on pseudocode that allows developers to iteratively explore, understand, and refine code across multiple layers of semantic abstraction. We implemented Code Semantic Zooming as a VS Code extension and demonstrated its effectiveness through two real-world case studies.
Problem

Research questions and friction points this paper is trying to address.

Proposes pseudocode-based abstraction for LLM-assisted code generation control
Enables iterative exploration and refinement across semantic abstraction layers
Addresses limited developer control in natural language-driven programming paradigms
Innovation

Methods, ideas, or system contributions that make the work stand out.

Pseudocode-based approach for code abstraction layers
VS Code extension enabling iterative code refinement
Multi-layer semantic control over LLM-generated code
🔎 Similar Papers
No similar papers found.