SMARTOR - Dress Naked C++ Pointers to Smart Pointers

Fröhlich, André and Mollekopf, Christian (2013) SMARTOR - Dress Naked C++ Pointers to Smart Pointers. Bachelor thesis, HSR Hochschule für Technik Rapperswil.

[thumbnail of Smartor - Dress Naked C++ Pointers to Smart Pointers.pdf]
Preview
Text
Smartor - Dress Naked C++ Pointers to Smart Pointers.pdf - Supplemental Material

Download (3MB) | Preview

Abstract

C++ allows the use of raw pointers as they exist in plain C. Unfortunately, they can't demonstrate the semantic role of their usage, as they are a very low level concept. Furthermore, they often lead to memory leaks and hard to understand source code.

Better alternatives in C++ are smart pointers. Smart pointers are a group of wrappers around raw pointers. They provide a facility that covers the memory management and adds semantic information on what exactly the pointer is used for. The goal of our project is to develop an Eclipse CDT plug-in assisting a developer in finding and converting raw pointers into smart pointers. In addition, it serves as an experiment on how the Scala language helps to write code that manipulates an abstract syntax tree.

Our thesis contains an analysis of pointer roles and their possible transformations into smart pointers. The plug-in assists a developer in detecting and transforming raw pointers into suitable smart pointers by displaying a marker in the editor and offering appropriate quick fixes. Using Scala resulted in cleaner and more readable source code. Scala's match statement provides a neat way to match against types thus helps avoiding conditional statements for type checking.

Item Type: Thesis (Bachelor)
Subjects: Area of Application > Development Tools
Area of Application > Academic and Education
Technologies > Frameworks and Libraries > Eclipse
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: 23 Jul 2013 11:03
Last Modified: 23 Jul 2013 11:03
URI: https://eprints.ost.ch/id/eprint/318

Actions (login required)

View Item
View Item