A foundation for flow-based program matching

Author:

Brunel Julien1,Doligez Damien2,Hansen René Rydhof3,Lawall Julia L.4,Muller Gilles5

Affiliation:

1. DIKU, University of Copenhagen, Copenhagen, Denmark

2. INRIA, Gallium Project, Le Chesnay, France

3. Aalborg University, Aalborg, Denmark

4. University of Copenhagen, Copenhagen, Denmark

5. Ecole des Mines de Nantes, Nantes, France

Abstract

Reasoning about program control-flow paths is an important functionality of a number of recent program matching languages and associated searching and transformation tools. Temporal logic provides a well-defined means of expressing properties of control-flow paths in programs, and indeed an extension of the temporal logic CTL has been applied to the problem of specifying and verifying the transformations commonly performed by optimizing compilers. Nevertheless, in developing the Coccinelle program transformation tool for performing Linux collateral evolutions in systems code, we have found that existing variants of CTL do not adequately support rules that transform subterms other than the ones matching an entire formula. Being able to transform any of the subterms of a matched term seems essential in the domain targeted by Coccinelle. In this paper, we propose an extension to CTL named CTLVW (CTL with variables and witnesses) that is a suitable basis for the semantics and implementation of the Coccinelles program matching language. Our extension to CTL includes existential quantification over program fragments, which allows metavariables in the program matching language to range over different values within different control-flow paths, and a notion of witnesses that record such existential bindings for use in the subsequent program transformation process. We formalize CTL-VW and describe its use in the context of Coccinelle. We then assess the performance of the approach in practice, using a transformation rule that fixes several reference count bugs in Linux code.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Cited by 32 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Two-Stage Patch Synthesis for API Migration from Single API Usage Example;2022 29th Asia-Pacific Software Engineering Conference (APSEC);2022-12

2. Record and replay of online traffic for microservices with automatic mocking point identification;Proceedings of the 44th International Conference on Software Engineering: Software Engineering in Practice;2022-05-21

3. Towards automatically repairing compatibility issues in published Android apps;Proceedings of the 44th International Conference on Software Engineering;2022-05-21

4. Record and Replay of Online Traffic for Microservices with Automatic Mocking Point Identification;2022 IEEE/ACM 44th International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP);2022-05

5. AndroEvolve: automated Android API update with data flow analysis and variable denormalization;Empirical Software Engineering;2022-03-17

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3