<!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>Also published online by CEUR Workshop Proceedings (CEUR-
WS.org</journal-title>
      </journal-title-group>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Compile-time Unit Testing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>A´ RON BARA´ TH</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>ZOLTA´ N PORKOLA´ B</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Eo¨tvo¨s Lora´ nd University</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Additional Key Words and Phrases: Programming languages</institution>
          ,
          <addr-line>C</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Authors' address: A</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <abstract>
        <p>Unit testing is an essential part in high quality software development. The prerequisite of the system-wide test is that all components are working correctly. Such components are checked by unit tests which are focused on small part of code. Unit tests are isolated from other code fragments and are frequently programmed by using third party tools. In this paper we show how to minimalize the number of the required third party tools, and how to automate unit tests. We aimed to express unit tests as part of the source code, and execute them during the compilation to ensure the quality of the code. Two di erent approaches are presented in this paper: the rst is based on the C++11's new mechanisms, such as constant expressions, and static assertions; the second is based on our experimental programming language, Welltype, which o ers more exible unit testing than C++11 { however, both technique are similar. The key in both approaches to get the compiler to execute additional, user de ned calculations which can result errors during the compilation. In C++11 the static assertions are used to evaluate parts of the unit tests. Since constant expressions are restricted, in this paper we also present a method how to overcome those restrictions, and how to utilize static assertion with constant expressions. Finally, we describe how our experimental language o ers compiler support to evaluate pure expressions at compile-time.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>Modern software development have to take testing into account to ensure the reliability of the software
product. Test-driven development [Beck 2003] requires to specificate the new features first by writing
new test cases, and after implement it to fulfill the test cases. This method provides clear specification
for the new features. Moreover, any reported bugs become test cases, and the way of fixing it is the
same. Finally, all written test cases are part of the regression test.</p>
      <p>Two major kind of tests are known: black-box and white-box testing [Schach 2002]. The black-box
tests are focused on the input and the output: for specific input, the specific output must be provided,
and no matters how. We could say black-box tests are testing the preconditions and the
postconditions [Plosch and Pichler 1999]. The white-box tests are dedicated to get as high code coverage as
possible by providing different inputs to execute distinct parts of the code. Keeping the white-box tests
cases up-to-date requires huge effort when the implementation changes, during a refactor for example.</p>
      <p>The unit tests can be handled different ways. The tests can be written by hand as any regular
program, and refer to the libraries which are tested. This technique is too unflexible, because numerous
additional code is required to make detailed error messages. The more general way is to use an existing
test framework, because of the detailed error messages, large number of tools which are helpful when
1:2</p>
    </sec>
    <sec id="sec-2">
      <title>A´ . Bara´th, Z. Porkola´b</title>
      <p>
        develop tests. Test frameworks are available for all wide-spread programming langu
        <xref ref-type="bibr" rid="ref3">age, for example
gtest [Google 2015</xref>
        ] for C++ and JUnit [Tahchiev et al. 2010] for Java.
      </p>
      <p>However, the test frameworks are usually third party extensions for a language, sometimes came
with a platform-specific library. Furthermore, the created tests are regular programs, which must
be executed manually – or they are part of the build system. When the execution of the tests are
neglected, the quality of the software questionable. Therefore, we need compiler support or at least
some compile-time mechanism to prevent the compilation of the wrong code at all. For example, the
Eiffel programming language introduced the Design by Contract [Meyer 1992].</p>
      <p>In this paper we show a new way to write tests cases in C++11, which are checked by the compiler.
The method uses features are introduced in C++11: the constant expressions, which are expressions
containing only constant expressions or literals, and the compiler is entitled to evaluate them during
the compilation; and the static assertions, which are assertions evaluated during the compilation.
However, these features are very restricted, and requires preparations in the source code to apply. We
present the usage of these mechanisms by an example. Moreover, we present a similar technique in
our experimental programming language: our ongoing development in our compiler is to evaluate pure
expressions during the compilation. With this ability, our compiler will support a rich mechanism for
compile-time unit testing.</p>
      <p>This paper is organized as follows: In Section 2 we give a detailed guide how to write compile-time
unit tests in C++11. The guide is presented with a concrete example. Also, we highlight the limitations
of the method. In Section 3 we present our experimental programming language called Welltype, and
its capability of compile-time unit testing. In Section 4 we describe our future plans to implement
additional functionality for the compile-time unit testing. Our paper concludes in Section 5.</p>
    </sec>
    <sec id="sec-3">
      <title>2. IMPLEMENTATION IN C++11</title>
      <p>
        C++ is a multi-paradigm programming language designed for high performance programming
[Stroustrup 1994; 2013]. In the continuous evolution of the language first object-oriented features have been
introduced, later essential elements of generative programming, like templates and the STL library
were invented. In recent versions in C++14, functional programming achieved more
        <xref ref-type="bibr" rid="ref3 ref4">and more
importance [Meyers 2014</xref>
        ]. In the same time, C++ compile-time programming proved to be a
Turingcomplete sublanguage [Veldhuizen 2003], and template metaprogram applications became popular
[Alexandrescu 2001].
      </p>
      <p>
        By design no language support exists in C++ to construct test cases. However, developers can use
third-party tools and libraries to write tests. One of these tools is the Google Test,
        <xref ref-type="bibr" rid="ref3">also known as
gtest [Google 2015</xref>
        ; Langr 2013; Sigerud et al. 2013], and the Boost Test Library [Rosental 2007]. All
third-party tools carry the same problems:
—it is not ensured the availability on all architectures and operating systems;
—the developer’s responsibility to execute the tests during the development.
      </p>
      <p>The key idea is to relocate the functionality from third-party tools into the C++ compiler. This
endeavor can be observed in other C++ specific areas, for example generating domain-specific languages
at compile-time [Porkol a´b and Sinkovics 2011]; or validating STL usages [Pataki et al. 2010].</p>
      <p>The C++11 introduced the the static assert mechanisms, and the programmers can write
compiletime assertions. Furthermore, the constexpr is introduced for optimization purposes, since the
compiler is entitled to evaluate all constexpr expressions. Note that, before C++11 the compiler could
evaluate functions at compile time as well, but that is done by heavy optimization routines. The constexpr
is more, because the compiler will accept a function as constexpr, when the all called functions are
constexpr, and the functions itself has no side-effect. This definition excludes the usage of global
variables. Consequently, the evaluation of a constexpr function depends only on the arguments. If all
arguments are constants (literals, or return value of a constexpr function), the function will be evaluated
at compile-time. Otherwise, it will be evaulated at run-time. The constexpr functions can be named
as pure functions, since the return value depends on the arguments, and the result is the same every
time. Furthermore, the C++14 relax the restrictions in the constexpr, so more complicated functions
can be written [Smith 2013].</p>
      <p>Putting the static assert and the constexpr together, we can write tests which are evaluated at
compile-time. The compile-time tests are the aid for all problems which came from the third-party
tools, because all actions are performed by the compiler. So, there is no additional dependencies, and
the C++ project is more portable. Using compile-time tests results more reliability, because the source
code will not compile if one of the tests fail.</p>
      <p>However, the compile-time tests requires specific preparation in the software project. The declaration
of the sample class can be seen in Figure 1. Taking advantage of the behavior of the constexpr, all
functions are annotated with the constexpr where it was possible. The constructors are emphasized,
because it is mandatory to construct pair at compile-time. The targeted operation is the operator&lt; –
as it can be seen in the class declaration, it is a friend and a constexpr function.
class pair
{</p>
      <p>int x, y;
public:
constexpr pair() : x(), y() { }
constexpr pair(int x, int y) : x(x), y(y) { }
constexpr int get_x() const { return x; }
friend constexpr bool operator&lt;(const pair &amp; lhs, const pair &amp; rhs);
friend std::ostream &amp; operator&lt;&lt;(std::ostream &amp; os, const pair &amp; rhs);
};
}
}</p>
      <p>The implementation of the two declared operations in the class can be seen in Figure 2. The operator&lt;
has the ordinal behavior of a less-than operator. Note that, this function can be evaluated in
compiletime and in run-time as well, thus, it can be used in static assert statements.
constexpr bool operator&lt;(const pair &amp; lhs, const pair &amp; rhs)
{</p>
      <p>return lhs.x&lt;rhs.x || (lhs.x==rhs.x &amp;&amp; lhs.y&lt;rhs.y);
std::ostream &amp; operator&lt;&lt;(std::ostream &amp; os, const pair &amp; rhs)
{
return os &lt;&lt; '(' &lt;&lt; rhs.x &lt;&lt; ", " &lt;&lt; rhs.y &lt;&lt; ')';</p>
      <p>Fig. 2. Trivial implementation of the operators which belong to the pair class.</p>
      <p>In the sample code above, the implementation of the operator&lt; is correct, however, the correctness
of the operator is not trivial in most of the cases. Since the sample less-than operator can be evaluated
at compile-time, and pair objects can be constructed at compile-time (see the constexpr), the code can
be seen in Figure 3 is valid. Furthermore, the compiler evaluates them, and checks the correctness of
the less-than operator based on the samples.
static_assert(!(pair() &lt; pair()), "OK");
static_assert(pair() &lt; pair(1, 0), "OK");
static_assert(pair(2, 5) &lt; pair(5, 2), "OK");
static_assert(pair(2, 5) &lt; pair(2, 6), "OK");</p>
      <p>The counter-assertions, which fail on evaluation, can be seen in Figure 4. These assertions are
intentionally wrong, and they are constructed to demonstrate the correctness of the static assert.
//static_assert(pair() &lt; pair(), "fail");
//static_assert(pair(3, 0) &lt; pair(), "fail");</p>
      <p>Note that, the static assertions in Figure 3 and in Figure 4 are placed right after the implementation
of the less-than operator. Unlike the regular assert, the static assert can be places everywhere, so
the static assertions are placed outside all functions.</p>
      <p>Using this technique, any test cases can be written inside the source code, and the compiler will
evaluate them during the compilation. Furthermore, using the constexpr is a good practice, since the
pure functions can be validated. Thus, the validation of the pure functions is an additional test, and
also it is a motivation to write critical functions – such as less-than operator – side-effect free.
constexpr bool test_some(int from, int to)
{
}
static_assert(test_some(-100, 100), "test some");
return (from&gt;to) || (pair(from, 0)&lt;pair(from+1, 0) &amp;&amp; test_some(from+1, to));</p>
      <p>Furthermore, test cases can be generated during compilation with constexpr functions. An example
for the test case generator function can be seen in Figure 5. The sample generates 200 different test
cases in total. However, different methods can be designed to increase the coverity.
2.1</p>
    </sec>
    <sec id="sec-4">
      <title>Limitations</title>
      <p>Unfortunately, the constexpr itself is a limitation, since only constexpr functions can be tested at
compile-time. Many other functions, which use input and output (for example: file I/O, lock
mechanisms, networking), and implement intentionally impure functionality (for example: random number
generator, retrieving current time) can not be tested.</p>
      <p>An other limitation is the standard library, because the STL containers can not be used in static
assertions due to the lack of constexpr. But user-defined containers are permitted to use.</p>
      <p>The assertions themselves can be wrong. However, this could be true for any other tests, so this is
not a real limitation.</p>
    </sec>
    <sec id="sec-5">
      <title>3. IMPLEMENTATION IN WELLTYPE</title>
      <p>
        Our experimental programming langu
        <xref ref-type="bibr" rid="ref3">age called Welltype [Bara´ th 2015</xref>
        ], which is an imperative
programming language with strict syntax and semantics. The language provides a strong static type
system, in order to keep the source code clear and easily understandable. Due to the restrictions in the
semantics, the language is resistant to numerous syntactical and semantical vulnerabilities [B
        <xref ref-type="bibr" rid="ref3 ref4">ara´ th
and Porkola´ b 2014</xref>
        ].
      </p>
      <p>The Welltype programming language handles the difference between the pure and the impure
functions. This information is explicitly written in the source code – a function without any from these two
attributes defaulted to pure to prevent misuse. The pure functions in Welltype are nearly the same as
the constexpr functions in C++14. The restrictions for the pure functions are clear: impure functions
can not be used, usage of the global variables are forbidden. The compiler uses this information in
several checks: for example, only pure functions can be used in assertions, and in pre- and post conditions.
This is consequent, because it is unaccepatable when the expression in an assertion has side-effects.
The meaning of the whole program can be totally different with and without assertions.</p>
      <p>We are implementing a new feature in our programming language to support compile-time testing.
The initial version uses the pure function mechanism, because the returned value of the pure functions
are only depends on the arguments. Furthermore, the returned value is always the same, when the
function get the same arguments. Due to this property, the testing of the pure functions are established.</p>
      <p>The default output of our compiler is a binary which can be executed on our virtual machine. This
virtual machine has some special instructions which needed to execute the compiled Welltype
programs efficiently. Since the compiled code can be executed on a virtual machine, and this is part of the
compiler, the compiler itself can execute (almost) any programs during the compilation – even if the
compiler is in cross-compiler mode.</p>
      <p>Putting the parts together, we can implement a compile-time validation mechanism to execute the
tests. If one of the tests fail, the output of the compiler will be dropped, due to the failed test cases. The
pure functions are important components in the mechanism, because the test results can be trusted
for pure functions only.</p>
      <p>A synthetic sample code can be seen in Figure 6.
pure function div(int n, int m) : int
pre { m != 0 }
post(R) { n, m ; old n &gt;= R*old m &amp;&amp;&amp; old n &lt; (R+1)*old m }
assert { div(10, 2)==5 }
assert { div(0, 1)==0 }
assert { div(16, 6)==2 }
assert { div(16, 5)==3 }
assert { div(16, 4)==4 }
//assert { div(1, 0)==0 } // PreconditionViolationException
//assert { div(1, 1)==2 } // AssertionFailedException
assert { div(2, 0)==0 ; PreconditionViolationException }
{
}
return n/m;</p>
      <p>Fig. 6. An example to present the elements of the compile-time unit testing in Welltype.</p>
      <p>The compiler will gather the assert clauses during the compilation, and generates an other
executable program in the memory. This new program will contain all of the assert clauses for every pure
functions. When the new program is generated, the compiler will pass the binary to the virtual
machine. If the virtual machine successfully executed the program, it means, all assertions are passed. It
is important to notice, only the compiler program is used during the compilation and assertion
evaluation. So, the tests will be checked at compile-time. Whenever an assertion fails while running the
tests in the virtual machine, the output will be dropped. This is the expected behavior, because the
implementation contains one or more errors.</p>
      <p>The internal program, which checks the assertion clauses, will be built with the following algorithm:
(1) gather all pure functions with at least one assert clause,
(2) generate a function for each assert clause, which contains a regular assertion with the same
condition,
(3) if the assert clause contains an expected exception, add a single exception handler with the desired
exception,
(4) call all generated functions in the main block.</p>
      <p>If the assertion in a generated function fails, an AssertionFailedException will be raised. This
exception will passed through the main, and will be caught by the virtual machine. This error can be easily
processed in the caller.</p>
    </sec>
    <sec id="sec-6">
      <title>3.1 Limitations</title>
      <p>The solution for the compile-time testing in Welltype uses the pure function mechanism – since the
result can be guaranteed only for the pure functions – the same problem raised as in C++. In the current
situation this limitation can be removed only at the expense of reliability. However, the reliability is
the essence of this method.</p>
      <p>Another limitation is the usage of external functions and types. Since any concrete implementation
can be loaded into the virtual machine, the executed test will be meaningless despite of they
necessarily be pure functions. Also, the dependencies will be required to compile a program, which is not
acceptable. This limitation can be solved, if the pre- and post-conditions could be stored in the binary,
and these conditions will be validated by the dynamic program loader, and compiler could generate
mock objects for the conditions. Thus the testing mechanism could be more flexible.</p>
    </sec>
    <sec id="sec-7">
      <title>4. FUTURE WORK</title>
      <p>Our current method requires handmade test cases, even in case of the recursive test case in Figure 5.
Using template metaprogramming, we can improve the method with automatic test case generation.
For example, the input for the operator&lt; can be generated by random numbers, and the developer
have to write only a logical formula, such as !(a&lt;b) || pair(a, 0)&lt;pair(b, 0) – or a similar formula
in a general case. Furthermore, we are intented to apply axiom-based test generation [Bagge et al.
2011]. Thus the test cases could be more automated.</p>
      <p>Our future plans to improve the Welltype compiler is to make able the compiler to generate white-box
test cases which satisfy the pre- and the postconditions. Since the precondition defines an acceptable
set of input, and the postcondition is a formal specification for the output, it is possible to generate test
cases using the symbolic execution [King 1976]. This could be an outstanding and unique feature in
our compiler to support the test-driven development.</p>
    </sec>
    <sec id="sec-8">
      <title>CONCLUSION</title>
      <p>In this paper we introduced a method with the related preparations to able to write compile-time
unit tests in C++11. The method based on two new features are introduced in C++11: the constant
expressions (constexpr) and the static assertions (static assert). The reason of the selection was
the fact they are evaluated by the compiler during the compilation. When the static assertion fails, the
faulty source code can not be compiled. This feature is a great addition compared to any third party test
frameworks. Also, we presented a basic test case generation by example – and it worked as expected.
However, more complex generators could be written. The limitations of this method is summarized.</p>
      <p>We introduced the abilities in our experimental programming language to describing compile-time
tests. This language is called Welltype. The basic concept was to entitle the compiler to evaluate all
pure expressions in the source code, since the result only depends on the arguments. Moreover, our
language supports to attach assertions to function declarations. These asserts will perform as ”static
assertions” in C++11, but it uses a more flexible approach. However, the implementation is an ongoing
work. The limitations of this method is summarized as well.</p>
      <p>Our research is continued by constructing more advanced mechanisms in C++11 (or in C++14) to
provide more flexible and richer kit for software developers. We intented to include template
metaprograms to generate test cases. Also, in our Welltype compiler we intented to implement a white-box test
case generator to reach a very high test coverage automatically.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>Andrei</given-names>
            <surname>Alexandrescu</surname>
          </string-name>
          .
          <year>2001</year>
          . Modern C+
          <article-title>+ Design: Generic Programming and Design Patterns Applied</article-title>
          . Addison-Wesley, Boston, MA.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Anya</given-names>
            <surname>Helene</surname>
          </string-name>
          <string-name>
            <surname>Bagge</surname>
          </string-name>
          , Valentin David, and
          <string-name>
            <given-names>Magne</given-names>
            <surname>Haveraaen</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Testing with Axioms in C++ 2011</article-title>
          .
          <source>Journal of Object Technology</source>
          <volume>10</volume>
          ,
          <issue>10</issue>
          (
          <year>2011</year>
          ),
          <fpage>1</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>A´ron Bar a´th.</article-title>
          <year>2014</year>
          -
          <fpage>2015</fpage>
          . Welltype.
          <article-title>(</article-title>
          <year>2014</year>
          -
          <fpage>2015</fpage>
          ). http://baratharon.web.elte.hu/welltype.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <article-title>A´ron Bara´ th and Zolt a´n Porkol a´b</article-title>
          .
          <year>2014</year>
          .
          <article-title>Towards Safer Programming Language Constructs</article-title>
          .
          <source>In 10th Joint Conference on Mathematics and Computer Science</source>
          .
          <volume>25</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>Kent</given-names>
            <surname>Beck</surname>
          </string-name>
          .
          <year>2003</year>
          .
          <article-title>Test-driven development: by example</article-title>
          .
          <source>Addison-Wesley Professional.</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>Google. 2015. Google</given-names>
            <surname>Test</surname>
          </string-name>
          . (
          <year>2015</year>
          ). https://code.google.com/p/googletest.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>James C King</surname>
          </string-name>
          .
          <year>1976</year>
          .
          <article-title>Symbolic execution and program testing</article-title>
          .
          <source>Commun. ACM 19</source>
          ,
          <issue>7</issue>
          (
          <year>1976</year>
          ),
          <fpage>385</fpage>
          -
          <lpage>394</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <given-names>Jeff</given-names>
            <surname>Langr</surname>
          </string-name>
          .
          <year>2013</year>
          . Modern C+
          <article-title>+ Programming with Test-driven Development: Code Better, Sleep Better</article-title>
          . Pragmatic Bookshelf.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <given-names>Bertrand</given-names>
            <surname>Meyer</surname>
          </string-name>
          .
          <year>1992</year>
          .
          <article-title>Applying 'Design by Contract'</article-title>
          .
          <source>Computer</source>
          <volume>25</volume>
          ,
          <issue>10</issue>
          (
          <year>1992</year>
          ),
          <fpage>40</fpage>
          -
          <lpage>51</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <given-names>Scott</given-names>
            <surname>Meyers</surname>
          </string-name>
          .
          <year>2014</year>
          . Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and
          <string-name>
            <given-names>C</given-names>
            <surname>+</surname>
          </string-name>
          <article-title>+14.</article-title>
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <given-names>Norbert</given-names>
            <surname>Pataki</surname>
          </string-name>
          , Zala´ n Szu˝ gyi, and Gergo˝ De´vai.
          <year>2010</year>
          . C+
          <article-title>+ Standard Template Library in a Safer Way</article-title>
          .
          <source>In Proc. of Workshop on Generative Technologies</source>
          <year>2010</year>
          (WGT
          <year>2010</year>
          ).
          <fpage>46</fpage>
          -
          <lpage>55</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <given-names>Reinhold</given-names>
            <surname>Plosch</surname>
          </string-name>
          and
          <string-name>
            <given-names>Josef</given-names>
            <surname>Pichler</surname>
          </string-name>
          .
          <year>1999</year>
          .
          <article-title>Contracts: From analysis to C++ implementation</article-title>
          .
          <source>In Technology of Object-Oriented Languages and Systems</source>
          ,
          <year>1999</year>
          .
          <article-title>TOOLS 30 Proceedings</article-title>
          . IEEE,
          <fpage>248</fpage>
          -
          <lpage>257</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <article-title>Zolta´ n Porkol a´b and A´bel Sinkovics</article-title>
          .
          <year>2011</year>
          .
          <article-title>Domain-specific language integration with compile-time parser generator library</article-title>
          .
          <source>ACM SIGPLAN Notices 46</source>
          ,
          <issue>2</issue>
          (
          <year>2011</year>
          ),
          <fpage>137</fpage>
          -
          <lpage>146</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <given-names>Gennadiy</given-names>
            <surname>Rosental</surname>
          </string-name>
          .
          <year>2001</year>
          -
          <fpage>2007</fpage>
          .
          <article-title>The Boost Test Library</article-title>
          .
          <article-title>(</article-title>
          <year>2001</year>
          -
          <fpage>2007</fpage>
          ). http://www.boost.org/doc/libs/1 57 0/libs/test/doc/html/utf.html.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Stephen R Schach</surname>
          </string-name>
          .
          <year>2002</year>
          .
          <article-title>Object-oriented and classical software engineering</article-title>
          . Vol.
          <volume>6</volume>
          .
          <string-name>
            <surname>McGraw-Hill</surname>
          </string-name>
          New York.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <given-names>Katarina</given-names>
            <surname>Sigerud</surname>
          </string-name>
          , Wojciech Sliwinski,
          <string-name>
            <given-names>J Nguyen</given-names>
            <surname>Xuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S</given-names>
            <surname>Deghaye</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X</given-names>
            <surname>Piroux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V</given-names>
            <surname>Baggiolini</surname>
          </string-name>
          , JC Bau, Gennady Sivatskiy, and
          <string-name>
            <given-names>Ilia</given-names>
            <surname>Yastrebov</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Tools and rules to encourage quality for C/C++ software</article-title>
          .
          <source>Technical Report.</source>
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <given-names>Richard</given-names>
            <surname>Smith</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Relaxing the constraint on constexpr functions</article-title>
          . (
          <year>2013</year>
          ). http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <string-name>
            <given-names>Bjarne</given-names>
            <surname>Stroustrup</surname>
          </string-name>
          .
          <year>1994</year>
          .
          <article-title>Design and Evolution of C++</article-title>
          . Addison-Wesley.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          <string-name>
            <given-names>Bjarne</given-names>
            <surname>Stroustrup</surname>
          </string-name>
          .
          <year>2013</year>
          . The C+
          <article-title>+ Programming Language, 4th Edition</article-title>
          .
          <article-title>Addison-Wesley Professional</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          <string-name>
            <given-names>Petar</given-names>
            <surname>Tahchiev</surname>
          </string-name>
          , Felipe Leme, Vincent Massol, and
          <string-name>
            <given-names>Gary</given-names>
            <surname>Gregory</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>JUnit in action</article-title>
          .
          <source>Manning Publications Co.</source>
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          <string-name>
            <given-names>Todd L.</given-names>
            <surname>Veldhuizen</surname>
          </string-name>
          .
          <year>2003</year>
          . C+
          <article-title>+ Templates are Turing Complete</article-title>
          .
          <source>Technical Report.</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>