<!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>Ontology, rule and DSL-based software re-engineering: a case study</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nuno Silva</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paulo Maio</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexandre Gouveia</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Evaristo Figueiredo</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rui Lopes</string-name>
          <email>rlopes@digitalwind.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DigitalWind</institution>
          ,
          <addr-line>Lda., 3810-498 Aveiro</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Engineering, Polytechnic of Porto</institution>
          ,
          <addr-line>4249-015 Porto</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>uebe.Q is a managing software for solid referential information systems, such as ISO 9000 (for quality) and ISO 1400 (for environment). This is a long-term developed software, encompassing extensive and solid business logic with a long and successful record of deployments. A recent business model change imposed that the evolution and con guration of the software, shifts from the company (and especially the development team) to consultants and other business partners. The so far acceptable rigidity, fragility, immobility and opacity of the software became a problem. This paper describes the approach adopted in re-engineering the software by using (i) ontologies for the speci cation of business concepts, (ii) closed-world assumption (CWA) rules for the speci cation of the dynamics of the system and (iii) DSL for the con guration of the system by domain/business experts.</p>
      </abstract>
      <kwd-group>
        <kwd>Software re-engineering Ontology Rules Semantic WS</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>uebe.Q3 is an information managing software for solid referential information
systems, such as ISO 9000 (for quality) and ISO 1400 (for environment). This is
a long-term developed software, encompassing extensive and solid business logic
with a long and successful record of deployments in di erent business areas and
countries. Currently and for the last decade, when uebe.Q software is deployed
for/on a customer, an extensive and speci c con guration process takes places
involving the customer's business experts and the DigitalWind's software
development and operation teams. So, typically, DigitalWind is the developer, the
seller and the business consultant altogether.</p>
      <p>A recent business model change determined that the con guration and
adaptation tasks of the software shifts from the DigitalWind's development and
operation teams to third-party consulting and other business partners.</p>
      <p>However, uebe.Q con guration and deployment requires strong business and
technological expertise, thus constraining the adoption of the new business model.</p>
    </sec>
    <sec id="sec-2">
      <title>3 http://www.uebeq.com</title>
      <p>
        In addition, because con guration often requires speci c re nement of the
software, its rigidity, fragility, opacity and immobility [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is emphasized, hence
compelling its re-engineering.
      </p>
      <p>Consequently, the goal of the project is to facilitate the software con guration
by business experts and consultants while improving the con gurability and
adpatability of the software. For that, it is prescribed an approach combining:
{ ontologies, that allows the con guration of the business concept according
to the enterprise's business, department or individual employee;
{ rules, that allows the speci cation of business rules/constraints upon the
ontological concepts, which goes beyond the expressivity of the ontological
constraints.
{ DSL (Domain-Speci c Language), developed with the purpose to facilitate
the business experts/consultants to con gure the system with minimal or no
technical skills.
2</p>
      <sec id="sec-2-1">
        <title>Proposal</title>
        <p>The legacy software (left-hand side of Fig. 1) adopts a client-server
architectural style, whose backend (i.e. the server part) evolved into a large monolithic
, developed in a myriad of frameworks (e.g. ASP, ASP.Net) and programming
languages (e.g. C#, VB.Net). The backend is responsible for the data access
(from/to relational database), business logic and server-side generation of the
Rich Internet Application client-side UI pages (in HTML and JS).</p>
        <p>Ontology, rule and DSL-based software re-engineering: a case study</p>
        <p>
          While the business logic captured by the backend is a relevant asset, it su ers
from rigidity, fragility, opacity and immobility [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], frustrating a conservative and
traditional evolution. In that sense, the system has been re-engineered,
exploiting the functionalities (i.e. business logic) of the legacy system while allowing
the creation of new ones and their de nition at con guration time. The added
components (at the right-hand side of Fig. 1) include the dySMS Core, the SPA
frontend and the DSL-based con gurator.
        </p>
        <p>The dySMS Core component reads data directly from the legacy database,
but the original business logic might be needed to update, delete or create data.</p>
        <p>The DSL-based Con gurator allows the business consultant to de ne the
domain-speci c ontology (model) and respective (business) rules. The DSL has
been developed in the JetBrains Meta Programming System 4 which provides
a projectional editor that drives the con gurator tasks according to the
DSLcaptured structure and semantics (Fig. 3).</p>
        <p>The semantics de ned through the ontology and rules follows a hierarchical
policy, in which the semantics de ned at a hierarchy level binds to the semantics
de ned in top hierarchy levels, promoting organizational reasoning consistency.</p>
        <p>Fig. 2 depicts the inner architecture of the backend, including the identi
cation of the parts/responsibilities and the details of the con guration interfaces.
The system has the following components:
{ Model, is the set of classes and respective instances that are managed by
the system. The classes, associations and constraints corresponds to the
ontology(ies) de ned by the consultant using the DSL-based Con gurator (cf.
Fig. 3). A re ection-based approach generates on-the- y the con
gurationtime-de ned classes, allowing the system to operate with whatever classes
structure is required.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4 https://www.jetbrains.com/mps/</title>
      <p>
        { ORM, which is responsible for the data access of the relational database and
the instantiation of the classes. The mapping between the ontology and the
database schema is de ned by the business consultant using the DSL-based
con gurator (cf. Fig. 3) complemented by an ontology mapping information
integration decision support system (cf. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]).
{ Drools (https://www.drools.org) is a closed world assumption rule engine
that reasons upon the model/ontology using a Closed World Assumption
(CWA).
{ Render is responsible for the projection and serialization of the data
according to the authorization, projection and serialization rules, also con gured.
{ Services is the set of semantic REST web services that are responsible for
the availability of the new functionalities. The component delegates the
responsibilities in the other components as suggested in the diagram.
      </p>
      <sec id="sec-3-1">
        <title>Summary</title>
        <p>The combination of ontology, rules and the CWA reasoning provided by Drools
allows adopting the same con guration/speci cation approach to di erent
dimensions of the system, such as business rules, ORM, authorization and
rendering. Running e orts are focused in adopting the approach in further customers
and its adoption to other software.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Martin</surname>
            ,
            <given-names>R. C.</given-names>
          </string-name>
          :
          <article-title>Designing Object Oriented Applications using UML. 2d. edn</article-title>
          . Prentice Hall (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gouveia</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martins</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>A Rule-Based DSS for Transforming Automatically-Generated Alignments into Information Integration Alignments</article-title>
          .
          <source>In: 19th Int. Conf. on Inf. Integration and Web-Based Applications &amp; Services</source>
          , pp.
          <volume>181</volume>
          {
          <fpage>87</fpage>
          .
          <string-name>
            <surname>Salzburg</surname>
          </string-name>
          ,
          <string-name>
            <surname>Austria</surname>
          </string-name>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>