Skip to content
Book Open access

Requirement-Guided Test-Driven Development for Modular Code Generation with Large Language Model

Jul 2026 · SIGSOFT FSE Companion · 0 citations · 13 references
Computer Science

Abstract

Large Language Models (LLMs) show promise for synthesizing software directly from natural-language problem descriptions. However, LLM-based code synthesis remains unreliable: models may hallucinate features, generated tests and code may diverge, and repairs often require manual effort. We present a test-driven pipeline that extracts functional requirements (FR) from a problem description, resolves dependencies, maps them into a modular Model-View-Controller (MVC) structure, and generates tests before code, followed by bounded, execution-driven refinement. We evaluate execution reliability with Pass@1 and refine@k, and assess the faithfulness of FR extraction using NLI-based entailment.

Read PDF