一句话:提出 C-GRiD 神经符号框架,用模型检测反例引导 LLM 迭代完善需求规约。
需求不完整与歧义是安全关键软件系统的常见缺陷来源;形式方法能提供严格正确性保证但依赖精确规约,LLM 擅长自然语言处理却缺乏逻辑一致性保证。本文提出 C-GRiD(反例引导的需求发现),用 LLM 从非形式化利益相关者意图合成初始系统模型与候选需求属性,交由符号验证器进行模型检测;验证器产生的反例被转换为结构化自然语言问句,用于向利益相关者追问缺失约束,形成迭代精化循环,在降低规约不完整性的同时保持生成物的逻辑根基。作者在 10 个基准规约上采用受控约束移除协议评估约束恢复率:完美 oracle 假设下平均约束恢复召回率为 79.2%;在模拟 25% 错误率的噪声利益相关者设置下仍保持 70.8%,并优于一次性生成与模板基线。
Incomplete and ambiguous requirements remain a common source of defects in safety-critical software systems. Formal methods provide rigorous correctness guarantees but rely on precise specifications, while Large Language Models (LLMs) enable flexible natural-language processing but lack logical consistency guarantees. Bridging the gap between informal stakeholder intent and formally verifiable specifications remains a key challenge in automated software engineering. This paper presents C-GRiD (Counterexample-Guided Requirements Discovery), a neuro-symbolic framework that integrates model checking into the requirements elicitation process. C-GRiD uses an LLM to synthesize an initial system model and a set of candidate requirements properties, which are then analyzed by a symbolic verifier. Counterexamples generated by the verifier are converted into structured natural-language queries that elicit missing constraints from stakeholders. This enables an iterative refinement loop that progressively reduces specification incompleteness while maintaining logical grounding of generated artifacts. We evaluate C-GRiD on 10 benchmark specifications using a controlled constraint-removal protocol to measure requirement recovery. Under a perfect oracle assumption, the framework achieves a mean constraint recovery recall of 79.2%. To assess robustness under realistic interaction settings, we introduce a simulated noisy stakeholder with a 25% error rate. In this setting, C-GRiD maintains a recall of 70.8%. Results show consistent improvements over one-shot and template-based baselines, demonstrating that counterexample-guided refinement can support the construction of more complete and logically grounded software specifications.
@inproceedings{paperbot12300,
title = {Neuro-symbolic Requirements Elicitation: Utilizing Formal Verification Counterexamples as Contextual Prompts},
author = {Okba Tibermacine and Chouki Tibermacine},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834379}
}