Doc2Spec: 문법 귀납을 통해 자연어로부터 정형 프로그래밍 명세 합성하기
Doc2Spec: Synthesizing Formal Programming Specifications from Natural Language via Grammar Induction
한국어 초록
API 구현 및 사용이 자연어 프로그래밍 규칙을 준수하도록 보장하는 것은 소프트웨어의 정확성, 보안성 및 신뢰성에 매우 중요합니다. 정형 검증(Formal verification)은 강력한 보장을 제공할 수 있지만 정밀한 명세를 필요로 하며, 이를 수작업으로 작성하는 것은 어렵고 비용이 많이 듭니다. 이러한 문제를 해결하기 위해, 자연어 API 규칙으로부터 도메인 특화 문법을 자동으로 유도(induce)하고 이를 활용하여 명세 생성을 유도하는 멀티 에이전트(multi-agent) 프레임워크인 Doc2Spec을 제안합니다. Doc2Spec은 도메인에 구애받지 않는 논리적 뼈대를 문법 템플릿으로 고정하고, 대규모 언어 모델(LLM)에 프롬프트를 제공하여 도메인 특화 술어(predicate)와 정렬(sort)을 추론하며, 생성된 문법 내에서 각 규칙을 정형화합니다. 이를 통해 신뢰할 수 없는 원샷(one-shot) 변환을 제약되고 검사 가능한 단계들의 시퀀스로 전환합니다. Solidity와 Rust를 아우르는 6개 벤치마크 전반에서 Doc2Spec은 문법 유도가 없거나 이를 단계화되지 않은 단일 단계로 수행하는 베이스라인 대비 정밀도를 0.28, 재현율을 0.37 향상시켜, 문법 기반 정형화 및 단계별 파이프라인의 이점을 입증했습니다. 나아가 정형화된 규칙을 통해 기호 실행(symbolic-execution) 도구가 이전에 알려지지 않았던 142개의 규칙 위반을 발견할 수 있도록 지원함으로써 규칙의 정확성과 실질적인 유용성을 확인했습니다.
원문 초록
Ensuring that API implementations and usage comply with natural language programming rules is critical for software correctness, security, and reliability. Formal verification can provide strong guarantees but requires precise specifications, which are difficult and costly to write manually. To address this challenge, we present Doc2Spec, a multi-agent framework that automatically induces a domain-specific grammar from natural-language API rules and uses it to guide specification generation. Doc2Spec fixes a domain-agnostic logical skeleton as a grammar template, prompts LLMs to infer domain-specific predicates and sorts, and formalizes each rule within the resulting grammar, turning an unreliable one-shot translation into a sequence of constrained, checkable steps. Across six benchmarks spanning Solidity and Rust, Doc2Spec improves precision by 0.28 and recall by 0.37 over baselines that lack grammar induction or perform it in one unstaged step, demonstrating the benefits of grammar-guided formalization and the staged pipeline. Moreover, its formalized rules enable symbolic-execution tools to uncover 142 previously unknown rule violations, confirming the rules' correctness and practical usefulness.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
Proxy OPD: On-Policy Distillation with Transferable Relative Proxy Update for Large Language Models
Code-Anchored Review Feedback Improves Correctness and Lowers Hosted Editing Cost on Large R Files
GameReplica: 비전-언어 에이전트를 위한 블랙박스 시각적 게임 복제 벤치마크
GameReplica: A Benchmark for Black-Box Visual Game Replication by Vision-Language Agents
PACE-dLLM: 확산 언어 모델을 위한 신뢰도 절벽 추정 기반 탄력적 블록 디코딩
PACE-dLLM: Elastic Block Decoding via Confidence Cliff Estimation for Diffusion Language Models
HierFlow: Hierarchical Coupled Dual-Space Search for Automatic Agentic Workflow Generation
구조화된 워크플로우는 대규모 언어 모델(LLM)이 복잡한 문제를 해결할 수 있게 해주지만, 이를 자동으로 생성하는 것은 방대한 조합적 탐색 공간으로 인해 심각하게 저해되며, 이는 종종 유연하지 않고 자원을 많이 소모하는 오프라인 학습 의존성을 초래한다. 이를 해결하기 위해, 우리는 워크플로우 생성을 상위 토폴로지 층이 하위 작업 경계를 규정하고 하위 수준의 실행 결과가 토폴로지 자체를 능동적으로 재형성하는, 토폴로지와 실행이 맞물린 탐색 패러다임으로 개념화한다. 이 기반 위에서, 우리는 피드백 기반 토폴로지 조정과 하위 워크플로우 최적화를 위한 빠른 MCTS(Monte Carlo Tree Search) 기반 트리 탐색을 결합하여 에이전트형 워크플로우 설계를 자동화하는, 학습 불필요·테스트 시점 계층적 탐색 아키텍처인 HierFlow를 제안한다. HierFlow는 맥락적 필요에 따라 실행 수준 탐색을 선택적으로 트리거하는 지능형 게이팅 모듈을 통해 효율성을 극대화하며, 우리는 작업 간 결합 정도가 계층적 분할의 효과에 미치는 영향을 상세히 분석함으로써 이 메커니즘을 추가로 뒷받침한다. 질의응답, 수학적 추론, 코드 생성 벤치마크에 걸친 종합적인 테스트는 HierFlow가 강력한 베이스라인을 지속적으로 능가하며, 추가 학습 부담 없이 고품질 결과와 계산 효율성의 최적 균형을 제공함을 확인한다.
Solver-Aware Decompositions for Programming-by-Example: When Dividing Requires Knowing How to Conquer
토론
이 논문과 연결된 포럼 글이 아직 없습니다.