Formal Validation of Pattern Matching Code - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2005

Formal Validation of Pattern Matching Code


When addressing the formal validation of generated software, two main alternatives consist either to prove the correctness of compilers or to directly validate the generated code. Here, we focus on directly proving the correctness of compiled code issued from powerful pattern matching constructions typical of ML like languages or rewrite based languages such as ELAN, MAUDE or Tom. In this context, our first contribution is to define a general framework for anchoring algebraic pattern-matching capabilities in existing languages like C, Java or\ML. Then, using a just enough powerful intermediate language, we formalize the behavior of compiled code and define the correctness of compiled code with respect to pattern-matching behavior. This allows us to prove the equivalence of compiled code correctness with a generic first-order proposition whose proof could be achieved via a proof assistant or an automated theorem prover. We then extend these results to the multi-match situation characteristic of the ML like languages. The whole approach has been implemented on top of the Tom compiler and used to validate the syntactic matching code of the Tom compiler itself.
Fichier principal
Vignette du fichier
KirchnerMR-PPDP2005.pdf (257.88 Ko) Télécharger le fichier

Dates and versions

inria-00000701 , version 1 (15-11-2005)


  • HAL Id : inria-00000701 , version 1


Claude Kirchner, Pierre-Etienne Moreau, Antoine Reilles. Formal Validation of Pattern Matching Code. Proceedings of the 7th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming - PPDP'2005, Jul 2005, Lisbon/Portugal, pp.187--197. ⟨inria-00000701⟩
214 View
158 Download


Gmail Facebook Twitter LinkedIn More