博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
One example to understand SemFix: Program Repair via Semantic Analysis
阅读量:5334 次
发布时间:2019-06-15

本文共 1396 字,大约阅读时间需要 4 分钟。

One example to understand SemFix: Program Repair via Semantic Analysis

Basic Information

  • Authors: Hoang Duong Thien Nguyen, Dawei Qi, Abhik Roychoudhury
  • Pulication: ICSE'13
  • Description: Semantic Program Repair

Example

Buggy code:

Sameple Code

Test Suite:

Test Suite

Overview

Step 1: Fault Localization

Tarantula is applied to produce a suspiciousness ranklist of statements.

Fault Localization

Step 2: Generate Repair Constraint via Symbolic Execution

Repair Constraint

Constraints: f(1, 11, 110) > 110∧f(1, 0, 100) ≤ 100∧f(1, −20, 60) > 60

Step 3: Generate a Repair

Employ program synthesis to solve the constraint for f in order to get a concrete function. Program synthesis requires basic components (e.g. constants, “+”, “−”) as ingredients to construct the function f.

In this technique, these components are incrementally provided to program synthesis.

In the first trial, only a constant is allowed. However, no constant function can satisfy the above constraint. We then allow function f to use one “+”, i.e. f can take either the form of var1 + c or var1+var2, where var1 and var2 are in {inhibit, up_sep, down_sep} and c is an integer constant. The synthesis procedure can find a solution f(inhibit, up sep, down sep) = up sep + 100 which is a successful repair to the program in Fig. 1. Note that if “−” is used instead of “+”, we will get f(inhibit, up sep, down sep) = up sep − (−100) as repair.

转载于:https://www.cnblogs.com/XBWer/p/9221475.html

你可能感兴趣的文章
Linux远程登录
查看>>
ES6 异步编程解决方案 之 Promise 对象
查看>>
Alpha阶段第九次Scrum Meeting
查看>>
Linux自己安装redis扩展
查看>>
HDU 1016 Prime Ring Problem(dfs)
查看>>
苹果官方例子
查看>>
C#中结构体与字节流互相转换
查看>>
【矩阵快速幂】bzoj1297 [SCOI2009]迷路
查看>>
双线性插值
查看>>
TCP连接
查看>>
WIN10配置MongoDB
查看>>
iOS resign code with App Store profile and post to AppStore
查看>>
python 表格操作
查看>>
LeetCode 84. Largest Rectangle in Histogram
查看>>
LeetCode Two Sum III - Data structure design
查看>>
session和xsrf
查看>>
Cookie与Session
查看>>
配置redis外网可访问
查看>>
跟随大神实现简单的Vue框架
查看>>
Linux目录结构
查看>>