25.07.2014 Views

VDM-10 Language Manual

VDM-10 Language Manual

VDM-10 Language Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 18<br />

Trace Definitions<br />

In order to automate the testing process <strong>VDM</strong>++ contains a notation enabling the expression of the<br />

traces that one would like to have tested exhaustively. Such traces are used to express combinations<br />

of sequences of operations that wish to be tested in all possible combinations. In a sense this is<br />

similar to model checking limitations except that this is done with real and not symbolic values.<br />

However, errors in test cases are filtered away so other test cases with the same prefix will be<br />

skipped automatically.<br />

Syntax: traces definitions = ‘traces’, { named trace } ;<br />

named trace = identifier, { ‘/’, identifier }, ‘:’, trace definition list ;<br />

trace definition list = trace definition term, { ‘;’, trace definition term } ;<br />

trace definition term = trace definition<br />

| trace definition term, ‘|’, trace definition ;<br />

trace definition = trace core definition<br />

| trace bindings, trace core definition<br />

| trace core definition, trace repeat pattern<br />

| trace bindings, trace core definition, trace repeat pattern ;<br />

trace core definition = trace apply expression<br />

| trace bracketed expression ;<br />

trace apply expression = call statement ;<br />

trace repeat pattern = ‘*’<br />

| ‘+’<br />

| ‘?’<br />

| ‘{’, numeric literal, ‘}’<br />

| ‘{’, numeric literal, ‘,’ numeric literal, ‘}’ ;<br />

161

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

Saved successfully!

Ooh no, something went wrong!