We present a general method to transform a compositional specification of a specializer for
a functional programming language into a set of combinators that can be used to perform
the same specialization more efficiently. The main transformation steps are the transition to
higher-order abstract syntax and untagging. All transformation steps are proved correct. The
resulting combinators can be implemented in any functional language, typed or untyped,
pure or impure. They may also be considered as forming a domain-specific language for
meta-programming. We demonstrate the generality of the method by applying it to several
specializers of increasing strength. We demonstrate its efficiency by comparing it with a
traditional specialization system based on self-application.
In finite element methods, numerical simulation of the problem requires the generation of a linear system based on an integral form of a problem. Using C++ meta-programming techniques, a method is developed that allows writing code that stays close to the mathematical formulation. We explain the specifics of our method, which relies on the Boost.Proto framework to simplify the evaluation of our language. Some practical examples are elaborated, together with an analysis of the performance. The abstraction overhead is quantified using benchmarks.
This paper aims to provide an overview of the complete process in the development of a Domain-Specific Language (DSL). It explains the construction steps such as preliminary research, language implementation, and evaluation. Moreover, it provides details for different key components which are commonly found in the DSLs such as the abstraction layer, DSL metamodel, and the applications. It also explains the general limitations related to the Domain-Specific Languages for Workflows.