Debugging imperative network programs is a challenging task for developers because understanding various network modules and complicated data structures is typically time-consuming. To address the challenge, this paper presents an automated technique for repairing network programs from unit tests. Specifically, given as input a faulty network program and a set of unit tests, our approach localizes the fault through symbolic reasoning, and synthesizes a patch such that the repaired program can pass all unit tests. It applies domain-specific abstraction to simplify network data structures and utilizes modular analysis to facilitate function summary reuse for symbolic analysis. We implement the proposed techniques in a tool called NetRep and evaluate it on 10 benchmarks adapted from real-world software-defined networking controllers. The evaluation results demonstrate the effectiveness and efficiency of NetRep for repairing network programs.
翻译:对开发者来说,调试必备网络程序是一项艰巨的任务,因为了解各种网络模块和复杂的数据结构通常耗费时间。为了应对这一挑战,本文件介绍了一种自动技术,用于从单位测试中修复网络程序。具体地说,作为输入一个有缺陷的网络程序和一套单元测试,我们的方法通过象征性推理将错误地方化,并合成一个补丁,使修复后的程序能够通过所有单位测试。它应用特定域的抽象化来简化网络数据结构,并利用模块分析促进功能摘要再利用,以进行象征性分析。我们用一个名为NetRep 的工具实施拟议的技术,并根据从实际世界软件定义的网络控制器中调整的10个基准对其进行评估。评价结果显示了NetRep对网络程序进行修复的效果和效率。