<!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>
      <journal-title-group>
        <journal-title>Parsing</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>A Model-Driven Solution for Financial Data Representation Expressed in FIXML</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Ottawa School of Electrical Engineering and Computer Science</institution>
          ,
          <addr-line>Ottawa</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2014</year>
      </pub-date>
      <volume>314</volume>
      <issue>333</issue>
      <abstract>
        <p>In this paper, we propose a solution based upon Umple for data transformation of Financial Information eXchange protocol (FIXML). The proposed solution includes syntactic and semantic analysis and automatic code generation. We discuss our solution based on development effort, modularity, complexity, accuracy, fault tolerance, and execution time factors. We have applied our technique to a set of FIXML test cases and evaluated the results in terms of error detection and execution time. Results reveal that Umple is suitable for the transformation of FIXML data to object-oriented languages.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Accuracy of information elicited via financial data processing is crucial to decision makers and portfolio
managers in financial domains [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Achieving this goal for huge volume of data might be difficult
or impossible without automated, dependable, flexible, and scalable implementation solutions.
Modelbased design and automated code generation methods [
        <xref ref-type="bibr" rid="ref11 ref7">7, 11</xref>
        ], thereby provide inter-connected partial
solutions to developing these systems with minimum effort and defects. Proponents of these methods
[
        <xref ref-type="bibr" rid="ref6 ref7 ref9">6, 9, 7</xref>
        ] argued that they tend to deliver better quality artifacts because of their promises of higher
productivity, reduced turn-around times, increased portability, and elimination of manual coding errors.
      </p>
      <p>
        Hence, this paper provides a transformation solution to financial transactions expressed in a FIXML
format. Our transformation approach reverse engineers FIXML data into Umple model which is
translated later into targeted object-oriented languages. In our transformation, Umple is seen as M1 level in
which Umple classes representing the FIXML schema. Umple [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ] is an open-source model-oriented
language we adopted for the FIXML transformation contest [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Proposed solution allows us to have
a real-time graphical visualization of FIXML documents, which is done without code generation, in the
form of a class diagram. Input FIXML documents can be processed in three environments including
UmpleOnline [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], Umple Eclipse plugin, and Umple command-line tool [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The results obtained from
the test cases show that the generated code is syntactically and semantically accurate and robust.
      </p>
      <p>
        The rest of this paper is organized as follows. In Section 2, we present why Umple has been chosen
for this transformation. Section 3 describes our solution based upon parsing, analysis, and code
generation. We will focus on the evaluation of our work and results in Section 4. Finally, we will present the
conclusions in Section 5.
Umple [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ] is an open-source model-oriented language which we have adopted for FIXML
transformation contest [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Our reasons for choosing Umple are as follows. Firstly, the lightweight capabilities
of Umple allow modelers and programmers to seamlessly build applications by having a coding layer
within the textual model, which is impossible with just modelling solutions [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Secondly, Umple has
been developed with a focus on three key qualities named usability, completeness, and scalability. These
are prerequisite to any successful tools for generating code from a plethora of data, which is usually
generated, and often require processing from financial domains. Thirdly, the integration of FIXML to Umple
only requires us to define a grammar to parse FIXML documents and create instances of its meta-model.
The parser analyses the input text statically against the defined FIXML grammar. Upon successful static
analysis, Umple constructs the internal model of the input as an instance of its own metamodel which
is then used to generate the target languages. Fourthly, Umple has already supported code-generation
for several object-oriented programming languages. Last but not least, it allows us to visualize the
corresponding UML class diagram with attributes and associations between them. This diagram helps to
visualize FIXML documents automatically. Umple’s architecture is presented in Figure 1.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Our solution to the FIXML challenge</title>
      <p>To address the challenge, we added an extension to Umple to parse FIXML documents and to process
them such that they become instances of Umples own internal metamodel. We use Umples mixin
capability to inject the algorithm for analysis of the FIXML input into Umple. The mixin capability helps us
not to alter base Umple code but to create the FIXML extension as a separate concern. The Umple mixin
mechanism automatically adds the algorithm to the core of Umple.</p>
      <p>The first step in our process is to create a valid model from a FIXML document. To achieve this,
we need to perform a syntactic and sematic validation of FIXML documents. We validated FIXML
documents in two phases. In the first phase, our parser verifies that we have a syntactically valid FIXML
document. Then, it produces an internal syntax tree but does not cover semantic checking yet. In the
second phase, we do semantic checking for FIXML documents. This validates that we have the same
opening and ending tag names. In the second step of having a valid model, Umple meta-model which
adds semantic constraints guarantees that we have a valid model and also generates completely valid
code for target programming languages.</p>
      <p>
        For syntactic validation, we have defined a set of grammars to parse FIXML documents. The FIXML
grammar can be accessed at [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] . Umple has its own EBNF syntax which has special features adapted to
processing source that contains multiple languages.
      </p>
      <p>
        In our solution, we consider tag attributes to be Umple attributes for the model. In the process of
analysis, we detect the type of attributes (Integer, Double, and String) and use the correct Umple types for
these attributes. On the other hand, whenever we are unable to detect correct types, we assigned a String
type. With this we are able to have a correct and robust model and code generation. We also are able to
detect the errors in the values of attributes. Moreover, we automatically create related set and get methods
for those attributes. We defined attributes with private visibility and generated automatically related set
and get methods so as to support data encapsulation. For example, Listing 1 shows a FIXML document
in which there is a tag with three attributes. According to the values of attributes, we have two integer
attributes and a float attribute. The generated code for the FIXML document in Listing 1 is represented
in Listing 2. We removed here set and get methods and other codes (such as constructors, delete, toString
etc.) due to space limitation. All generated code can be obtained online through UmpleOnline [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
1 &lt;FIXML &gt; &lt; Order ClOrdID =" 123456 " Side ="2" Px =" 93.25 " &gt; &lt;/ Order &gt; &lt;/ FIXML &gt;
      </p>
      <sec id="sec-2-1">
        <title>Listing 1: A sample FIXML document</title>
        <p>1 class Order {
2 private int ClOrdID , Side ;
3 private double Px ;
4 // The rest of code }</p>
      </sec>
      <sec id="sec-2-2">
        <title>Listing 2: Java code with proper attribute types</title>
        <p>
          In [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], Lano et al. used an instance variable in generated code for every nested tag in FIXML
documents. This approach is also applied to the nested tags with the same name (which results in the
same objects). Listing 3, for example, shows three nested tags with the same name called Pty. The
generated code for Java according to the solution proposed in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] is shown in Listing 4. In Listing 4,
we can see that there are three instance variables and a constructor with three parameters. This approach
is not correct for large FIXML documents and also it does not have a good code implementation for
associations in model-driven development. In fact, when we have a large FIXML document with a tag
which has more than 255 nested tags, this approach will not work. According to the solution in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ],
we should add all of those object instances as parameters to the related class constructors. However, it
is impossible because there is a limitation on the number of parameters in programming languages (e.g.
limitation of 255 words for method parameters in Java).
1 &lt;PosRpt &gt;
2 &lt;Pty ID =" OCC " R=" 21 "/&gt; &lt;Pty ID =" 99999 " R="4"/&gt; &lt;Pty ID ="C" R=" 38 "/&gt;
3 &lt;/ PosRpt &gt;
        </p>
        <p>Listing 3: A sample FIXML document
1 class PosRpt {
2 Pty Pty_object_1 = new Pty (" OCC " ," 21 " );
3 Pty Pty_object_2 = new Pty (" 99999 " ,"4" );
4 Pty Pty_object_2 = new Pty ("C" ," 38 " );
5 PosRpt ( Pty Pty_1 , Pty Pty_2 , Pty Pty_3 ){
6 this . Pty_object_1 = Pty_1 ;
7 this . Pty_object_2 = Pty_2 ;
8 this . Pty_object_3 = Pty_3 ;
9 }
10 PosRpt (){ } }</p>
      </sec>
      <sec id="sec-2-3">
        <title>Listing 4: Java code generated by the solution in [10]</title>
        <p>We have addressed this with the concept of association in the model and arrays as inputs for those
same objects in the implementation. Listing 5 shows our generated code in which we have just an
instance variable and a constructor with a parameter. With this, we resolved the limitation related to the
number of parameters in programming languages. In the same vein, we have just an instance variable
which helps us not to lose the model-driven meaning of associations even in the code level. It means that
we have an instance variable for each association without worries about multiplicity.</p>
        <p>Pty_Object = new ArrayList &lt;Pty &gt;();
boolean didAddPty_Object = setPty_Object ( allPty_Object );</p>
      </sec>
      <sec id="sec-2-4">
        <title>Listing 5: Java Code generated using our approach</title>
        <p>4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results and Evaluation</title>
      <p>In this section, we present the results and evaluation of our implementation. The code generated from
any given FIXML documents conforms to their native syntax and semantics. We achieved syntactic
conformance by invoking static analyzer embedded in Umple compiler. With this approach, we were
able to uncover errors and modify our implementation to ensure syntactic correctness of the generated
code. In the same vein, we have adopted the concept of associations in order to preserve semantics as
expected. With Umple, creation of links by associations ensures that unique names are created for every
instance variables of the same class and preserves the underlying semantics.</p>
      <p>We raised the level of abstraction, and minimized development time as well as complexity for future
changes. We achieved this with the aid of Umple, which is a level higher than general purpose
programming languages, for developing our solution. We performed model-driven development and automatic
code generation for the solution. This has been achieved with the minimum effort and belief that
future extension or modification will require minimum effort too. The approximate development effort for
implementation, testing and debugging is 5 man-hour.</p>
      <p>
        The solution is robust and detected malformed FIXML documents provided as test cases [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The
solution parses test cases #1, #2, #5, and #6 but the remaining set of test cases are considered as
malformed documents. The parser specifies exactly the tag which includes a sub-tag with errors but it is
unable to show the exact address of the sub-tag. We have been working on a new parsing engine to
solve this issue. Since, Umple has been developed in a modular way, this modification will not have any
side-effect in the functionality of our solution. Our solution also provides a real-time graphical
visualization for FIXML documents. As shown in Figure 2, it can be visualized as a UML class diagram with
attributes and associations between objects (right pane). This is done without code generation so it is
independent of target object-oriented languages.
      </p>
      <p>We have instrumented our compiler with a Timer to measure the time taken to process an input file
and produce the target code. Specifically, the Timer measures the time in ms (System.currentTimeMillis())
taken to 1) parses an input file 2) to analyze and build an instance of the Umple metamodel 3) to generate
source codes. Table 1 summarizes the executions times in milliseconds, for each of the eight FIXML test
cases. It shows that our technique gives good performance results even for larger inputs, as is the case
5</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>for the test #8. The tests were executed on a machine exhibiting the following characteristics: Intel Core
i5-2400 CPU @ 3.10GHz, RAM: 8.00 GB, Win 8 - 64 bits, JRE 7.</p>
      <p>In this paper, we proposed and implemented a solution for automatic object-oriented code generation
for financial data representation expressed in FIXML. In order to achieve this, we utilized Umple which
includes mechanisms for parsing, analysis, and automatic code generation. Extending Umple grammar
to support FIXML satisfied the requirement for accurate syntactic and semantic processing of FIXML
documents and provision of a flexible way for ongoing modification. Furthermore, the solution provides
a real-time visualization for FIXML documents without code generation.</p>
    </sec>
    <sec id="sec-5">
      <title>APPENDIX</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Omar</given-names>
            <surname>Badreddin</surname>
          </string-name>
          (
          <year>2010</year>
          ):
          <article-title>Umple: a model-oriented programming language</article-title>
          .
          <source>2010 ACM/IEEE 32nd International Conference on Software Engineering 2</source>
          , pp.
          <fpage>337</fpage>
          -
          <lpage>338</lpage>
          , doi:10.1145/1810295.1810381.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Omar</given-names>
            <surname>Badreddin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Andrew</given-names>
            <surname>Forward</surname>
          </string-name>
          &amp;
          <string-name>
            <surname>Timothy C Lethbridge</surname>
          </string-name>
          (
          <year>2012</year>
          )
          <article-title>: Model oriented programming: an empirical study of comprehension</article-title>
          .
          <source>In: Proceedings of the 2012 Conference of the Center for Advanced Studies on Collaborative Research</source>
          , CASCON '12,
          <string-name>
            <given-names>IBM</given-names>
            <surname>Corp</surname>
          </string-name>
          ., pp.
          <fpage>73</fpage>
          -
          <lpage>86</lpage>
          . Available at http://dl.acm. org/citation.cfm?id=
          <volume>2399776</volume>
          .
          <fpage>2399784</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>[3] CRuiSE: FIXML Grammar in Umple</article-title>
          . Available at https://code.google.com/p/umple/source/ browse/trunk/cruise.umple/src/umple_fixml.grammar.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>CRuiSE: Umple</given-names>
            <surname>Online</surname>
          </string-name>
          . Available at http://try.umple.org.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>[5] CRuiSE: Umple tools</article-title>
          . Available at http://cruise.eecs.uottawa.ca/umple/UmpleTools.html.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Krysztof</given-names>
            <surname>Czarnecki</surname>
          </string-name>
          &amp; Ulrich
          <string-name>
            <surname>Eisenecker</surname>
          </string-name>
          (
          <year>2000</year>
          )
          <article-title>: Generative Programming: Methods, Tools, and Application</article-title>
          . Addison-Wesley.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Ewen</given-names>
            <surname>Denney</surname>
          </string-name>
          &amp; Bernd
          <string-name>
            <surname>Fischer</surname>
          </string-name>
          (
          <year>2009</year>
          ):
          <article-title>Generating Code Review Documentation for Auto-Generated Mission-Critical Software</article-title>
          .
          <source>In: Third IEEE International Conference on Space Mission Challenges for Information Technology</source>
          , IEEE, pp.
          <fpage>394</fpage>
          -
          <lpage>401</lpage>
          , doi:10.1109/SMC-IT.
          <year>2009</year>
          .54. Available at http://ieeexplore. ieee.org/lpdocs/epic03/wrapper.htm?arnumber=
          <fpage>5226807</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Robert</given-names>
            <surname>Grossman</surname>
          </string-name>
          &amp; Yunhong
          <string-name>
            <surname>Gu</surname>
          </string-name>
          (
          <year>2008</year>
          )
          <article-title>: Data mining using high performance data clouds</article-title>
          .
          <source>In: Proceeding of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining - KDD 08</source>
          , ACM Press, New York, New York, USA, p.
          <fpage>920</fpage>
          . Available at http://dl.acm.org/citation.cfm?id=
          <volume>1401890</volume>
          .
          <fpage>1402000</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Anneke</given-names>
            <surname>Kleppe</surname>
          </string-name>
          , Jos Warmer &amp; Wim
          <string-name>
            <surname>Bast</surname>
          </string-name>
          (
          <year>2003</year>
          )
          <article-title>: MDA Explained: The Model Driven Architecture: Practice and Promise</article-title>
          . Addison-Wesley.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>K.</given-names>
            <surname>Lano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yassipour-Tehrani &amp; K. Maroukian</surname>
          </string-name>
          :
          <article-title>Case study: FIXML to Java, C# and C++</article-title>
          . In: Transformation Tool Contest - TTC2014. Available at https://github.com/TransformationToolContest/ ttc2014-fixml/blob/master/case_description.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M</given-names>
            <surname>Bostro</surname>
          </string-name>
          <article-title>¨m Nakic´enovic´: An Agile Driven Architecture Modernization to a Model-Driven Development Solution - An Industrial Experience Report</article-title>
          .
          <source>International Journal On Advances in Software 5(3-4)</source>
          , pp.
          <fpage>308</fpage>
          -
          <lpage>322</lpage>
          . Available at http://www.thinkmind.org/index.php?view=article&amp;articleid=soft_ v5_
          <fpage>n34</fpage>
          _
          <year>2012</year>
          _
          <fpage>13</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>J.W. O'Brien</surname>
          </string-name>
          (
          <year>1970</year>
          ):
          <article-title>How market theory can help investors set goals, select investment managers and appraise investment performance</article-title>
          .
          <source>Financial Analysts Journal</source>
          <volume>26</volume>
          (
          <issue>4</issue>
          ), pp.
          <fpage>91</fpage>
          -
          <lpage>103</lpage>
          . Available at http: //www.jstor.org/stable/4470707.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>