Show simple item record

dc.contributor Lumsdaine, Andrew
dc.creator Garcia, Ronald
dc.date 2010-06-07T15:38:16Z
dc.date 2027-02-07T16:38:16Z
dc.date 2010-06-07T15:38:16Z
dc.date 2008
dc.date.accessioned 2023-02-21T11:17:10Z
dc.date.available 2023-02-21T11:17:10Z
dc.identifier http://hdl.handle.net/2022/8278
dc.identifier.uri http://localhost:8080/xmlui/handle/CUHPOERS/252847
dc.description Thesis (PhD) - Indiana University, Computer Sciences, 2008
dc.description Most programming languages do not allow programs to inspect their static type information or perform computations on it. C++, however, lets programmers write template metaprograms, which enable programs to encode static information, perform compile-time computations, and make static decisions about run-time behavior. Many C++ libraries and applications use template metaprogramming to build specialized abstraction mechanisms, implement domain-specific safety checks, and improve run-time performance. Template metaprogramming is an emergent capability of the C++ type system, and the C++ language specification is informal and imprecise. As a result, template metaprogramming often involves heroic programming feats and often leads to code that is difficult to read and maintain. Furthermore, many template-based code generation and optimization techniques rely on particular compiler implementations, rather than language semantics, for performance gains. Motivated by the capabilities and techniques of C++ template metaprogramming, this thesis documents some common programming patterns, including static computation, type analysis, generative programming, and the encoding of domain-specific static checks. It also documents notable shortcomings to current practice, including limited support for reflection, semantic ambiguity, and other issues that arise from the pioneering nature of template metaprogramming. Finally, this thesis presents the design of a foundational programming language, motivated by the analysis of template metaprogramming, that allows programs to statically inspect type information, perform computations, and generate code. The language is specified as a core calculus and its capabilities are presented in an idealized setting.
dc.language EN
dc.publisher [Bloomington, Ind.] : Indiana University
dc.subject Programming Languages
dc.subject Metaprogramming
dc.subject Types
dc.subject C++
dc.subject Computer Science
dc.title Static Computation and Reflection
dc.type Doctoral Dissertation


Files in this item

Files Size Format View
umi-indiana-2294.pdf 1.045Mb application/pdf View/Open

This item appears in the following Collection(s)

Show simple item record

Search DSpace


Advanced Search

Browse