Object-oriented design pattern for DSL program monitoring

To ease domain-specific language (DSL) development, a range of language workbenches have been created, which provide language design facilities and programming tools, like editors and validators. In spite of these developments, there is a perceived lack of tool support for execution monitoring, which is the basic block for program validation and maintenance. To partially address this issue some language workbenches offer ad-hoc solutions for DSL debugging, but lack support for other monitoring features. In the literature, a number of domain-specific monitoring tools have been proposed. However, there is no clear way for integrating these developments in existing language workbenches. This paper presents ten requirements needed for creating a modular and composable DSL monitoring infrastructure and proposes an object-oriented design pattern for DSL program monitoring. This pattern provides a practical answer to the problem of interfacing the runtime of a DSL with concrete domain-specific monitoring tools. To show the practicability of our approach, we add monitoring support to a simple lambda calculus, without changing the standard interpreter. The ease of integrating monitoring tools is shown through the development of a tracer and the integration of an off-the-shelf domain-specific profiler.

[1]  Eelco Visser,et al.  The State of the Art in Language Workbenches - Conclusions from the Language Workbench Challenge , 2013, SLE.

[2]  Mireille Ducassé,et al.  Generic program monitoring by trace analysis , 2002, Theory Pract. Log. Program..

[3]  David A. Schmidt Detecting global variables in denotational specifications , 1985, TOPL.

[4]  Andrew Kennedy,et al.  Compiling with continuations, continued , 2007, ICFP '07.

[5]  Gopal Gupta Language-based software engineering , 2015, Sci. Comput. Program..

[6]  Oscar Nierstrasz,et al.  Modeling Domain-Specific Profilers , 2012, J. Object Technol..

[7]  J. Nievergelt,et al.  Special Feature: Monitoring Program Execution: A Survey , 1981, Computer.

[8]  Benoît Combemale,et al.  Supporting efficient and advanced omniscient debugging for xDSMLs , 2015, SLE.

[9]  Ralph E. Johnson,et al.  Wrappers to the Rescue , 1998, ECOOP.

[10]  Maria João Varanda Pereira,et al.  Automatic generation of language-based tools using the LISA system , 2005, IEE Proc. Softw..

[11]  Gabor Karsai,et al.  DSLs: the good, the bad, and the ugly , 2008, OOPSLA Companion.

[12]  Andrei Chis,et al.  Practical domain-specific debuggers using the Moldable Debugger framework , 2015, Comput. Lang. Syst. Struct..

[13]  Marjan Mernik,et al.  Domain-Specific Languages: A Systematic Mapping Study , 2016, Inf. Softw. Technol..

[14]  Markus Helfert,et al.  Software and Data Technologies , 2008 .

[15]  Qian Wang,et al.  Rapidly prototyping implementation infrastructure of domain specific languages: a semantics-based approach , 2005, SAC '05.

[16]  Hui Wu,et al.  Grammar‐driven generation of domain‐specific language debuggers , 2008, Softw. Pract. Exp..

[17]  Eelco Visser,et al.  Declaratively defining domain-specific language debuggers , 2011, GPCE '11.

[18]  Uday S. Reddy,et al.  Objects as closures: abstract semantics of object-oriented languages , 1988, LISP and Functional Programming.

[19]  Benoît Combemale,et al.  A Design Pattern to Build Executable DSMLs and Associated V&V Tools , 2012, 2012 19th Asia-Pacific Software Engineering Conference.

[20]  Matthias Felleisen,et al.  Abstract continuations: a mathematical semantics for handling full jumps , 1988, LISP and Functional Programming.

[21]  Susan L. Graham,et al.  Gprof: A call graph execution profiler , 1982, SIGPLAN '82.

[22]  Anthony M. Sloane,et al.  Domain-specific program profiling and its application to attribute grammars and term rewriting , 2014, Sci. Comput. Program..

[23]  Hans Vangheluwe,et al.  Debugging in Domain-Specific Modelling , 2010, SLE.

[24]  Jan Vraný,et al.  A Debugger for the Interpreter Design Pattern , 2007, ICSOFT/ENASE.

[25]  Norman Matloff,et al.  The Art of Debugging with GDB, DDD, and Eclipse , 2008 .

[26]  Marjan Mernik,et al.  Domain-Specific Languages: A Systematic Mapping Study , 2017, SOFSEM.

[27]  Paul Hudak,et al.  Semantics directed program execution monitoring , 1995, Journal of Functional Programming.

[28]  M Mernik,et al.  When and how to develop domain-specific languages , 2005, CSUR.

[29]  Paul Hudak,et al.  Monitoring semantics: a formal framework for specifying, implementing, and reasoning about execution monitors , 1991, PLDI '91.

[30]  Mireille Ducassé,et al.  Generic and Efficient Program Monitoring by trace analysis , 2003, ArXiv.

[31]  Jens Palsberg,et al.  A Denotational Semantics of Inheritance and its Correctness , 1989, OOPSLA.

[32]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .