Stage de DEA:
Adaptation des difference bound matrices à l'analyse de programmes

[English version]

Présentation

Ce stage a été effectué dans le cadre du DEA Sémantique, preuves et langages au sein du LIENS, le laboratoire d'informatique de l' ENS de Paris, sous la direction de Patrick Cousot.

Mots-clefs: analyse de programmes, interprétation abstraite, difference bound matrices (DBM), invariants numériques.

Résumé

Nous présentons, dans ce rapport, une nouvelle méthode d'analyse statique de programmes. Cette analyse calcule de manière automatique des invariants sur les variables numériques d'un programme, à l'instar des méthodes classiques d'analyse d'intervalles ou d'inégalités linéaires. Plus précisément, les invariants que nous trouvons sont de la forme ±x ±yc (que nous appellerons contrainte de somme ou de différence de deux variables), où x et y sont des valeurs de variables et c est une constante numérique.

Nous utilisons des difference bound matrices pour représenter les ensembles de contraintes de somme ou de différence de deux variables. Leur complexité en espace est, au pire, en O(n2), n étant le nombre de variables dans le programme, et les algorithmes qui les manipulent ont une complexité, au pire, en O(n3). La sûreté de cette analyse est prouvée dans le cadre formel de l'interprétation abstraite en utilisant des correspondances de Galois entre treillis complets.

Bien que les difference bound matrices soient très utilisées pour le model-checking d'automates temporisés, il nous a fallu introduire de nombreux opérateurs (élargissement, affectation, garde,...) pour les rendre utilisables dans le cadre de l'interprétation abstraite. De plus, comme les difference bound matrices n'ont été utilisées, jusqu'à présent, que pour représenter les contraintes de la forme x-yc, nous avons dû les étendre pour pouvoir représenter les contraintes de sommes aussi bien que les contraintes de différence de deux variables.

[Exemple de domaine]
Domaine d'un ensemble de contraintes de somme ou de différence de deux variables.

Rapport de DEA

Implémentation

Ce travail théorique à donné le jour à une une bibliothèque (page en anglais), disponible gratuitement.

Bibliographie

[1] Thomas Cormen, Charles Leiserson, and Ronald Rivest. Introduction to Algorithms. The MIT Press, 1990.
[2] Kim Larsen, Fredrik Larsson, Paul Pettersson, and Wang Yi. Efficient verification of real-time systems : Compact data structure and state-space reduction. http://www.docs.uu.se/docs/rtmv/papers/llpw-rtss97.ps.gz.
[3] S. Yovine. Model-checking timed automata. In Embedded Systems, Lecture Notes in Computer Science. G.Rozenberg and F.Vaandrager eds., 1998. http://www-verimag.imag.fr/~yovine/articles/rts_embedded98.html.
[4] P. Cousot and R. Cousot. Abstract interpretation and application to logic programs. Journal of Logic Programming, 13(2-3):103-179, 1992. http://www.di.ens.fr/~cousot/COUSOTpapers/JLP92.shtml.
[5] P. Cousot. The calculational design of a generic abstract interpreter. In M. Broy and R. Steinbrüggen, editors, Calculational System Design. NATO ASI Series F. IOS Press, Amsterdam, 1999. http://www.di.ens.fr/~cousot/COUSOTpapers/Marktoberdorf98.shtml.
[6] P. Cousot. Méthodes itératives de construction et d'approximation de points fixes d'opérateurs monotones sur un treillis, analyse sémantique de programmes. PhD thesis, Thse d'état ès sciences mathématiques, Université scientifique et medicale de Grenoble,France, 1978.
[7] P. Cousot and R. Cousot. Static determination of dynamic properties of programs. In Proceedings of the Second International Symposium on Programming, pages 106-130. Dunod, Paris, France, 1976. http://www.di.ens.fr/~cousot/COUSOTpapers/ISOP76.shtml.
[8] P. Cousot and R. Cousot. Comparing the Galois connection and widening/narrowing approaches to abstract interpretation, invited paper. In M. Bruynooghe and M. Wirsing, editors, Proceedings of the International Workshop Programming Language Implementation and Logic Programming, PLILP'92,, Leuven, Belgium, 13-17 August 1992, Lecture Notes in Computer Science 631, pages 269-295. Springer-Verlag, Berlin, Germany, 1992. http://www.di.ens.fr/~cousot/COUSOTpapers/PLILP92.shtml.
[9] P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In Conference Record of the Fifth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 84-97, Tucson, Arizona, 1978. ACM Press, New York, NY.
[10] P. Cousot. Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Theoretical Computer Science, 2000. http://www.di.ens.fr/~cousot/COUSOTpapers/TCS00.shtml.
[11] P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 238-252, Los Angeles, California, 1977. ACM Press, New York, NY. http://www.di.ens.fr/~cousot/COUSOTpapers/POPL77.shtml.
[12] R. Bellman. On a routing problem. In Quarterly of Applied Mathematics, volume 16, pages 87-90, 1958.
[13] David Monniaux. Abstract interpretation of probabilistic semantics. In Seventh International Static Analysis Symposium (SAS'00), number 1824 in Lecture Notes in Computer Science. Springer-Verlag, 2000. http://www.di.ens.fr/~monniaux/biblio/Monniaux_SAS00.ps.gz.
[14] François Bourdoncle. Abstract debugging of higher-order imperative languages. In SIGPLAN '93 Conference on Programming Language Design and Implementation, pages 46-55, 1993. http://www.cma.ensmp.fr/Francois.Bourdoncle/pldi93.html.
[15] Hassen Saïdi. Model checking guided abstraction and analysis. In Jens Palsberg, editor, Seventh International Static Analysis Symposium (SAS'00), number 1824 in Lecture Notes in Computer Science, pages 377-396. Springer-Verlag, 2000. http://www.csl.sri.com/~saidi/PAPERS/sas00.html.



Antoine Miné
mine@di.ens.fr.REMOVE-THIS-ANTISPAM