Programmers rely on programming idioms, design patterns, and workaround
techniques to express fundamental design not directly supported by the language.
Evolving languages often address frequently encountered problems by adding language
and library support to subsequent releases. By using new features, programmers can
express their intent more directly. As new concerns, such as parallelism or security,
arise, early idioms and language facilities can become serious liabilities. Modern code
sometimes bene fits from optimization techniques not feasible for code that uses less
expressive constructs. Manual source code migration is expensive, time-consuming,
and prone to errors.
This dissertation discusses the introduction of new language features and libraries,
exemplifi ed by open-methods and a non-blocking growable array library. We
describe the relationship of open-methods to various alternative implementation techniques.
The benefi ts of open-methods materialize in simpler code, better performance,
and similar memory footprint when compared to using alternative implementation
techniques.
Based on these findings, we develop the notion of source code rejuvenation, the
automated migration of legacy code. Source code rejuvenation leverages enhanced
program language and library facilities by finding and replacing coding patterns that can be expressed through higher-level software abstractions. Raising the level of
abstraction improves code quality by lowering software entropy. In conjunction with
extensions to programming languages, source code rejuvenation o ers an evolutionary
trajectory towards more reliable, more secure, and better performing code.
We describe the tools that allow us efficient implementations of code rejuvenations.
The Pivot source-to-source translation infrastructure and its traversal mechanism
forms the core of our machinery. In order to free programmers from representation
details, we use a light-weight pattern matching generator that turns a C like
input language into pattern matching code. The generated code integrates seamlessly
with the rest of the analysis framework.
We utilize the framework to build analysis systems that find common workaround
techniques for designated language extensions of C 0x (e.g., initializer lists). Moreover,
we describe a novel system (TACE | template analysis and concept extraction)
for the analysis of uninstantiated template code. Our tool automatically extracts
requirements from the body of template functions. TACE helps programmers understand
the requirements that their code de facto imposes on arguments and compare
those de facto requirements to formal and informal specifications.
Identifer | oai:union.ndltd.org:tamu.edu/oai:repository.tamu.edu:1969.1/ETD-TAMU-2010-12-8894 |
Date | 2010 December 1900 |
Creators | Pirkelbauer, Peter Mathias |
Contributors | Stroustrup, Bjarne |
Source Sets | Texas A and M University |
Language | en_US |
Detected Language | English |
Type | Book, Thesis, Electronic Dissertation, text |
Format | application/pdf |
Page generated in 0.0015 seconds