Proving renaming for Haskell via dependent types : a case-study in refactoring soundness
Abstract
We present a formally verified refactoring framework for a subset of Haskell 98. Our framework is implemented in the dependently-typed language, Idris, which allows us to encode soundness proofs as an integral part of the implementation. We give the formal definition of our static semantics for our Haskell 98 subset, which we encode as part of the AST, ensuring that only well-formed programs may be represented and transformed. This forms a foundation upon which refactorings can be formally specified. We then define soundness of refactoring implementations as conformity to their specification. We demonstrate our approach via renaming, a canonical and well-understood refactoring, giving its implementation alongside its formal specification and soundness proof.
Citation
Barwell , A D , Brown , C M & Sarkar , S 2021 , Proving renaming for Haskell via dependent types : a case-study in refactoring soundness . in 8th International Workshop on Rewriting Techniques for Program Transformations and Evaluation (WPTE 2021) . pp. 1-10 , 8th International Workshop on Rewriting Techniques for Program Transformations and Evaluation , Buenos Aeires , Argentina , 18/07/21 . workshop
Publication
8th International Workshop on Rewriting Techniques for Program Transformations and Evaluation (WPTE 2021)
Type
Conference item
Rights
Copyright 2021 © A. Barwell, C. Brown & S. Sarkar. This work is licensed under the Creative Commons Attribution License.
Collections
Items in the St Andrews Research Repository are protected by copyright, with all rights reserved, unless otherwise indicated.