paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SEGATE: Unveiling Semantic Inconsistencies between Code and Specification of String Inputs

SEGATE:揭示字符串输入在代码与规约之间的语义不一致性
ASE 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)2019匹配度 3/10 · 该论文属于静态分析与测试生成,面向字符串输入中代码与规约的语义不一致,虽涉及程序分析技术,但与用户核心关注的 LLM/Agent 与静态分析交叉、浮点程序分析、贝叶斯程序分析均无直接关联,仅属于泛化程序分析范畴。引用 0 inbox
Devika Sondhi, Rahul Purandare
crossref: 2026-09-12

AI 速览

一句话:提出面向结构化字符串输入的测试生成技术,通过推断输入定义的不一致来暴露代码与规约间的语义鸿沟。

自动化测试常以覆盖率为评价指标,但高覆盖率仍可能遗漏功能规约与代码实现之间的语义鸿沟,尤其对常用字符串数据类型表示的结构化输入,这种鸿沟源于实现或规约中缺少逻辑检查,导致输入定义不一致。作者通过对流行库缺陷的研究发现,这类鸿沟不限于输入验证检查。方法上,论文提出面向结构化字符串输入的测试生成技术,通过推断输入定义中的不一致来暴露被测方法与规约之间的语义差距;实现工具 SEGATE,结合静态分析与自动机建模推断差距并生成测试用例。评估方面,在包含 15 个流行 Java 开源库中已报告缺陷的基准数据集上,SEGATE 生成的测试能暴露 80% 的缺陷。

问题
基于覆盖率的自动化测试评估可能忽略功能规约与代码实现之间的语义不一致,尤其对字符串等结构化输入的输入定义鸿沟,且这类问题不限于输入验证检查。
方法
提出 SEGATE 工具,利用静态分析与自动机建模推断输入定义中的不一致,并据此为结构化字符串输入生成测试用例,以暴露被测方法与规约间的语义差距。
评估
在 15 个流行 Java 开源库的已报告缺陷基准数据集上评估,SEGATE 生成的测试可暴露 80% 的缺陷。
原文摘要(Abstract)

Automated testing techniques are often assessed on coverage based metrics. However, despite giving good coverage, the test cases may miss the gap between functional specification and the code implementation. This gap may be subtle in nature, arising due to the absence of logical checks, either in the implementation or in the specification, resulting in inconsistencies in the input definition. The inconsistencies may be prevalent especially for structured inputs, commonly specified using string-based data types. Our study on defects reported over popular libraries reveals that such gaps may not be limited to input validation checks. We propose a test generation technique for structured string inputs where we infer inconsistencies in input definition to expose semantic gaps in the method under test and the method specification. We assess this technique using our tool SEGATE, Semantic Gap Tester. SEGATE uses static analysis and automaton modeling to infer the gap and generate test cases. On our benchmark dataset, comprising of defects reported in 15 popular open-source libraries, written in Java, SEGATE was able to generate tests to expose 80% of the defects.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5264,
  title = {SEGATE: Unveiling Semantic Inconsistencies between Code and Specification of String Inputs},
  author = {Devika Sondhi and Rahul Purandare},
  booktitle = {ASE},
  year = {2019},
  doi = {10.1109/ase.2019.00028}
}