一句话:将基于频谱与变异的故障定位技术适配到 Prolog,并实现为开源命令行工具 ProFL,输出可疑子句。
Prolog 是一种声明式一阶逻辑语言,适合实现规则密集型系统,但程序正确编写困难。SWI-Prolog 的 plunit 单元测试框架能系统检查正确性,却只能告知程序有误,无法指出错误位置。本文提出 ProFL,将面向命令式程序的故障定位技术迁移到 Prolog 声明式环境。ProFL 以错误 Prolog 程序和 plunit 测试套件为输入,采用两种技术进行定位:ProFLs 基于频谱,ProFLm 基于变异,最终向用户返回可疑程序子句列表。作者用 Python 实现了命令行工具并在 GitHub 开源。基准程序上的实验结果表明,ProFL 能够准确定位故障。
Prolog is a declarative, first-order logic that has been used in a variety of domains to implement heavily rules-based systems. However, it is challenging to write a Prolog program correctly. Fortunately, the SWI-Prolog environment supports a unit testing framework, plunit, which enables developers to systematically check for correctness. However, knowing a program is faulty is just the first step. The developer then needs to fix the program which means the developer needs to determine what part of the program is faulty. ProFL is a fault localization tool that adapts imperative-based fault localization techniques to Prolog’s declarative environment. ProFL takes as input a faulty Prolog program and a plunit test suite. Then, ProFL performs fault localization and returns a list of suspicious program clauses to the user. Our toolset encompasses two different techniques: ProFLs, a spectrum-based technique, and ProFLm, a mutation-based technique. This paper describes our Python implementation of ProFL, which is a command-line tool, released as an open-source project on GitHub (https://github.com/geoorge1d127/ProFL). Our experimental results show ProFL is accurate at localizing faults in our benchmark programs.
DOI 原文 ·
@inproceedings{paperbot6078,
title = {ProFL: a fault localization framework for Prolog},
author = {George Thompson and Allison K. Sullivan},
booktitle = {ISSTA},
year = {2020},
doi = {10.1145/3395363.3404367}
}