Geisseler, Elias and Meier, Philipp (2016) GslAtorPtr - C++ Core Guidelines Pointer Checker and Support Library Refactorings. Bachelor thesis, HSR Hochschule für Technik Rapperswil.
GslAtorPtr.pdf - Supplemental Material
Download (1MB) | Preview
Abstract
The role of a raw pointer in legacy C++ is often ambiguous. It could represent a single object on the heap that must be deleted. It could represent an array of objects or it could represent a shared object or one not on the heap. In modern C++ smart pointers can help to alleviate that problem. However, raw pointers are still common in code, most notably within legacy systems or when programmers intend to stay resource efficient. This project wants to use the new ideas introduced with the C++ Core Guidelines [SS16] to help clear up this confusion of raw pointer roles in modern C++14 [ISO14] by giving developers easy to use refactoring tools.
The C++ Core Guidelines that got introduced at CppCon15 [mk15] aim to provide a set of guidelines on how to write better modern C++. They include several topics on how to handle memory and raw pointers. Following the guidelines allows for C++ code to be checked by static analysis tools and catch many semantic programming errors that are still common. Many of the guidelines make use of the Guidelines Support Library (GSL) [Mic16]. The GSL provides several types that should be used in context of raw pointers in code. The GSL types are recommended because they are more expressive than raw pointers and often contain additional functionalities that help prevent errors with minimal additional overhead.
The end product of this project is a plug-in for the Cevelop IDE [fS16] that helps developers to adhere to the C++ Core Guidelines in regards to raw pointers. The plug-in contains code checkers that mark problematic code using raw pointers and will then allow for refactorings to the GSL types marking their role. We have also tested our plug-in on a real world code base to ensure a better user experience and more reliable functionality.
Item Type: | Thesis (Bachelor) |
---|---|
Subjects: | Topics > Software > Refactoring Topics > Software > Optimization Area of Application > Development Tools Area of Application > Desktop based Technologies > Programming Languages > C++ Metatags > IFS (Institute for Software) |
Divisions: | Bachelor of Science FHO in Informatik > Bachelor Thesis |
Depositing User: | OST Deposit User |
Contributors: | Contribution Name Email Thesis advisor Sommerlad, Peter UNSPECIFIED |
Date Deposited: | 05 Oct 2016 11:25 |
Last Modified: | 05 Oct 2016 11:25 |
URI: | https://eprints.ost.ch/id/eprint/528 |