A foundation for flow-based matching: using temporal logic and model checking

Julien Pierre Manuel Brunel, Damien Doligez, René Rydhof Hansen, Julia Laetitia Lawall, Gilles Muller

25 Citations (Scopus)

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 Coccinelle’s 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.
Original languageEnglish
Title of host publicationPOPL '09 : Proceedings of the 36th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
Number of pages12
PublisherAssociation for Computing Machinery
Publication date2009
Pages114-126
ISBN (Print)978-1-60558-379-2
DOIs
Publication statusPublished - 2009
EventAnnual Symposium on Principles of Programming Languages - Savannah, Georgia, United States
Duration: 21 Jan 200923 Jan 2009
Conference number: 36

Conference

ConferenceAnnual Symposium on Principles of Programming Languages
Number36
Country/TerritoryUnited States
CitySavannah, Georgia
Period21/01/200923/01/2009
SeriesSIGPLAN Notices
Number44(1)
ISSN0362-1340

Fingerprint

Dive into the research topics of 'A foundation for flow-based matching: using temporal logic and model checking'. Together they form a unique fingerprint.

Cite this