Loop Analysis and Transformation towards STL Algorithms

Kesseli, Pascal (2010) Loop Analysis and Transformation towards STL Algorithms. Masters thesis, HSR Hochschule für Technik Rapperswil.

[thumbnail of 3) Technical report.pdf]
Preview
Text
3) Technical report.pdf - Supplemental Material

Download (1MB) | Preview

Abstract

Loops and iterations have always been a traditional error source in programming. “Off-by-one” errors, where an iteration is executed once too often or once too few, top the most common program errors. C++ provides STL algorithms to simplify the most common tasks accomplished using loops, helping to avoid these kinds of errors. Unfortunately, STL algorithms are not as commonly used as they could be.
This master thesis describes the development of an Eclipse C++ Development Tools (CDT) plug-in, which encourages and supports developers to use STL algorithms. The plug-in provides semi-automatic recognition and transformation of compatible loops to corresponding STL algorithms. To achieve this, tree pattern matching algorithms are applied to the processed abstract syntax trees (AST). The final plug-in features transformation of for each and find/find if -compatible for and while loops to equiv- alent STL algorithm function calls. The respective loop body is transformed into a corresponding functor. The user can select either a C++0x lambda expression, a TR1 bind expression or a C++98 bind1st/bind2nd expression.
Based on the foundation created with this project, there exist multiple extension possibilities. Additional algorithms, such as generate and transform, would greatly increase the number of use cases served. Furthermore, introducing trivial explicit function and explicit functor class functor transformations can increase the plug-in’s flexibility even further. Lastly, the tree pattern matching engine, with all its benefits, should definitely be provided to the Eclipse end users. Various applications, from tree pattern search masks to semi-automatic pattern definition based on existing codes, could support programmers in all of their daily tasks and challenges.

Item Type: Thesis (Masters)
Subjects: Area of Application > Development Tools
Technologies > Frameworks and Libraries
Technologies > Frameworks and Libraries > Eclipse
Metatags > IFS (Institute for Software)
Divisions: Master of Science in Engineering (MRU Software and Systems)
Depositing User: OST Deposit User
Contributors:
Contribution
Name
Email
Thesis advisor
Sommerlad, Peter
UNSPECIFIED
Date Deposited: 21 Jun 2013 09:27
Last Modified: 21 Jun 2013 09:27
URI: https://eprints.ost.ch/id/eprint/287

Actions (login required)

View Item
View Item