scholarly journals PyFlies: A Domain-Specific Language for Designing Experiments in Psychology

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.

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.


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.


Author(s):  
Frank P. M. Stappers ◽  
Sven Weber ◽  
Michel A. Reniers ◽  
Suzana Andova ◽  
Istvan Nagy

Author(s):  
Andreas Pieper ◽  
Georg Hager ◽  
Holger Fehske

We introduce PVSC-DTM (Parallel Vectorized Stencil Code for Dirac and Topological Materials), a library and code generator based on a domain-specific language tailored to implement the specific stencil-like algorithms that can describe Dirac and topological materials such as graphene and topological insulators in a matrix-free way. The generated hybrid-parallel (MPI+OpenMP) code is fully vectorized using Single Instruction Multiple Data (SIMD) extensions. It is significantly faster than matrix-based approaches on the node level and performs in accordance with the roofline model. We demonstrate the chip-level performance and distributed-memory scalability of basic building blocks such as sparse matrix-(multiple-) vector multiplication on modern multicore CPUs. As an application example, we use the PVSC-DTM scheme to (i) explore the scattering of a Dirac wave on an array of gate-defined quantum dots, to (ii) calculate a bunch of interior eigenvalues for strong topological insulators, and to (iii) discuss the photoemission spectra of a disordered Weyl semimetal.


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.


2006 ◽  
Vol 194 (1-3) ◽  
pp. 233-243 ◽  
Author(s):  
Cédric. Gaucherel ◽  
Nathalie Giboire ◽  
Valérie Viaud ◽  
Thomas Houet ◽  
Jacques Baudry ◽  
...  

2016 ◽  
Vol 59 (2) ◽  
pp. 103-120
Author(s):  
GLORIA MUGELLI ◽  
FEDERICO BOSCHETTI ◽  
RICCARDO DEL GRATTA ◽  
ANGELO MARIO DEL GROSSO ◽  
FAHAD KHAN ◽  
...  

Abstract Euporia is an annotation system developed with a user-centred approach for the study of ritual and religion in ancient Greek tragedy. Euporia adopts a domain specific language (DSL) and a lightweight web user interface in order to offer digital support to an anthropological study of ancient Greek tragedy that compares ritual as it is performed or described in Greek tragedy with ancient ritual as it can be reconstructed from literary, archaeological, and epigraphic sources. The case study discussed in this paper (Aesch. Ag. 67–71) shows one of the main features of Euporia: the ability to annotate different readings and different interpretations of the text and their consequences in the reconstruction of ancient Greek ritual.


2010 ◽  
Vol 7 (3) ◽  
pp. 409-440 ◽  
Author(s):  
Igor Dejanovic ◽  
Gordana Milosavljevic ◽  
Branko Perisic ◽  
Maja Tumbas

In this paper we present DOMMLite - an extensible domain specific language (DSL) for static structure definition of data base oriented applications. The model-driven engineering (MDE) approach, an emerging software development paradigm, has been used. The language structure is defined by the means of a meta model supplemented by validation rules based on Check language and extensions based on Extend language, which are parts of the openArchitectureWare framework [1]. The meta model has been defined along with the textual syntax, which enables creation, update and persistence of DOMMLite models using a common text editor. DSL execution semantics has been defined by the specification and implementation of the source code generator for a target platform with an already defined execution semantics. In order to enable model editing, a textual Eclipse editor has also been developed. DSL, defined in this way, has the capability of generating complete source code for GUI forms with CRUDS (Create-Read-Update-Delete-Search) and navigation operations [2,3,4,5].


Sign in / Sign up

Export Citation Format

Share Document