首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >A Foundation for Flow-Based Program Matching Using Temporal Logic and Model Checking
【24h】

A Foundation for Flow-Based Program Matching Using Temporal Logic and Model Checking

机译:使用时序逻辑和模型检查的基于流的程序匹配的基础

获取原文
获取原文并翻译 | 示例
           

摘要

Reasoning about program control-flow paths is an important func-tionality of a number of recent program matching languages andassociated searching and transformation tools. Temporal logic pro-vides a well-defined means of expressing properties of control-flowpaths in programs, and indeed an extension of the temporal logicCTL has been applied to the problem of specifying and verifyingthe transformations commonly performed by optimizing compilers.Nevertheless, in developing the Coccinelle program transformationtool for performing Linux collateral evolutions in systems code, wehave found that existing variants of CTL do not adequately supportrules that transform subterms other than the ones matching an entireformula. Being able to transform any of the subterms of a matchedterm seems essential in the domain targeted by Coccinelle. In this paper, we propose an extension to CTL named CTL-VW (CTL with variables and witnesses) that is a suitable basisfor the semantics and implementation of the Coccinelle's programmatching language. Our extension to CTL includes existentialquantification over program fragments, which allows metavariablesin the program matching language to range over different valueswithin different control-flow paths, and a notion of witnesses thatrecord such existential bindings for use in the subsequent programtransformation process. We formalize CTL-VW and describe its usein the context of Coccinelle. We then assess the performance of theapproach in practice, using a transformation rule that fixes severalreference count bugs in Linux code.
机译:程序控制流路径的推理是许多最近的程序匹配语言和关联的搜索和转换工具的重要功能。时间逻辑提供了一种表达程序中控制流路径属性的明确定义的方法,并且确实已将时间逻辑CTL的扩展应用于指定和验证优化优化编译器通常执行的转换的问题。 Coccinelle程序转换工具,用于在系统代码中执行Linux附带演变,我们发现,现有的CTL变体不能充分支持用于转换与匹配整个公式的子术语不同的子术语的规则。在Coccinelle所针对的领域中,能够转换匹配项的任何子项似乎必不可少。在本文中,我们提出了对CTL的扩展,名为CTL-VW(带有变量和见证的CTL),它是Coccinelle程序匹配语言的语义和实现的合适基础。我们对CTL的扩展包括对程序片段的存在量化,这允许程序匹配语言中的元变量在不同的控制流路径内在不同的值范围内变化,以及记录此类存在的绑定以在后续程序转换过程中使用的见证人的概念。我们将CTL-VW形式化,并在Coccinelle的上下文中描述其用法。然后,我们使用一种转换规则来评估该方法在实践中的性能,该转换规则修复了Linux代码中的多个引用计数错误。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号