<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Tudor Gˆırba feenk gmbh Bern</institution>
          ,
          <addr-line>Switzerland tudorgirba.com</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>-Programming languages evolved towards letting developers design software applications in terms of domain abstractions. What about development tools? While developers express software using programming languages, they craft software exclusively by interacting with development tools. Unfortunately, all too often developers rely on rigid development tools, focused on programming language constructs, unaware of application domains. On the one hand, we educate developers to shape custom and rich domain models. On the other hand, we still force them to use a one-size-fits-all-paradigm when it comes to development tools. One way to approach this abstraction gap is to empower developers to shape their development tools together with their domain models. In this extended abstract we explore how this can transform debugging and debuggers, and delve into what is needed to make this view a reality. We argue that to achieve this, debugging infrastructures need to support the straightforward and inexpensive creation of custom debuggers by leveraging the explicit representation of the underlying application domains.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Extending debuggers to capture domain-specific aspects</p>
      <p>
        Software applications capture abstract models of the real should be as obvious as writing unit tests. Attaining this goal
world as executable models (i.e., programs) within the design is a challenging endeavour as it raises many questions: What
space of a programming language. Model-driven engineering are the right extension mechanisms? How inexpensive can
provides developers with different mechanisms for facilitat- the creation of a domain-specific debugger really be? Let us
ing the creation of models, like domain-specific modelling explore next the first of these questions in more details.
languages [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Object-oriented programming in particular sup- Understanding a domain model requires first and foremost
ports this desideratum by allowing developers to model their reasoning about its individual domain objects. Traditional
domains in terms of objects and message sends. debuggers support this through the use of object inspectors
      </p>
      <p>
        Debugging software applications requires developers to that favor a generic view showing only the state of an object.
(i) navigate between domain abstractions and the code that While universally applicable, this solution does not take into
addresses those abstractions, and (ii) understand domain ab- account the varying needs of developers that could benefit
stractions together with their interactions. Traditional debug- from domain-specific views and exploration possibilities [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
gers support this activity by focusing on generic stack-based For example, we should display an object representing a parser
operations, line breakpoints, and generic user interfaces. This using a view that shows its grammar productions, and a widget
impedes the ability of developers to take direct advantage using a view that shows its actual graphical representation
of the domain, leading to a fragmentation of their domain- or its containment structure. Hence, a moldable debugging
specific questions into low-level ones that can be answered with infrastructure should start by enabling developers to view
available tools [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. To eliminate this abstraction gap developers model elements using multiple tailored views, and facilitate
should rely on debuggers that work at the level of abstraction the creation and integration of new views.
of an application’s domain and enable domain-specific views, Understanding domain objects in isolation is not enough.
queries and analyses [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. While this goal is clear, it is not Depending on the application domain and their task, developers
always straightforward to reach. need to correlate information from multiple sources. For
example, when debugging a parser both the grammar rules
      </p>
      <p>I I . D E V E L O P E R S A S T O O L B U I L D E R S and the input being parsed are of interest; when debugging
When developers encounter domain-specific questions for an event-driven system, the publisher, the subscriber, and the
which their debuggers or development tools do not offer event are of interest. A moldable debugging infrastructure
a direct answer, they have the option to adapt those tools. should support the creation of multiple domain-specific user
interfaces for debugging that extract and highlight relevant data
from application domains. A tailored user interface consists
in multiple widgets, each showing custom views for domain
objects.</p>
      <p>Once developers have custom user interfaces offering
domain-specific views, they also need to navigate through the
execution at the level of abstraction of those domains. If the
domain is that of a parser, stepping through the execution
at the level of grammar production or the input string is
what is needed. If it is an event-driven system, the right
level of abstraction is given by the propagation of events
through the system. To enable this, a moldable debugging
infrastructure needs to allow developers to create debugging
operations that express and automate high-level abstractions
from application domains. Debugging operations are then
attached to the appropriate widgets.</p>
      <p>
        While addressing the basic information needs in a debugger,
the aforementioned mechanisms are not enough. During
debugging, developers cannot know in advance in what situations
they will find themselves in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Hence, they might begin with
the wrong user interface and set of actions. If they do not
know that certain views and actions are applicable for their
current debugging context, they will not use them. A moldable
debugging infrastructure can address this by attaching to every
view, widget and action an activation predicate, i.e., a boolean
condition over the state of the program capturing those states
in which the extension is applicable. Then, only extensions
applicable in the current debugging context are made available;
if two or more user interfaces are applicable a developer should
be able to switch at run time between them.
      </p>
      <p>
        For developers to extend their debuggers, the cost associated
with creating extensions should be small. How we define cost,
and the way to reduce it, depends on the mechanism for
defining extensions. If we automatically generate debugging
extensions from a model’s specification [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], the cost
goes into creating well-formed specifications for models. If we
provide developers with a toolset for constructing debugger
extensions on top of their models, cost is related to the effort
needed to develop and maintain these extra extensions.
      </p>
      <p>
        Through the Moldable Debugger1 we explored the second
direction, in the context of object-oriented programming [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], as
object-oriented programming provides developers with a direct
way of expressing domain models using objects. Debuggers
however rarely take those models into account.
      </p>
      <p>We observed that the cost of creating custom views for
domain objects can be significantly reduced. Moose,2 a
platform for software and data analysis comes with more than
230 extensions for visualising objects, ranging from parsers
and compiled code to graphical widgets. Custom views are
expressed using an internal DSL that supports different kinds</p>
      <p>1The Moldable Debugger is a model of an extensible debugger. GTDebugger
is an implementation of this model in Pharo (pharo.org) as part of the GToolkit
(gtoolkit.org).</p>
      <p>2moosetechnology.org
of views. On average creating a view requires 9 lines of code.</p>
      <p>Combining these views to form custom user interfaces and
adding debugging actions increases the cost. Moose also ships
with six custom debuggers. By providing internal DSLs for
constructing user interfaces and specifying debugging actions,
a debugger can be created in under 500 LOC of code, on
top of a base implementation of 1500 LOC. Certainly, the
LOC metric must be taken with care as it does not indicate
the time and expertise needed to write the lines. Nevertheless,
it does provide a good indication of the small size of these
domain-specific debuggers. By supporting each step of the
customisation through an internal DSL, developers do not have
to learn new syntaxes, only dedicated APIs.</p>
      <p>Given the difficulty of debugging, improving how developers
view and navigate their models is needed, even if the cost
of creating custom debuggers is high. A low cost can make
this activity even more appealing. In today’s world, we rarely
develop an application without tests, or depend on external
components without tests. In tomorrow’s world, we should be
as demanding when it comes to debugger extensions.</p>
      <p>R E F E R E N C E S</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>B.</given-names>
            <surname>Combemale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Deantoni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Baudry</surname>
          </string-name>
          , R. B. France,
          <string-name>
            <surname>J.-M. Je</surname>
          </string-name>
          <article-title>´ze´quel, and</article-title>
          <string-name>
            <given-names>J.</given-names>
            <surname>Gray</surname>
          </string-name>
          , “Globalizing modeling languages,
          <source>” Computer</source>
          , vol.
          <volume>47</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>68</fpage>
          -
          <lpage>71</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Sillito</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. C.</given-names>
            <surname>Murphy</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          K. De Volder, “
          <article-title>Asking and answering questions during a programming change task</article-title>
          ,
          <source>” IEEE Trans. Softw</source>
          . Eng., vol.
          <volume>34</volume>
          , pp.
          <fpage>434</fpage>
          -
          <lpage>451</lpage>
          , Jul.
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>O.</given-names>
            <surname>Nierstrasz</surname>
          </string-name>
          , “
          <article-title>The death of object-oriented programming,” in FASE 2016, ser</article-title>
          . LNCS,
          <string-name>
            <given-names>P.</given-names>
            <surname>Stevens</surname>
          </string-name>
          and
          <string-name>
            <surname>A</surname>
          </string-name>
          . Wasowski, Eds., vol.
          <volume>9633</volume>
          . SpringerVerlag,
          <year>2016</year>
          , pp.
          <fpage>3</fpage>
          -
          <lpage>10</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Whittle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hutchinson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rouncefield</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Burden</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Heldal</surname>
          </string-name>
          , Model-Driven
          <source>Engineering Languages and Systems: 16th International Conference, (MODELS</source>
          <year>2013</year>
          ). Berlin, Heidelberg: Springer Berlin Heidelberg,
          <year>2013</year>
          , ch.
          <article-title>Industrial Adoption of Model-Driven Engineering: Are the Tools Really the Problem?</article-title>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>17</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>E. K.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Bird</surname>
          </string-name>
          , and T. Zimmermann, “
          <article-title>Build it yourself! Homegrown tools in a large software company</article-title>
          ,
          <source>” in Proceedings of the 37th International Conference on Software Engineering</source>
          . IEEE - Institute of Electrical and Electronics Engineers, May
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>T.</surname>
          </string-name>
          <article-title>Gˆırba and A</article-title>
          . Chis¸, “Pervasive Software Visualizations,”
          <source>in Proceedings of 3rd IEEE Working Conference on Software Visualization, ser. VISSOFT'15</source>
          . IEEE, Sep.
          <year>2015</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Chis</surname>
          </string-name>
          ¸, T. Gˆırba,
          <string-name>
            <given-names>O.</given-names>
            <surname>Nierstrasz</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Syrel</surname>
          </string-name>
          , “The Moldable Inspector,”
          <source>in Proceedings of the 2015 ACM International Symposium on New Ideas</source>
          , New Paradigms, and
          <article-title>Reflections on Programming and Software, ser</article-title>
          . Onward!
          <year>2015</year>
          . New York, NY, USA: ACM,
          <year>2015</year>
          , pp.
          <fpage>44</fpage>
          -
          <lpage>60</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>DeLine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bragdon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Rowan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Jacobsen</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S. P.</given-names>
            <surname>Reiss</surname>
          </string-name>
          , “
          <article-title>Debugger canvas: industrial experience with the code bubbles paradigm</article-title>
          ,”
          <source>in Proceedings of the 2012 International Conference on Software Engineering</source>
          , ser.
          <source>ICSE</source>
          <year>2012</year>
          . Piscataway, NJ, USA: IEEE Press,
          <year>2012</year>
          , pp.
          <fpage>1064</fpage>
          -
          <lpage>1073</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>P. R.</given-names>
            <surname>Henriques</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J. V.</given-names>
            <surname>Pereira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mernik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lenic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gray</surname>
          </string-name>
          , and H. Wu, “
          <article-title>Automatic generation of language-based tools using the LISA system,” Software, IEE Proceedings -</article-title>
          , vol.
          <volume>152</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>54</fpage>
          -
          <lpage>69</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>E.</given-names>
            <surname>Bousse</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Corley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Combemale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gray</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Baudry</surname>
          </string-name>
          , “
          <article-title>Supporting Efficient and Advanced Omniscient Debugging for xDSMLs,”</article-title>
          <source>in 8th International Conference on Software Language Engineering (SLE)</source>
          , Pittsburg, United States, Oct.
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Chis¸</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Denker</surname>
          </string-name>
          , T. Gˆırba, and
          <string-name>
            <given-names>O.</given-names>
            <surname>Nierstrasz</surname>
          </string-name>
          , “
          <article-title>Practical domainspecific debuggers using the Moldable Debugger framework</article-title>
          ,”
          <source>Computer Languages, Systems &amp; Structures</source>
          , vol.
          <volume>44</volume>
          ,
          <string-name>
            <surname>Part</surname>
            <given-names>A</given-names>
          </string-name>
          , pp.
          <fpage>89</fpage>
          -
          <lpage>113</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>