| A foundation for flow-based program matching: using temporal logic and model checking |
| Full text |
Pdf
(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 |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 25, Downloads (12 Months): 187, Citation Count: 1
|
|
|
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
|
Simon Peyton Jones , Dimitrios Vytiniotis , Stephanie Weirich , Geoffrey Washburn, Simple unification-based type inference for GADTs, Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming, September 16-21, 2006, Portland, Oregon, USA
|
| |
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
|
Tom Schrijvers , Simon Peyton Jones , Manuel Chakravarty , Martin Sulzmann, Type checking with open type functions, Proceeding of the 13th ACM SIGPLAN international conference on Functional programming, September 20-28, 2008, Victoria, BC, Canada
|
 |
12
|
|
| |
13
|
|
 |
14
|
|
 |
15
|
Martin Sulzmann , Manuel M. T. Chakravarty , Simon Peyton Jones , Kevin Donnelly, System F with type equality coercions, Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation, January 16-16, 2007, Nice, Nice, France
[doi> 10.1145/1190315.1190324]
|
| |
16
|
|
 |
17
|
|
 |
18
|
Hongwei Xi , Chiyan Chen , Gang Chen, Guarded recursive datatype constructors, Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.224-235, January 15-17, 2003, New Orleans, Louisiana, USA
|
CITED BY
|
|
Julia L. Lawall , Gilles Muller , Nicolas Palix, Enforcing the use of API functions in linux code, Proceedings of the 8th workshop on Aspects, components, and patterns for infrastructure software, March 02-02, 2009, Charlottesville, Virginia, USA
|
|