<!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>
      <title-group>
        <article-title>The Quest for Better Languages: Usage Patterns to the Rescue</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jordi Cabot</string-name>
          <email>jordi.cabot@icrea.cat</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ICREA - UOC</institution>
          ,
          <addr-line>Barcelona</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Software development processes are collaborative in nature. Neglecting the key role of end-users leads to software that does not satisfy their needs. This collaboration becomes specially important when creating Domain-Specific Modeling Languages (DSMLs), which are (modeling) languages specifically designed to carry out the tasks of a particular domain. While end-users are the experts of the domain for which a DSML is developed, their contribution to the actual DSML design is, in most cases, still rather limited. This results in DSMLs that are difficult to use or that, in general, do not respond to the user needs. We argue that observing how a language is actually used in practice and deriving real usage patterns from that is the best approach to improve the language design to make it closer to what users would really like to have.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Domain-Specific Modeling Languages (DSMLs) are a special kind of languages
tailored to solve a particular problem in a domain. As they target a concrete domain, the
development of DSMLs requires a tight collaboration between language developers and
end-users, who are arguably the domain experts. While language developers provide the
technical knowledge, end-users should help in setting the language concepts and
shaping the notation most suitable for the domain.</p>
      <p>
        Indeed, to be useful, the concepts and notation of a language should be as close
as possible to the domain concepts and representation used by the end-users in their
daily practice [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Therefore, involving end-users enriches the process and increases the
chances that they will be pleased by the end result [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2–4</xref>
        ]. Unfortunately, this is an ideal
scenario. In reality, it is rather common that developers work in isolation and end-users
validate prototypes of the language as it evolves [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ].
      </p>
      <p>
        In the last years, several approaches have proposed to make the language
development process more participatory by facilitating the involvement of some end-users,
either by means of example-driven approaches [
        <xref ref-type="bibr" rid="ref6 ref7">7, 6</xref>
        ] or via direct interaction/collaboration
[
        <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
        ]. This is a necessary but not sufficient condition to bridge the gap between users’
needs and language experts when it comes to language design.
Involvement of end-users early on helps to drive the design of the language but it stills
has two major limitations: 1 - The set of users involved is typically small and therefore
not representative of all kinds of user profiles that will be using the language, 2 - Their
feedback is based on their beliefs and opinions, which may change when they try to put
the language to work later on.
      </p>
      <p>Therefore, we propose to extend a language development process with a third phase,
devoted to the analysis of the actual usage of the language (i.e. its usage patterns) once
it is deployed. This process is shown in Figure 1</p>
      <p>Phase 1 consists in developers preparing alone a preliminary version of the
language. In phase 2, this version is improved thanks to the collaboration with a selected
set of end-users. Once deployed, phase 3 targets the collection and analysis of language
data from which a set of bottom-up patterns are inferred.</p>
      <p>Bottom-up (or usage) patterns are generalizations of real solutions for a problem.
In our context, they tell us how users adapt (or twist) the language to be able to express
what they need. Therefore, by extracting and analyzing these patterns we can learn
what are the real-life situations our language is not a well fit for and how we could
evolve it to make sure it covers that scenario in a more natural way. This is a continuous
improvement process since new problems may be uncovered at anytime (maybe even
as a result of the introduction of previous solutions) or users’ needs just change in the
future. Figure 2 depicts this pattern-based language definition process.</p>
      <p>
        The pattern identification/uncovering task can be addressed by means of
corpusbased language analysis techniques [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] where repositories of language instances (i.e.
repositories of models created by users employing that language) are evaluated via
techniques like instance analysis, to determine frequency of individual elements,
relationship analysis, to identify common co-occurrences of metamodel elements, and clone
analysis, which seeks to identify duplicate usage of a collection of elements in the
language.
      </p>
      <p>This characterization of a language gives hints on possible improvements:
– Uncommon elements can be removed from the language to simplify it in a safe way
– Clusters of elements hardly ever co-occurring in the same model suggest the
existence of sublanguages
– Complex language structures appearing often in the corpus could be replaced with
new primitives expressing with a single new element the semantics of the whole
structure</p>
      <p>
        These modifications can then be implemented to generate a new version of the
language to start the next iteration. Keeping a trace of all these language changes (and
discussions since the team of language engineers may go back and forth on some of
those changes before making up their mind) is important to be able to justify the
language evolution at any point in the future. The Collaboro infrastructure can be used for
this [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
3
      </p>
    </sec>
    <sec id="sec-2">
      <title>Conclusion</title>
      <p>We have proposed a pattern-based language definition process for DSMLs that takes
into account the real experiences with the language in order to improve its design. Based
on the analysis of a language corpus, usage patterns can be identified and taken as the
basis to suggest possible improvements.</p>
      <p>So far, these are just hints for the language designer but it would be interesting to
see how accurate they are when applied on a representative set of existing DSLs. Quite
possibly, we could at least (semi)automate the process by automatically refactoring the
language based on these usage patterns. This is left for further work.</p>
      <p>Acknowledgments. Thanks to the PAME’15 Workshop oganizers (E. Syriani, R. Paige,
S. Zschaler and H. Ergin) for letting me share and discuss these ideas at the workshop
and to J. L. Ca´novas Izquierdo and R. Tairas for all the fruitful discussions on language
design over the past years.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Grundy</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hosking</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>K.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>N.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huh</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>R.L.</given-names>
          </string-name>
          :
          <article-title>Generating Domain-Specific Visual Language Tools from Abstract Visual Specifications</article-title>
          .
          <source>IEEE Trans. Softw. Eng</source>
          .
          <volume>39</volume>
          (
          <issue>4</issue>
          ) (
          <year>2013</year>
          )
          <fpage>487</fpage>
          -
          <lpage>515</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Kelly</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pohjonen</surname>
          </string-name>
          , R.:
          <article-title>Worst practices for domain-specific modeling</article-title>
          .
          <source>IEEE Softw</source>
          .
          <volume>26</volume>
          (
          <issue>4</issue>
          ) (
          <year>2009</year>
          )
          <fpage>22</fpage>
          -
          <lpage>29</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Barisˇic´,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Amaral</surname>
          </string-name>
          ,
          <string-name>
            <surname>V.</surname>
          </string-name>
          , Goula˜o,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Barroca</surname>
          </string-name>
          ,
          <string-name>
            <surname>B.</surname>
          </string-name>
          :
          <article-title>Evaluating the Usability of DomainSpecific Languages</article-title>
          .
          <source>In: Formal and Practical Aspects of Domain-Specific Languages: Recent Developments</source>
          . (
          <year>2012</year>
          )
          <fpage>386</fpage>
          -
          <lpage>407</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Vo¨lter, M.: MD*/DSL Best Practices (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Mernik</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heering</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sloane</surname>
            ,
            <given-names>A.M.</given-names>
          </string-name>
          :
          <article-title>When and How to Develop Domain-specific Languages</article-title>
          .
          <source>ACM Comput. Surv</source>
          .
          <volume>37</volume>
          (
          <issue>4</issue>
          ) (
          <year>2005</year>
          )
          <fpage>316</fpage>
          -
          <lpage>344</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Cho</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gray</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Syriani</surname>
          </string-name>
          , E.:
          <article-title>Creating Visual Domain-Specific Modeling Languages from End-User Demonstration</article-title>
          . In: MiSE workshop. (
          <year>2012</year>
          )
          <fpage>29</fpage>
          -
          <lpage>35</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lo</surname>
          </string-name>
          <article-title>´pez-Ferna´ndez</article-title>
          ,
          <string-name>
            <given-names>J.J.</given-names>
            ,
            <surname>Cuadrado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.S.</given-names>
            ,
            <surname>Guerra</surname>
          </string-name>
          , E.,
          <string-name>
            <surname>de Lara</surname>
          </string-name>
          , J.:
          <article-title>Example-driven meta-model development</article-title>
          .
          <source>Software and System Modeling</source>
          <volume>14</volume>
          (
          <issue>4</issue>
          ) (
          <year>2015</year>
          )
          <fpage>1323</fpage>
          -
          <lpage>1347</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. Ca´novas Izquierdo,
          <string-name>
            <given-names>J.L.</given-names>
            ,
            <surname>Cabot</surname>
          </string-name>
          , J.:
          <article-title>Enabling the Collaborative Definition of DSMLs</article-title>
          . In: CAiSE conf. (
          <year>2013</year>
          )
          <fpage>272</fpage>
          -
          <lpage>287</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Umuhoza</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brambilla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ripamonti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabot</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>An empirical study on simplification of business process modeling languages</article-title>
          .
          <source>In: SLE conf. (</source>
          <year>2015</year>
          )
          <fpage>13</fpage>
          -
          <lpage>24</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Tairas</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabot</surname>
          </string-name>
          , J.:
          <article-title>Corpus-based analysis of domain-specific languages</article-title>
          .
          <source>Software and System Modeling</source>
          <volume>14</volume>
          (
          <issue>2</issue>
          ) (
          <year>2015</year>
          )
          <fpage>889</fpage>
          -
          <lpage>904</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>