2007•Unpublished venueRequires access

Proto

Eric Niebler

Open publisher page 24 citations

Abstract

A Domain-Specific Embedded Language (DSEL) is a miniature language-within-a-language for solving problems in a particular domain. One technique for creating efficient and expressive DSELs in C++ is to use expression templates, but this technique is not for the faint of heart. Such libraries are difficult to write and maintain due to the esoteric nature of template meta-programming, and difficult to use because of the often impenetrable compiler error messages they generate. Existing tools help somewhat, but do not provide the support that language designers have come to expect: something like BNF for defining the language's grammar and associated semantic actions. This paper describes Proto, a C++ library that implements a compiler construction toolkit for embedded languages. The benefits of grammar-based DSELs are shown by contrasting them to other existing approaches to DSEL design. The nature of embedded languages with constrained grammars and their implications for a embedded compiler construction toolkit is briefly explored. Some examples are shown where library interfaces can be made more expressive through the use of grammar-based DSELs.

About this research paper

What this paper is about

A Domain-Specific Embedded Language (DSEL) is a miniature language-within-a-language for solving problems in a particular domain. One technique for creating efficient and expressive DSELs in C++ is to use expression templates, but this technique is not for the faint of heart. Such libraries are difficult to write and maintain due to the esoteric nature of template meta-programming, and difficult to use because of the often impenetrable compiler error messages they generate. Existing tools help somewhat, but do not provide the support that language designers have come to expect: something like BNF for defining the language's grammar and associated semantic actions. This paper describes Proto, a C++ library that implements a compiler construction toolkit for embedded languages. The benefits of grammar-based DSELs are shown by contrasting them to other existing approaches to DSEL design. The nature of embedded languages with constrained grammars and their implications for a embedded compiler construction toolkit is briefly explored. Some examples are shown where library interfaces can be made more expressive through the use of grammar-based DSELs.

Why it matters

OpenAlex reports 24 citations for this work. Citation counts describe recorded attention and do not establish research quality.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

A Domain-Specific Embedded Language (DSEL) is a miniature language-within-a-language for solving problems in a particular domain. One technique for creating efficient and expressive DSELs in C++ is to use expression templates, but this technique is not for the faint of heart. Such libraries are difficult to write and maintain due to the esoteric nature of template meta-programming, and difficult to use because of the often impenetrable compiler error messages they generate. Existing tools help somewhat, but do not provide the support that language designers have come to expect: something like BNF for defining the language's grammar and associated semantic actions. This paper describes Proto, a C++ library that implements a compiler construction toolkit for embedded languages. The benefits of grammar-based DSELs are shown by contrasting them to other existing approaches to DSEL design. The nature of embedded languages with constrained grammars and their implications for a embedded compiler construction toolkit is briefly explored. Some examples are shown where library interfaces can be made more expressive through the use of grammar-based DSELs.

Key concepts: Computer science, Compiler, Programming language, Domain-specific language, Grammar, Domain (mathematical analysis), Rule-based machine translation, Template

Related papers

Back to paper searchBrowse research topicsOriginal source
Proto — Research Paper | ScholarLens