Formalising and Verifying Reference Attribute Grammars in Coq. - Schäfer, M; Ekman, T; Moor, O (Springer, 2009)
Reference attribute grammars are a powerful formalism for concisely specifying and implementing static analyses. While they have proven their meritin practical applications, no attempt has so far been made to rigorously verify correctness properties of the resulting systems. We present a general method forformalising reference attribute grammars in the theorem prover Coq. The formalisationis supported by tools for generating standard definitions from an abstract description and custom proof tactics to help automate verification. As a small but typical application, we show how closure analysis for the untyped lambda calculus can easily be implemented and proved correct with respect to an operational semantics. To evaluate the feasibility of our approach on larger systems, we implement name lookup for a naming core calculus of Java and give a formal correctness proof of the centre piece of a rename refactoring for this language.