CCGLator - C++ Core Guidelines Constructor Rules Checker and Quick-fixes

Kaya, Özhan and Schmidiger, Kevin (2016) CCGLator - C++ Core Guidelines Constructor Rules Checker and Quick-fixes. Bachelor thesis, HSR Hochschule für Technik Rapperswil.

[img]
Preview
Text
ccglator.pdf - Supplemental Material

Download (4MB) | Preview

Abstract

C++ is a complex language evolving over the years. Especially with the release of C++11 many recommended practices became obsolete because the language and standard library provide safer and more efficient mechanisms to create type-safe and performant code. Higher level issues like resource management, memory management and concurrency are common mistakes in C++. To help the developer to create error free and safe code, the C++ Core Guidelines[BS15a] were introduced at the CppCon15[Cpp15] by Bjarne Stroustrup and Herb Sutter. Following those guidelines leads to code that is statically type safe, should have no resource leaks, and catches many more programming logic errors beeing quite common in code today. The guidelines are an kind of “an early release” meaning that the rules are not yet complete, if they will ever be. Its is split in sections depending on which problem needs to be concerned. In this thesis we took the section C: Classes and Class Hierarchies[BS15b] and there the subsection C.ctor: Constructors, assignments, and destructors[BS15c]. Reduced to those rules we then analyzed them in terms of what problems could appear when they will be ignored. Some of the problems are not easy to detect in later production code. After the analysis we created an Eclipse plug-in to help the developer concern the problems occurring when creating a class in C++. The plug-in provides highlighting the part of code violating a rule from this section. It is then possible to read more about the rule and use its suggestion to quick-fix the code in a way the guideline suggests to do. Because the plug-in covers the rules concerning creating data-types, it can handle some problems of resource and memory management, as well as creating data-types in a more modern way.

Item Type: Thesis (Bachelor)
Subjects: Topics > Software > Refactoring
Topics > Software > Optimization
Area of Application > Development Tools
Technologies > Programming Languages > C++
Metatags > IFS (Institute for Software)
Divisions: Bachelor of Science FHO in Informatik > Bachelor Thesis
Creators:
CreatorsEmail
Kaya, ÖzhanUNSPECIFIED
Schmidiger, KevinUNSPECIFIED
Contributors:
ContributionNameEmail
Thesis advisorSommerlad, PeterUNSPECIFIED
Depositing User: HSR Deposit User
Date Deposited: 05 Oct 2016 11:24
Last Modified: 05 Oct 2016 11:24
URI: http://eprints.hsr.ch/id/eprint/522

Actions (login required)

View Item View Item