<!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>An Hybrid Design Solution For Spacecraft Simulators</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vtor Rodrigues</string-name>
          <email>victor.rodrigues@esa.int</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Joªo Correia Lopes</string-name>
          <email>jlopes@fe.up.pt</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ana Moreira</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dept. InformÆtica, Universidade Nova de Lisboa</institution>
          ,
          <addr-line>2829-516 Caparica</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>ESOC/ESA</institution>
          ,
          <addr-line>D-64293 Darmstadt</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Faculdade de Engenharia da Universidade do Porto</institution>
          ,
          <addr-line>4200-465 Porto</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>INESC Porto</institution>
          ,
          <addr-line>4200-465 Porto</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff4">
          <label>4</label>
          <institution>Oristeba Space Services</institution>
        </aff>
      </contrib-group>
      <fpage>29</fpage>
      <lpage>32</lpage>
      <abstract>
        <p>The European Space Agency (ESA) has created the Simulation Model Portability 2 ( SMP2 ) standard with the purpose to provide a design solution for the project of Spacecraft Simulators. One element of the SMP2 standard is the metamodel Simulation Model Denition Language (SMDL). The design artefacts of a Spacecraft Simulator consist in descriptions of the business logic shared by a set of SMP2 models. This paper reports results from a study that considers the hypothesis to complement the model-driven design approach of the SMP2 standard with test-driven design techniques. The high-level abstractions of Spacecraft Simulators are used to carry out Model-Driven Development processes, while reusable pieces of software that can to be used by many SMP2 models are designed and developed following Test-Driven-Development . The tool capable to establish the dependencies between the source code produced by the two methodologies and mission specic source code is the GNU Build System.</p>
      </abstract>
      <kwd-group>
        <kwd>simulation model portability</kwd>
        <kwd>model-driven development</kwd>
        <kwd>testdriven development</kwd>
        <kwd>GNU build system</kwd>
        <kwd>hybrid design techniques</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The design of Spacecraft Simulators is based upon a component model specied
by the the SMDL modeling language which focuses primarily on interface reuse
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. SMP2 models are described in SMP2 design artefacts that are transformed
into C++ skeletons into which the behaviour implementations must be added.
Although model-driven design is ideal for developing software in multiple
computing platforms, multiple implementations of the same interface is left out of
its scope [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Our objective is to deconstruct the purely top-down strategy of
model-driven development using the SMP2 standard onto a bottom-up
development process of a SMP2 Framework [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. On the other hand, reusable behaviour
implementations of a Spacecraft Simulator are developed on top of a distinct
software framework called Infrastructure Framework developed with test-driven
techniques. The hybrid design solution aggregates the principles of both software
development approaches.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <p>Design prototyping in object orientation is the activity of using objects that
represent abstract entities to dene design models. From this premise follows
that the planning of the coding activity is done by describing the objects and
the business logic they share. Although the design models are written before
any programming language specication, we can establish a direct
correspondence between the symbology of a modeling language and the symbology of a
programming language, thus making the design models a cross-platform
specication from which model-driven development departures.</p>
      <p>A dierent approach to software design is the specication of code
functionalities through test code. Using only test code it is possible to design a piece
of software before entering the stage of source code development. Similarly to
design models, test code is a design artefact, but it does not follow a pre-dened
semantic scheme as per design models. Nonetheless, test-driven development is
a restrained process, carried out in closed loop through source code refactoring
which makes it appropriated for developing software systems that are continually
evolving.</p>
      <p>
        This GNU Build System provides modelling languages to specify
dependencies between source packages [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Cross-platform processes of creation of
makeles are integrated within the development of SMP2 components, making
possible the attempt of several congurations involving the SMP2 models and the
reusable libraries, which derive from disparate development lines.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Specication</title>
      <p>Our premise is that there are parts of the spacecraft functionality that do not
depend on the business logic conguration, because they are generic, context
independent and, therefore, reusable. Therefore, the implementation of a
Spacecraft Simulator, whether it is accomplished from scratch or as an update to an
existing solution, may be decoupled from the design models.</p>
      <p>
        An hybrid system would be possible to recongure by simply adjusting the
variable parts that in it coexist. The articulation of both frameworks, that is, the
integration of the reusable software inside the SMP2 models, is accomplished by
the GNU Build System (see Figure 1). The creation of a SMP2 model is done
indirectly. Template methods of the SMP2 Framework become hook methods
on the specialized classes and the mechanism of object inheritance is used to
plug-in software components into the framework’s hot spots [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        To build a functional SMP2 software component it is necessary to link the
code skeletons and the infrastructure libraries with glue code designated by
mission specic , which must reach the reusable behaviour provided by the
infrastructure libraries and make the necessary adaptations to, in its own behalf,
provide to the other SMP2 components the behaviour which is specied in the
SMP2 logic structure. This activity constitutes the tuning of the system and the
GNU Build System guarantees that the system is kept in a consistent state [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>Two phases of decoupling are foreseen: the rst decouples interface
descriptions from code skeletons, and the second decouples code skeletons from
behaviour implementations. The transformation between design models and code
skeletons is automated by the model-driven development environment, but the
linking to the behaviour implementations is not oered by the SMP2 standard.</p>
      <p>
        The access to the infrastructure functionalities can be automated by adopting
the ‘Adapter’ and ‘Abstract Factory’ GOF [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] design patterns, reducing the
amount of manual writing and software analysis: if the translation between the
public SMP2 interfaces and the private interfaces of the infrastructure libraries
can be specied using the SMP2 support for metadata, then this translation is
foreseen as yet another transformation inside the MDD environment.
      </p>
      <p>
        The hybrid system is developed by an iterative process. In each iteration it
is possible to rene the SMP2 interface signatures or the behaviour provided
by the infrastructure libraries. The granularity of the SMP2 models is decided
upon metrics analysis and the granularity of the Infrastructure Framework is
determined by the number of dierent contexts where a given library can be
reused. If these two operations converge and if relation between the SMP2 models
and the combination of infrastructure libraries is of the type adapter:adaptee,
then the additional coding of mission specic code will increasingly tend to zero
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        With a pure model-driven design approach the initial prototype becomes the
simulator after completing the coding task. This enforces the validation of the
design in the earlier stages of the project life cycle [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. On the contrary, the risk
of changing the business logic of an hybrid system during development is reduced
since the core tasks of coding are done on top of the Infrastructure Framework .
In such a decoupled system, the SMP2 code skeletons can be regarded as test
code, but there has to be no commitment to an initial high-level design.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>A single design approach is hardly a one-size-ts-all solution. An hybrid system
is more pluralistic because it provides the software engineers with a large set of
building blocks, which are designed to be useful in dierent application contexts
and used to build software systems without a fully pre-fabricated structure. In
this line of thought, the design of Spacecraft Simulators supported in the two
distinct development methodologies of MDD and TDD widens the covering of
the software requirements and produces a more complete project specication.
The advantage of an hybrid solution is the opportunity to circumscribe the
technological push of the SMP2 standard and work exclusively on the design
models and evaluate the impact that the modelling breakdown imposes. The
GNU Build System is the enabling technology for an hybrid design solution,
bringing exibility to the integration of source code derived from the MDD and
TDD development lines.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <source>ESA: Smp 2.0 Handbook. Technical report, EGOS-SIM-GEN-TN-0099 (October</source>
          <year>2004</year>
          )
          <article-title>Issue 1 Revision 0</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Brown</surname>
          </string-name>
          , A.:
          <article-title>An introduction to Model Driven Architecture</article-title>
          ,
          <string-name>
            <surname>Part I</surname>
          </string-name>
          (
          <year>2004</year>
          )
          <article-title>Online resource</article-title>
          : http://www-128.ibm.com/developerworks/rational/library/ 3100.html,
          <source>last accessed on 10-March</source>
          -
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Johnson</surname>
          </string-name>
          , R.E.: Components, Frameworks, Patterns.
          <source>In: ACM SIGSOFT Symposium on Software Reusability</source>
          . (
          <year>1997</year>
          )
          <fpage>1017</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Vaughan</surname>
            ,
            <given-names>G.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Elliston</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tromey</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taylor</surname>
          </string-name>
          , I.L.: GNU Autoconf, Automake, and
          <string-name>
            <surname>Libtool</surname>
          </string-name>
          .
          <source>Sams; 1st edition</source>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Pree</surname>
          </string-name>
          , W.:
          <article-title>Meta Patterns A Means for Capturing the Essentials of Reusable Object-Oriented Design</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          <volume>821</volume>
          (
          <year>1994</year>
          )
          <volume>150</volume>
          +
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Rodrigues</surname>
          </string-name>
          , V.:
          <article-title>On the Specication of Spacecraft Simulators using Object-Oriented Methodologies</article-title>
          .
          <source>Master's thesis</source>
          , University of Oporto, Departament of Electrical and Computer Engineering (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Helm</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Johnson, R.,
          <string-name>
            <surname>Vlissides</surname>
          </string-name>
          , J.: Design Patterns:
          <article-title>Elements of Reusable Object-Oriented Software</article-title>
          .
          <string-name>
            <surname>Addison-Wesley</surname>
          </string-name>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Ambler</surname>
            ,
            <given-names>S.W.:</given-names>
          </string-name>
          <article-title>The Object Primer</article-title>
          . Cambridge University Press (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>