18.04.2013 Views

Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...

Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...

Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5. FRAMEWORK EVALUATION 5.2. Operational Validation<br />

<br />

<br />

#<br />

<br />

<br />

=<br />

<br />

<br />

[<br />

]<br />

<br />

<br />

!<br />

<br />

<br />

Listing 5.5: MySQL Metadata<br />

The file was re-converted to its original syntax. diff showed that the differences between<br />

the original and generated files resume to a few absent spaces from the first to the second. This<br />

happens since the parser ignores the space characters outsi<strong>de</strong> strings. As MySQL ignores the<br />

spaces in configuration files, the file functionality is maintained.<br />

5.2.2 Apache-like Configuration Files<br />

This test consisted on configuring the Apache HTTP server. The Apache configuration file<br />

(Listing 5.6) impl<strong>em</strong>ents parameters with a single value (line 1), parameters with multiple val-<br />

ues (lines 3-4), blocks (lines 6-8), nested blocks (10-14) and comments (line 16). The complete<br />

configuration file is in Annex B.2. The file containing the co<strong>de</strong> generated by the tool for this con-<br />

figuration file is found at http://www-asc.di.fct.unl.pt/˜jml/SmART/blox.xml.<br />

The tool produced the following XML for the parameter with a single value (Listing 5.7),<br />

parameter with multiple values (Listing 5.8), block (Listing 5.9), nested (Listing 5.10) and com-<br />

ment (Listing 5.11):<br />

The Metadata generated by the tool is represented on Figure 5.12.<br />

The file was re-converted to its original syntax. diff showed that the differences between<br />

the original and generated files are some absent new lines and tabulations. Once again, this is<br />

due to the parser which ignores some new lines and tabulations. However, this does not affect<br />

in any way the functionality of the new file, so the result is valid.<br />

5.2.3 XML-like Configuration Files<br />

This test consisted on configuring the Eclipse workbench. The Eclipse workbench configura-<br />

tion (Listing 5.13) file is originally on XML format and impl<strong>em</strong>ents <strong>em</strong>pty el<strong>em</strong>ents/blocks<br />

(line 1), el<strong>em</strong>ents with attributes/blocks containing parameters (line 3-4), nested blocks (lines<br />

56

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!