4th Annual Symposium on Theoretical Aspects of Computer Sciences on STACS 87
Constant propagation with conditional branches
ACM Transactions on Programming Languages and Systems (TOPLAS)
Partial evaluation and automatic program generation
Partial evaluation and automatic program generation
The type and effect discipline
Information and Computation
The design and evolution of C++
The design and evolution of C++
Multi-stage programming with explicit annotations
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Consolidated ada reference manual: language and standard libraries
Consolidated ada reference manual: language and standard libraries
ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
A system for axiomatic programming
CICM'12 Proceedings of the 11th international conference on Intelligent Computer Mathematics
Hi-index | 0.00 |
Most mainstream system programming languages provide support for builtin types, and extension mechanisms through userdefined types. They also come with a notion of constant expressions whereby some expressions (such as array bounds) can be evaluated at compile time. However, they require constant expressions to be written in an impoverished language with minimal support from the type system; this is tedious and error-prone. This paper presents a framework for generalizing the notion of constant expressions in modern system programming languages. It extends compile time evaluation to functions and variables of user-defined types, thereby including formerly ad hoc notions of Read Only Memory (ROM) objects into a general and type safe framework. It allows a programmer to specify that an operation must be evaluated at compile time. Furthermore, it provides more direct support for key meta programming and generative programming techniques. The framework is formalized as an extension of underlying type system with a binding time analysis. It was designed to meet real-world requirements. In particular, key design decisions relate to balancing expressive power to implementability in industrial compilers and teachability. It has been implemented for C++ in the GNU Compiler Collection, and is part of the next ISO C++ standard.