One example to understand SemFix: Program Repair via Semantic Analysis

Posted xbwer

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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.

以上是关于One example to understand SemFix: Program Repair via Semantic Analysis的主要内容,如果未能解决你的问题,请参考以下文章

Understanding One-Shot NAS2018-ICML-Understanding and Simplifying One-Shot Architecture Search-论文阅

spark Failed to get main class in JAR with error null . Please specify one with --class.

10 Easy Steps to a Complete Understanding of SQL

moving-files-from-one-linux-server-to-another-using-scp

Teaching Machines to Understand Us 让机器理解我们 之二 深度学习的历史

ClickHouseHow to create index for Map Type Column or one key of it?