Static computation and reflection

作者: Andrew Lumsdaine , Ronald Garcia

DOI:

关键词:

摘要: 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 encode information, compile-time computations, and make decisions about run-time behavior. Many C++ libraries applications use metaprogramming build specialized abstraction mechanisms, implement domain-specific safety checks, improve performance. Template is an emergent capability of the system, language specification informal imprecise. As a result, often involves heroic feats leads code that difficult read maintain. Furthermore, many template-based generation optimization techniques rely particular compiler implementations, rather than semantics, for performance gains. Motivated by capabilities metaprogramming, this thesis documents some common patterns, including computation, analysis, generative programming, encoding checks. It also notable shortcomings current practice, limited support reflection, semantic ambiguity, other issues arise from pioneering nature metaprogramming. Finally, presents design foundational language, motivated analysis allows statically generate code. The specified as core calculus its are presented in idealized setting.

参考文章(87)
Jr. Guy L. Steele, Common LISP: the language (2nd ed.) Digital Press. ,(1990)
Jeremy Siek, Andrew Lumsdaine, Concept Checking: Binding Parametric Polymorphism in C++ ,(2000)
Aleksey Gurtovoy, David Abrahams, C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series) Addison-Wesley Professional. ,(2004)
Robert Bruce Findler, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Matthias Felleisen, DrScheme: A Pedagogic Programming Environment for Scheme international symposium on programming language implementation and logic programming. pp. 369- 388 ,(1997) , 10.1007/BFB0033856
Jacob Matthews, Robert Bruce Findler, Matthew Flatt, Matthias Felleisen, A Visual Environment for Developing Context-Sensitive Term Rewriting Systems Rewriting Techniques and Applications. pp. 301- 311 ,(2004) , 10.1007/978-3-540-25979-4_21
Krzysztof Czarnecki, Ulrich W. Eisenecker, Generative Programming: Methods, Tools, and Applications ,(2000)
August Schwerdfeger, Lijesh Krishnan, Eric Van Wyk, Derek Bodin, Attribute grammar-based language extensions for java european conference on object-oriented programming. pp. 575- 599 ,(2007) , 10.5555/2394758.2394796
Prabhanjan Kambadur, Douglas Gregor, Andrew Lumsdaine, Amey Dharurkar, Modernizing the C++ Interface to MPI Recent Advances in Parallel Virtual Machine and Message Passing Interface. pp. 266- 274 ,(2006) , 10.1007/11846802_39