831 research outputs found
Metamorphic Domain-Specific Languages: A Journey Into the Shapes of a Language
External or internal domain-specific languages (DSLs) or (fluent) APIs?
Whoever you are -- a developer or a user of a DSL -- you usually have to choose
your side; you should not! What about metamorphic DSLs that change their shape
according to your needs? We report on our 4-years journey of providing the
"right" support (in the domain of feature modeling), leading us to develop an
external DSL, different shapes of an internal API, and maintain all these
languages. A key insight is that there is no one-size-fits-all solution or no
clear superiority of a solution compared to another. On the contrary, we found
that it does make sense to continue the maintenance of an external and internal
DSL. The vision that we foresee for the future of software languages is their
ability to be self-adaptable to the most appropriate shape (including the
corresponding integrated development environment) according to a particular
usage or task. We call metamorphic DSL such a language, able to change from one
shape to another shape
Devito: Towards a generic Finite Difference DSL using Symbolic Python
Domain specific languages (DSL) have been used in a variety of fields to
express complex scientific problems in a concise manner and provide automated
performance optimization for a range of computational architectures. As such
DSLs provide a powerful mechanism to speed up scientific Python computation
that goes beyond traditional vectorization and pre-compilation approaches,
while allowing domain scientists to build applications within the comforts of
the Python software ecosystem. In this paper we present Devito, a new finite
difference DSL that provides optimized stencil computation from high-level
problem specifications based on symbolic Python expressions. We demonstrate
Devito's symbolic API and performance advantages over traditional Python
acceleration methods before highlighting its use in the scientific context of
seismic inversion problems.Comment: pyHPC 2016 conference submissio
Bacatá:Notebooks for DSLs, Almost for Free
Context: Computational notebooks are a contemporary style of literate
programming, in which users can communicate and transfer knowledge by
interleaving executable code, output, and prose in a single rich document. A
Domain-Specific Language (DSL) is an artificial software language tailored for
a particular application domain. Usually, DSL users are domain experts that may
not have a software engineering background. As a consequence, they might not be
familiar with Integrated Development Environments (IDEs). Thus, the development
of tools that offer different interfaces for interacting with a DSL is
relevant.
Inquiry: However, resources available to DSL designers are limited. We would
like to leverage tools used to interact with general purpose languages in the
context of DSLs. Computational notebooks are an example of such tools. Then,
our main question is: What is an efficient and effective method of designing
and implementing notebook interfaces for DSLs? By addressing this question we
might be able to speed up the development of DSL tools, and ease the
interaction between end-users and DSLs.
Approach: In this paper, we present Bacat\'a, a mechanism for generating
notebook interfaces for DSLs in a language parametric fashion. We designed this
mechanism in a way in which language engineers can reuse as many language
components (e.g., language processors, type checkers, code generators) as
possible.
Knowledge: Our results show that notebook interfaces generated by Bacat\'a
can be automatically generated with little manual configuration. There are few
considerations and caveats that should be addressed by language engineers that
rely on language design aspects. The creation of a notebook for a DSL with
Bacat\'a becomes a matter of writing the code that wires existing language
components in the Rascal language workbench with the Jupyter platform.
Grounding: We evaluate Bacat\'a by generating functional computational
notebook interfaces for three different non-trivial DSLs, namely: a small
subset of Halide (a DSL for digital image processing), SweeterJS (an extended
version of JavaScript), and QL (a DSL for questionnaires). Additionally, it is
relevant to generate notebook implementations rather than implementing them
manually. We measured and compared the number of Source Lines of Code (SLOCs)
that we reused from existing implementations of those languages.
Importance: The adoption of notebooks by novice-programmers and end-users has
made them very popular in several domains such as exploratory programming, data
science, data journalism, and machine learning. Why are they popular? In (data)
science, it is essential to make results reproducible as well as
understandable. However, notebooks are only available for GPLs. This paper
opens up the notebook metaphor for DSLs to improve the end-user experience when
interacting with code and to increase DSLs adoption
Using domain specific languages to capture design knowledge for model-based systems engineering
Design synthesis is a fundamental engineering task that involves the creation of structure from a desired functional specification; it involves both creating a system topology as well as sizing the system's components. Although the use of computer tools is common throughout the design process, design synthesis is often a task left to the designer. At the synthesis stage of the design process, designers have an extensive choice of design alternatives that need to be considered and evaluated.
Designers can benefit from computational synthesis methods in the creative phase of the design process. Recent increases in computational power allow automated synthesis methods for rapidly generating a large number of design solutions. Combining an automated synthesis method with an evaluation framework allows for a more thorough exploration of the design space as well as for a reduction of the time and cost needed to design a system. To facilitate computational synthesis, knowledge about feasible system configurations must be captured. Since it is difficult to capture such synthesis knowledge about any possible system, a design domain must be chosen. In this thesis, the design domain is hydraulic systems.
In this thesis, Model-Driven Software Development concepts are leveraged to create a framework to automate the synthesis of hydraulic systems will be presented and demonstrated. This includes the presentation of a domain specific language to describe the function and structure of hydraulic systems as well as a framework for synthesizing hydraulic systems using graph grammars to generate system topologies. Also, a method using graph grammars for generating analysis models from the described structural system representations is presented. This approach fits in the context of Model-Based Systems Engineering where a variety of formal models are used to represent knowledge about a system. It uses the Systems Modeling Language developed by The Object Management Group (OMG SysML™) as a unifying language for model definition.M.S.Committee Chair: Paredis, Chris; Committee Member: McGinnis, Leon; Committee Member: Schaefer, Dir
SAGA: A DSL for Story Management
Video game development is currently a very labour-intensive endeavour.
Furthermore it involves multi-disciplinary teams of artistic content creators
and programmers, whose typical working patterns are not easily meshed. SAGA is
our first effort at augmenting the productivity of such teams.
Already convinced of the benefits of DSLs, we set out to analyze the domains
present in games in order to find out which would be most amenable to the DSL
approach. Based on previous work, we thus sought those sub-parts that already
had a partially established vocabulary and at the same time could be well
modeled using classical computer science structures. We settled on the 'story'
aspect of video games as the best candidate domain, which can be modeled using
state transition systems.
As we are working with a specific company as the ultimate customer for this
work, an additional requirement was that our DSL should produce code that can
be used within a pre-existing framework. We developed a full system (SAGA)
comprised of a parser for a human-friendly language for 'story events', an
internal representation of design patterns for implementing object-oriented
state-transitions systems, an instantiator for these patterns for a specific
'story', and three renderers (for C++, C# and Java) for the instantiated
abstract code.Comment: In Proceedings DSL 2011, arXiv:1109.032
Doctor of Philosophy
dissertationDomain-specific languages (DSLs) are increasingly popular, and there are a variety of ways to create a DSL. A DSL designer might write an interpreter from scratch, compile the DSL to another language, express DSL concepts using only the existing forms of an existing language, or implement DSL constructs using a language's extension capabilities, including macros. While extensible languages can offer the easiest opportunity for creating a DSL that takes advantage of the language's existing infrastructure, existing tools for debugging fail to adequately adapt the debugging experience to a given domain. This dissertation addresses the problem of debugging DSLs defined with macros and describes an event-oriented approach that works well with a macro-expansion view of language implementation. It pairs the mapping of DSL terms to host terms with an event mapping to convert primitive events back to domain-specific concepts. Domain-specific events can be further inspected or manipulated to construct domain-specific debuggers. This dissertation presents a core model of evaluation and events and also presents a language design-analogous to pattern-based notations for macros, but in the other direction-for describing how events in a DSL's expansion are mapped to events at the DSL's level. The domain-specific events can enable useful, domain-specific debuggers, and the dissertation introduces a design for a debugging framework to help with debugger construction. To validate the design of the debugging framework, a debugging framework, Ripple, is implemented, and this dissertation demonstrates that with a modest amount of work, Ripple can support building domain-specific debuggers
- …