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.

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

  1. Reading List on Automated Program Repair

    Some resources: https://www.monperrus.net/martin/automatic-software-repair 2017 [ ] DeepFix: Fixing ...

  2. [EMSE'17] A Correlation Study between Automated Program Repair and Test-Suite Metrics

    Basic Information Authors: Jooyong Yi, Shin Hwei Tan, Sergey Mechtaev, Marcel Böhme, Abhik Roychoudh ...

  3. [Benchmark] Codeflaws: A Programming Competition Benchmark for Evaluating Automated Program Repair Tools

    Basic Information Publication: ICSE'17 Authors: Shin Hwei Tan, Jooyong Yi, Yulis, Sergey Mechtaev, A ...

  4. How to step through your code in chrome

    By executing code one line or one function at a time, you can observe changes in the data and in the ...

  5. Google C++ Style Guide

    Background C++ is one of the main development languages used by many of Google's open-source project ...

  6. [SCOI2007] 修车

    属于我的费用流版本终于诞生了!想来还有点小激动呢…看了下模板,之后完全按照自己的想象来写,这样在考场上也不怕啦~ 某人说其实费用流就是把Dinic里的BFS换成SPFA,似乎还是比较有道理的,就是ad ...

  7. Teach Yourself Programming in Ten Years

    Teach Yourself Programming in Ten Years——用十年教会自己编程 作者:Peter Norvig 译者:刘海粟 本文原文为:http://norvig.com/21 ...

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

    C++程序设计 第一章 计算机程序和C++语言简介 1.计算机是一台能够存储并处理数据的电子设备,包含硬件和软件两部分. 2.计算机硬件由: 1)中央处理单元(Central Processing U ...

  9. Code Complete阅读笔记(三)

    2015-05-26   628   Code-Tuning Techniques    ——Even though a particular technique generally represen ...

随机推荐

  1. ios之animateWithDuration的坑

    [UIView animateWithDuration:<#(NSTimeInterval)#> delay:<#(NSTimeInterval)#> options:< ...

  2. ReactNative如何在JS中引用原生自定义控件(rn变化太快,网上很多教程有坑,这个我研究后可用,特意分享)

    直接写一个Demo例子,有相关功底的肯定明白,会对特别的地方进行提醒,本文基于https://blog.csdn.net/lintcgirl/article/details/53489490,但是按此 ...

  3. Docker实现容器具有固定IP

    Docker的网络类型 Docker安装后,默认会创建三种网络 $ docker network ls NETWORK ID NAME DRIVER SCOPE 6bdc00ad2a8d bridge ...

  4. 【不做标题党,只做纯干货】HashMap在jdk1.7和1.8中的实现

     同步首发:http://www.yuanrengu.com/index.php/20181106.html Java集合类的源码是深入学习Java非常好的素材,源码里很多优雅的写法和思路,会让人叹为 ...

  5. Spring中Mybatis的花样配置 及 原理

    摘自: https://www.jianshu.com/p/fc23c94fc439

  6. apache配置伪静态Rewrite

    1: 修改apache的httpd.conf文件 找到这一行 #LoadModule rewrite_module modules/mod_rewrite.so 改成 LoadModule rewri ...

  7. shell脚本启动语法错误syntax error near unexpected token '{

    执行shell脚本时失败,报语法错误,但脚本内容检查正常 原因为该脚本是在非Linux系统下编辑之后放到系统执行的,文件模式类型非Linux系统匹配的模式类型. 查看文件的模式类型 显示文件的模式类型 ...

  8. lua 源码分析之线程对象lua_State

    lua_State 中放的是 lua 虚拟机中的环境表.注册表.运行堆栈.虚拟机的上下文等数据. 从一个主线程(特指 lua 虚拟机中的线程,即 coroutine)中创建出来的新的 lua_Stat ...

  9. 微信小程序官方DEMO解读

    我们在开始微信小程序开发的时候,对JS,HTML等前端知识一无所知,完完全全就是门外汉在尝试一个新的方向. 在下载好开发工具,微信就已经提供了一个DEMO例子: 从程序开发的角度来看这个陌生的目录结构 ...

  10. Effective Java 第三版——76. 争取保持失败原子性

    Tips 书中的源代码地址:https://github.com/jbloch/effective-java-3e-source-code 注意,书中的有些代码里方法是基于Java 9 API中的,所 ...