ACM Home Page
Please provide us with feedback. Feedback
A foundation for flow-based program matching: using temporal logic and model checking
Full text PdfPdf (693 KB)
Source
Annual Symposium on Principles of Programming Languages archive
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Savannah, GA, USA
SESSION: Static analysis I table of contents
Pages 114-126  
Year of Publication: 2009
ISBN:978-1-60558-379-2
Also published in ...
Authors
Julien Brunel  DIKU, University of Copenhagen, Copenhagen, Denmark
Damien Doligez  INRIA, Gallium Project, Le Chesnay, France
René Rydhof Hansen  Aalborg University, Aalborg, Denmark
Julia L. Lawall  University of Copenhagen, Copenhagen, Denmark
Gilles Muller  Ecole des Mines de Nantes, Nantes, France
Sponsors
ACM: Association for Computing Machinery
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 25,   Downloads (12 Months): 187,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1480881.1480897
What is a DOI?

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.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
James Cheney and Ralf Hinze. First-class phantom types. Technical Report CUCIS TR2003-1901, Cornell University, 2003.
 
3
4
 
5
 
6
 
7
Simon Peyton Jones, Mark P. Jones, and Erik Meijer. Type classes: exploring the design space. In Haskell Workshop, Amsterdam, June 1997.
8
 
9
 
10
Tom Schrijvers and Martin Sulzmann. Unified Type Checking for Type Classes and Type Functions, 2008. Poster at the International Conference on Functional Programming (ICFP'08).
11
12
 
13
14
15
 
16
17
18


Collaborative Colleagues:
Julien Brunel: colleagues
Damien Doligez: colleagues
René Rydhof Hansen: colleagues
Julia L. Lawall: colleagues
Gilles Muller: colleagues