Stucki, Jeremy and Zahnd, Vina (2023) C++ Concept Refactorings. Other thesis, OST Ostschweizer Fachhochschule.
HS 2023 2024-SA-EP-Stucki-Zahnd-C++ Concept Refactorings.pdf - Supplemental Material
Download (3MB)
Abstract
With C++20, template parameter constraints were introduced that allow to specify the expected functionality of the template parameters.
The objective of this project was to find novel refactoring operations related to concepts and to implement them as part of a language server.
An analysis has been performed on the language server protocol, concepts, and the clangd language server.
This resulted in a few potential refactoring operations, two of which have been implemented as a tweak in the clangd language server.
The first implemented refactoring enables inlining requires clauses into the template declaration.
It reduces the amount of code and, in most cases, makes the function signature easier to read.
The second implemented refactoring allows converting explicit template declarations into their abbreviated form using auto parameters, thus eliminating the template header above the function.
The two implemented refactor operations have been submitted upstream as pull requests to the LLVM repository and, as of the writing of this paper (December 2023), are awaiting review.
Once approved and merged, these new refactoring operations will become available to anyone using the clangd language server.
Item Type: | Thesis (Other) |
---|---|
Subjects: | Topics > Software > Refactoring Topics > Software > Optimization Area of Application > Development Tools Technologies > Programming Languages > C++ Technologies > Programming Languages > C Technologies > Operating Systems > Windows Technologies > Operating Systems > Unix, Linux |
Divisions: | Bachelor of Science FHO in Informatik > Student Research Project |
Depositing User: | OST Deposit User |
Contributors: | Contribution Name Email Thesis advisor Corbat, Thomas UNSPECIFIED |
Date Deposited: | 16 May 2024 11:43 |
Last Modified: | 16 May 2024 11:43 |
URI: | https://eprints.ost.ch/id/eprint/1184 |