scholarly journals Comparing general-purpose and domain-specific languages: An empirical study

2010 ◽  
Vol 7 (2) ◽  
pp. 247-264 ◽  
Author(s):  
Tomaz Kosar ◽  
Nuno Oliveira ◽  
Marjan Mernik ◽  
Varanda Pereira ◽  
Matej Crepinsek ◽  
...  

Many domain-specific languages, that try to bring feasible alternatives for existing solutions while simplifying programming work, have come up in recent years. Although, these little languages seem to be easy to use, there is an open issue whether they bring advantages in comparison to the application libraries, which are the most commonly used implementation approach. In this work, we present an experiment, which was carried out to compare such a domain-specific language with a comparable application library. The experiment was conducted with 36 programmers, who have answered a questionnaire on both implementation approaches. The questionnaire is more than 100 pages long. For a domain-specific language and the application library, the same problem domain has been used - construction of graphical user interfaces. In terms of a domain-specific language, XAML has been used and C# Forms for the application library. A cognitive dimension framework has been used for a comparison between XAML and C# Forms.

Author(s):  
Shirren Premaratne ◽  
Anthony M. Sloane ◽  
Leonard G. C. Hamey

Domain-specific languages are often implemented by embedding them in general-purpose programming languages. The Kiama library used in this chapter for the Scala programming language contains a rewriting component that is an embedded implementation of the Stratego term rewriting language. The authors evaluate the trade-offs inherent in this approach and its practicality via a non-trivial case study. An existing Stratego implementation of a compiler for the Apply image processing language was translated into a Kiama implementation. The chapter examines the linguistic differences between the two versions of the Stratego domain-specific language, and compares the size, speed, and memory usage of the two Apply compiler implementations. The authors’ experience shows that the embedded language implementation inflicts constraints that mean a precise duplication of Stratego is impossible, but the main flavor of the language is preserved. The implementation approach allows for writing code of similar size, but imposes a performance penalty. Nevertheless, the performance is still at a practically useful level and scales for large inputs in the same way as the Stratego implementation.


2014 ◽  
Vol 24 (03) ◽  
pp. 1441003 ◽  
Author(s):  
Marcel Köster ◽  
Roland Leißa ◽  
Sebastian Hack ◽  
Richard Membarth ◽  
Philipp Slusallek

A straightforward implementation of an algorithm in a general-purpose programming language does usually not deliver peak performance: Compilers often fail to automatically tune the code for certain hardware peculiarities like memory hierarchy or vector execution units. Manually tuning the code is firstly error-prone as well as time-consuming and secondly taints the code by exposing those peculiarities to the implementation. A popular method to avoid these problems is to implement the algorithm in a Domain-Specific Language (DSL). A DSL compiler can then automatically tune the code for the target platform. In this article we show how to embed a DSL for stencil codes in another language. In contrast to prior approaches we only use a single language for this task which offers explicit control over code refinement. This is used to specialize stencils for particular scenarios. Our results show that our specialized programs achieve competitive performance compared to hand-tuned CUDA programs while maintaining a convenient coding experience.


Author(s):  
Akif Quddus Khan

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.


2014 ◽  
Vol 24 (4) ◽  
pp. 434-473 ◽  
Author(s):  
NEIL SCULTHORPE ◽  
NICOLAS FRISBY ◽  
ANDY GILL

AbstractWhen writing transformation systems, a significant amount of engineering effort goes into setting up the infrastructure needed to direct individual transformations to specific targets in the data being transformed. Strategic programming languages provide general-purpose infrastructure for this task, which the author of a transformation system can use for any algebraic data structure. The Kansas University Rewrite Engine (KURE) is a typed strategic programming language, implemented as a Haskell-embedded domain-specific language. KURE is designed to support typed transformations over typed data, and the main challenge is how to make such transformations compatible with generic traversal strategies that should operate over any type. Strategic programming in a typed setting has much in common with datatype-generic programming. Compared to other approaches to datatype-generic programming, the distinguishing feature of KURE's solution is that the user can configure the behaviour of traversals based on the location of each datum in the tree, beyond their behaviour being determined by the type of each datum. This article describes KURE's approach to assigning types to generic traversals, and the implementation of that approach. We also compare KURE, its design choices, and their consequences, with other approaches to strategic and datatype-generic programming.


2021 ◽  
Vol 11 (17) ◽  
pp. 7823
Author(s):  
Igor Dejanović ◽  
Mirjana Dejanović ◽  
Jovana Vidaković ◽  
Siniša Nikolić

The majority of studies in psychology are nowadays performed using computers. In the past, access to good quality software was limited, but in the last two decades things have changed and today we have an array of good and easily accessible open-source software to choose from. However, experiment builders are either GUI-centric or based on general-purpose programming languages which require programming skills. In this paper, we investigate an approach based on domain-specific languages which enables a text-based experiment development using domain-specific concepts, enabling practitioners with limited or no programming skills to develop psychology tests. To investigate our approach, we created PyFlies, a domain-specific language for designing experiments in psychology, which we present in this paper. The language is tailored for the domain of psychological studies. The aim is to capture the essence of the experiment design in a concise and highly readable textual form. The editor for the language is built as an extension for Visual Studio Code, one of the most popular programming editors today. From the experiment description, various targets can be automatically produced. In this version, we provide a code generator for the PsychoPy library while generators for other target platforms are planned. We discuss the language, its concepts, syntax, some current limitations, and development directions. We investigate the language using a case study of the implementation of the Eriksen flanker task.


Author(s):  
Alberto Simões ◽  
Rui Miguel da Costa Meira

This chapter describes an approach for the implementation of embedded domain-specific languages by using operator overloads and the creation of abstract syntax trees in run-time. Using the host language parser, an AST is created stating the structure of the DSL expression that is later analyzed, simplified, and optimized before the evaluation step. For the illustration of this process, the chapter proposes a domain-specific language for a basic linear algebra system dealing with matrices algebra and its optimization.


2011 ◽  
Vol 8 (2) ◽  
pp. 405-426 ◽  
Author(s):  
Branko Perisic ◽  
Gordana Milosavljevic ◽  
Igor Dejanovic ◽  
Branko Milosavljevic

This paper presents an approach to automatic user interface code generation that is based on an internal HCI standard that defines layout and behaviour of coarse-grained objects for enterprise business applications. A domain-specific language (in the form of a UML profile) based on the concepts introduced by the HCI standard facilitates efficient modeling and generation of fully-functional UIs. Being a regular UML extension, this language can be used in any general-purpose UML modeling tool and can easily be integrated with other UML-based models of the application.


Sign in / Sign up

Export Citation Format

Share Document