Towards specification-guarded refactoring

Adam David Barwell, Christopher Mark Brown, Susmit Sarkar*

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Refactoring is a common task in writing and maintaining software. Refactoring tools are available for a wide variety of programming languages, and they are intended to transform source code without altering the functional behaviour of the software being refactored. However, even though most refactoring tools are designed with this criterion in mind, and programmers expect it, their implementations do not provide formal guarantees of correctness. To address this limitation, we propose a methodology for extending refactoring implementations with correctness guarantees. Our approach leverages dependently-typed languages and techniques to guard refactoring implementations with proofs of conformance to formal specifications. We illustrate our proposed methodology using a renaming refactoring that includes correctness guarantees as an integral part of its implementation.
Original languageEnglish
Title of host publicationLogic-based program synthesis and transformation
Subtitle of host publication34th International symposium, LOPSTR 2024, Milan, Italy, September 9–10, 2024, Proceedings
EditorsJuliana Bowles, Harald Søndergaard
Place of PublicationCham
PublisherSpringer
Pages149–165
ISBN (Electronic)9783031712944
ISBN (Print)9783031712937
DOIs
Publication statusPublished - 7 Sept 2024

Publication series

NameLecture notes in computer science
PublisherSpringer Nature
Volume14919
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Keywords

  • Haskell
  • Refactoring
  • Dependent types
  • Idris
  • Correctness
  • Soundness
  • Renaming
  • Equivalence
  • Semantics

Fingerprint

Dive into the research topics of 'Towards specification-guarded refactoring'. Together they form a unique fingerprint.

Cite this