Refactorings must not alter the program's functionality. However, not all refactorings fulfill this requirement. Hence, one must explicitly check that a refactoring does not alter the functionality. Since one rarely has a formal specification of the program's behavior, we utilize the original program as functional specification. Then, we check whether the original and refactored program are functionally equivalent. To this end, we apply a common idea and reduce equivalence checking to program verification. To increase efficiency, our equivalence checker PEQcheck constructs one verification task per refactored code segment instead of one per function as typically done by prior work. In addition, PEQcheck considers the context of the code segments. For instance, only variables that are modified and live are required to be equivalent and read-only variables may be shared between original and refactored code segments. We show that PEQcheck is sound.Moreover, our evaluation testifies that the localized and context-aware checking performed by \peqcheck can indeed be beneficial.


翻译:重新设定不能改变程序的功能。 但是, 并非所有的重新设定都符合此要求。 因此, 人们必须明确检查一个重新设定不会改变功能。 因为很少有人能正式指定程序的行为, 我们使用原始程序作为功能性规范。 然后, 我们检查原始和再设定程序是否在功能上等同。 为此, 我们应用了一个共同的想法, 并减少对等性检查程序验证。 为了提高效率, 我们的等同检查器 PEQcheck 将每个重新设定的代码部分构建一个核查任务, 而不是先前工作通常完成的每个功能。 此外, PEQ check 考虑代码部分的上下文。 例如, 仅需要修改和实时变量, 才能在原始和再设定代码部分之间共享。 我们显示 PEQ check是健全的。 更新后, 我们的评估证明\peqeck 所执行的本地和上下文检查确实有益 。

0
下载
关闭预览

相关内容

简明扼要!Python教程手册,206页pdf
专知会员服务
48+阅读 · 2020年3月24日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
160+阅读 · 2019年10月12日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
强化学习最新教程,17页pdf
专知会员服务
181+阅读 · 2019年10月11日
2019年机器学习框架回顾
专知会员服务
36+阅读 · 2019年10月11日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
【TED】生命中的每一年的智慧
英语演讲视频每日一推
10+阅读 · 2019年1月29日
逆强化学习-学习人先验的动机
CreateAMind
16+阅读 · 2019年1月18日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【推荐】YOLO实时目标检测(6fps)
机器学习研究会
20+阅读 · 2017年11月5日
Arxiv
0+阅读 · 2021年5月14日
Arxiv
0+阅读 · 2021年5月13日
VIP会员
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
【TED】生命中的每一年的智慧
英语演讲视频每日一推
10+阅读 · 2019年1月29日
逆强化学习-学习人先验的动机
CreateAMind
16+阅读 · 2019年1月18日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【推荐】YOLO实时目标检测(6fps)
机器学习研究会
20+阅读 · 2017年11月5日
Top
微信扫码咨询专知VIP会员