One example to understand SemFix: Program Repair via Semantic Analysis

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:

Test Suite:

Overview

Step 1: Fault Localization

Tarantula is applied to produce a suspiciousness ranklist of statements.

Step 2: Generate Repair Constraint via Symbolic Execution


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

时间: 2024-10-09 05:50:10

One example to understand SemFix: Program Repair via Semantic Analysis的相关文章

常见算法和例题

第3章  算法与程序设计模块 3.1  算    法 算法是对特定问题求解步骤的一种描述,它是指令的有限序列,其中每一条指令表示一个或多个操作. 常用的算法:列举了穷举搜索.递归.回溯.递推.模拟.分治.贪心.深度优先搜索.广度优先搜索等几种较为常用的算法,没有做过多的描述,一旦给出具体描述,容易使内容加深,产生严重学科取向的引导,符合教育部普通高中课程方案的特点,对于这些必需的方法和思想,关键不在于学生能不能,而在于教师是否想到,是否有过关注,引发学生对系统方法和思想的思考,重视建立编程思想,

Simple Expert Advisor

https://book.mql4.com/samples/expert WebTerminal Documentation Book TA Code Base Articles Freelance Market Signals VPS Forum Login MQL4 Book  Simple Programs in MQL4  Simple Expert Advisor Usage of Technical Indicators Simple Expert Advisor Creation

Teach Yourself Programming in Ten Years

Teach Yourself Programming in Ten Years Peter Norvig Why is everyone in such a rush? Walk into any bookstore, and you'll see how to Teach Yourself Java in 24 Hours alongside endless variations offering to teach C, SQL, Ruby, Algorithms, and so on in

PatentTips - Object-oriented processor architecture and operating method

BACKGROUND OF THE INVENTION The present invention relates to processors and computer systems. More specifically, the present invention relates to an object-oriented processor architecture and operating method. A conventional central processing unit (

Sonar 常用代码规则整理

摘要:公司部署了一套sonar,经过一段时间运行,发现有一些问题出现频率很高,因此有必要将这些问题进行整理总结和分析,避免再次出现类似问题. 作者原创技术文章,转载请注明出处id: 83 name: A method/constructor shouldnt explicitly throw java.lang.Exception type: CODE SMELL severity: MAJOR Comment: It is unclear which exceptions that can b

Google C++ 代码规范

Google C++ Style Guide Table of Contents Header Files Self-contained Headers The #define Guard Forward Declarations Inline Functions Names and Order of Includes Scoping Namespaces Unnamed Namespaces and Static Variables Nonmember, Static Member, and

计算机程序和C++语言简介

C++程序设计 第一章 计算机程序和C++语言简介 1.计算机是一台能够存储并处理数据的电子设备,包含硬件和软件两部分. 2.计算机硬件由: 1)中央处理单元(Central Processing Unit,CPU) 2)内存(主存) 3)外存储设备(磁盘.光盘.磁带) 4)输入输出设备(显示器.键盘.鼠标.打印机) 5)通信设备(调制解调器.网卡) 这些设备通过总线连接起来.数据传输通过总线进行.[总线又分为控制总线.数据总线.地址总线] 3.CPU 1)cpu通常由两部分组成:控制单元(co

Code Complete阅读笔记(二)

2015-03-06   328   Unusual Data Types    ——You can carry this technique to extremes,putting all the variables in your program into one big,juicy variable and then passingit everywhere.Careful programmers avoid bundling data any more than is logically

用十年自学编程(转)

Teach Yourself Programming in Ten Years Peter Norvig Why is everyone in such a rush? Walk into any bookstore, and you'll see how to Teach Yourself Java in 24 Hours alongside endless variations offering to teach C, SQL, Ruby, Algorithms, and so on in