一句话:用神经网络二元分类器学习数据结构合法性不变式,替代动态不变式检测,提升合法/非法对象判别与缺陷发现能力。
该论文提出一种区分数据结构对象合法与非法实例的技术。其核心思想是构建人工神经网络(具体为二元分类器),并将其训练用于识别数据结构的合法与非法实例;训练完成后,所得分类器可代替数据结构的不变式,用于发现操纵该结构的程序中的(不)正确行为。为生成训练所需的合法对象,作者随机执行一组假定正确的对象构建例程;非法实例则通过为对象字段赋值来构造,即赋予那些在产生合法实例的假定正确执行中从未被观察到可行的字段值。作者在数据结构基准上进行了实验评估,结果表明该学习技术生成的分类器在合法/非法对象分类准确率上显著优于一种动态不变式检测技术,并带来了更好的缺陷发现效果。
We present a technique to distinguish valid from invalid data structure objects. The technique is based on building an artificial neural network, more precisely a binary classifier, and training it to identify valid and invalid instances of a data structure. The obtained classifier can then be used in place of the data structure's invariant, in order to attempt to identify (in)correct behaviors in programs manipulating the structure. In order to produce the valid objects to train the network, an assumed-correct set of object building routines is randomly executed. Invalid instances are produced by generating values for object fields that "break" the collected valid values, i.e., that assign values to object fields that have not been observed as feasible in the assumed-correct executions that led to the collected valid instances. We experimentally assess this approach, over a benchmark of data structures. We show that this learning technique produces classifiers that achieve significantly better accuracy in classifying valid/invalid objects compared to a technique for dynamic invariant detection, and leads to improved bug finding.
@inproceedings{MolinaDPRAF19,
title = {Training Binary Classifiers as Data Structure Invariants},
author = {Facundo Molina and Renzo Degiovanni and Pablo Ponzio and German Regis and Nazareno Aguirre and Marcelo Frias},
booktitle = {ICSE},
year = {2019},
doi = {10.1109/icse.2019.00084}
}