TL;DR: This thesis is concerned with bridging the gap between the theoretical presentations of type theory and the requirements on a practical programming language.
Abstract: Dependent type theories have a long history of being used for theorem proving One aspect of type theory which makes it very powerful as a proof language is that it mixes deduction with computation This also makes type theory a good candidate for programming---the strength of the type system allows properties of programs to be stated and established, and the computational properties provide semantics for the programs
This thesis is concerned with bridging the gap between the theoretical presentations of type theory and the requirements on a practical programming language Although there are many challenging research problems left to solve before we have an industrial scale programming language based on type theory, this thesis takes us a good step along the way
TL;DR: A thesis of this paper is that multi-stage languages are useful as programming languages in their own right, and should support features that make it possible for programmers to write staged computations without significantly changing their normal programming style.
Abstract: We introduce MetaML, a statically-typed multi-stage programming language extending Nielson and Nielson's two stage notation to an arbitrary number of stages. MetaML extends previous work by introducing four distinct staging annotations which generalize those published previously [25, 12, 7, 6]We give a static semantics in which type checking is done once and for all before the first stage, and a dynamic semantics which introduces a new concept of cross-stage persistence, which requires that variables available in any stage are also available in all future stages.We illustrate that staging is a manual form of binding time analysis. We explain why, even in the presence of automatic binding time analysis, explicit annotations are useful, especially for programs with more than two stages.A thesis of this paper is that multi-stage languages are useful as programming languages in their own right, and should support features that make it possible for programmers to write staged computations without significantly changing their normal programming style. To illustrate this we provide a simple three stage example, and an extended two-stage example elaborating a number of practical issues.
TL;DR: In this paper, the Boost Type Traits Library is described as a collection of properties and properties of C++ programs, and the Boost Spirit library is used for preprocessor metaprogramming.
Abstract: Preface. Acknowledgments. Making the Most of This Book. 1. Introduction. Getting Started. So What's a Metaprogram? Metaprogramming in the Host Language. Metaprogramming in C++. Why Metaprogramming? When Metaprogramming? Why a Metaprogramming Library? 2. Traits and Type Manipulation. Type Associations. Metafunctions. Numerical Metafunctions. Making Choices at Compile Time. A Brief Tour of the Boost Type Traits Library. Nullary Metafunctions. Metafunction Definition. History. Details. Exercises. 3. A Deeper Look at Metafunctions. Dimensional Analysis. Higher-Order Metafunctions. Handling Placeholders. More Lambda Capabilities. Lambda Details. Details. Exercises. 4. Integral Type Wrappers and Operations. Boolean Wrappers and Operations. Integer Wrappers and Operations. Exercises. 5. Sequences and Iterators. Concepts. Sequences and Algorithms. Iterators. Iterator Concepts. Sequence Concepts. Sequence Equality. Intrinsic Sequence Operations. Sequence Classes. Integral Sequence Wrappers. Sequence Derivation. Writing Your Own Sequence. Details. Exercises. 6. Algorithms. Algorithms, Idioms, Reuse, and Abstraction. Algorithms in the MPL. Inserters. Fundamental Sequence Algorithms. Querying Algorithms. Sequence Building Algorithms. Writing Your Own Algorithms. Details. Exercises. 7. Views and Iterator Adaptors. A Few Examples. View Concept. Iterator Adaptors. Writing Your Own View. History. Exercises. 8. Diagnostics. Debugging the Error Novel. Using Tools for Diagnostic Analysis. Intentional Diagnostic Generation. History. Details. Exercises. 9. Crossing the Compile-Time/Runtime Boundary. for each. Implementation Selection. Object Generators. Structure Selection. Class Composition. (Member) Function Pointers as Template Arguments. Type Erasure. The Curiously Recurring Template Pattern. Explicitly Managing the Overload Set. The "sizeof Trick". Summary. Exercises. 10. Domain-Specific Embedded Languages. A Little Language. Goes a Long Way. DSLs, Inside Out. C++ as the Host Language. Blitz++ and Expression Templates. General-Purpose DSELs. The Boost Spirit Library. Summary. Exercises. 11. A DSEL DesignWalkthrough. Finite State Machines. Framework Design Goals. Framework Interface Basics. Choosing a DSL. Implementation. Analysis. Language Directions. Exercises. Appendix A. An Introduction to Preprocessor Metaprogramming. Motivation. Fundamental Abstractions of the Preprocessor. Preprocessor Library Structure. Preprocessor Library Abstractions. Exercise. Appendix B. The typename and template Keywords. The Issue. The Rules. Appendix C. Compile-Time Performance. The Computational Model. Managing Compilation Time. The Tests. Appendix D. MPL Portability Summary. Bibliography. Index.
TL;DR: This book, which contains contributions from leading researchers in France, USA and Great Britain, gives detailed accounts of a variety of methods for describing the semantics of programming languages, i.e. for attaching to programs mathematical objects that encompass their meaning.
Abstract: This book, which contains contributions from leading researchers in France, USA and Great Britain, gives detailed accounts of a variety of methods for describing the semantics of programming languages, i.e. for attaching to programs mathematical objects that encompass their meaning. Consideration is given to both denotational semantics, where the meaning of a program is regarded as a function from inputs to outputs, and operational semantics, where the meaning includes the sequence of states or terms generated internally during the computation. The major problems considered include equivalence relations between operational and denotational semantics, rules for obtaining optimal computations (especially for nondeterministic programs), equivalence of programs, meaning-preserving transformations of programs and program proving by assertions. Such problems are discussed for a variety of programming languages and formalisms, and a wealth of mathematical tools is described.