Unifying Code Refactorings of Different Languages (Master Thesis)

Unifying Code Refactorings of Different Languages (Master Thesis)

Introduction of CHAST and using Parser Generators as Refactoring Meta Language

Abstract

In this report, the newly developed tool CHAST will be introduced, a tool that automates refactorings in a secure and reliable manner by using the concept of change isolation. This allows users to preview and confirm changes before they are applied to the actual codebase, avoiding unintended side effects and enabling users to easily roll back changes if necessary. CHAST is designed to be language-agnostic and to support a wide range of tools and functionality. It also simplifies the process of creating and sharing refactorings by providing a command-line interface and recipe format. The report furthermore investigates the feasibility of implementing multi-language refactorings using parser generators as a refactoring meta language. It also evaluates CHAST in terms of change isolation and the effort required to create a refactoring. In future work, plans exist to continue developing CHAST and further enhancing its effectiveness in real-world scenarios. Therefore, CHAST’s limits need to be explored, and potential trade-offs of using parser generators as a refactoring meta language need to be identified. Furthermore, other approaches for implementing multi-language refactorings need to be investigated. There also exist plans to add additional features to CHAST, such as installing software or running linters and formatters in a unified way.

Project

Download