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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
5. FRAMEWORK EVALUATION 5.1. Functional Validation<br />
After the user submits a number of files to the tool, they are processed and, if not fully<br />
recognized, the user is able to manually <strong>de</strong>fine a grammar, or pass the tool a file containing the<br />
grammar for the generation of new parser.<br />
Non-functional requir<strong>em</strong>ents:<br />
Usability: The grammar <strong>de</strong>finition syntax should be a broadly adopted one.<br />
JavaCC grammar interpreter supports the Exten<strong>de</strong>d Backus-Naur Form and allows Java<br />
co<strong>de</strong>, for more commodity.<br />
Usability: To ease the parser generation process, the user must be able to iterate through the previ-<br />
ously built grammars so as to roll back any change ma<strong>de</strong> on a grammar.<br />
Every time the user tries a newly created parser on a configuration file, the grammar used<br />
for it is stored in a repository and can be recovered at any time.<br />
3. The user must be able to produce a parser from a grammar.<br />
As soon as the user finishes <strong>de</strong>claring a grammar, the latter is passed to the tool, which<br />
compiles it on an external parser generator.<br />
Non-functional requir<strong>em</strong>ents:<br />
Extensibility: The user must be able to add parsers built outsi<strong>de</strong> the tool to support other configura-<br />
tion file paradigms (e.g., Windows registry files, binary files, etc.).<br />
The parser repository impl<strong>em</strong>ents the importParser method which allows the user to<br />
store an external parser. However, the parser must impl<strong>em</strong>ent the interface presented in List-<br />
ing 3.8.<br />
4. The user must have access to the parser compilation trace.<br />
When a grammar is compiled, its compilation trace is shown in case there any error ocurred,<br />
or a success message is displayed, otherwise.<br />
Non-functional requir<strong>em</strong>ents:<br />
Usability: The error messages must clearly i<strong>de</strong>ntify the source of the error.<br />
The error messages contain the source of the compilation error.<br />
5. The user must receive information relative to the grammar fitness with a given config-<br />
uration file.<br />
Any time a parser is tested with a configuration file, the percentage of parsed file with that<br />
parser is displayed.<br />
Non-functional requir<strong>em</strong>ents:<br />
Usability: The sections of the configuration file that were parsed and those that were not must be<br />
clearly i<strong>de</strong>ntified.<br />
When a parser is tested with a configuration file, the regions of the file recognized by it are<br />
highlighted in a graphical environment.<br />
6. The user must be able to store a functional parser generated by the tool, in or<strong>de</strong>r to be<br />
used on later tool runs.<br />
52