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

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 CTL-VW (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
Keywords : Model Checking Linux CTL
Type de document :
Pré-publication, Document de travail
EMN 08/2/INFO. pp16. 2008
Liste complète des métadonnées


https://hal.archives-ouvertes.fr/hal-00297708
Contributeur : Gilles Muller <>
Soumis le : jeudi 17 juillet 2008 - 10:53:05
Dernière modification le : mercredi 14 décembre 2016 - 01:07:55
Document(s) archivé(s) le : vendredi 25 novembre 2016 - 23:35:16

Fichier

EMN_INFO_02_8.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-00297708, version 2

Collections

Citation

Julien Brunel, Damien Doligez, René Hansen, Julia Lawall, Gilles Muller. A Foundation for Flow-Based Program Matching Using Temporal Logic and Model Checking. EMN 08/2/INFO. pp16. 2008. <hal-00297708v2>

Partager

Métriques

Consultations de
la notice

372

Téléchargements du document

207