analyze

Generates a graph of the specification space.

Synopsis

provengo analyze [-f pdf] [--highlight path] <path-to-project>

Description

This sub-command generates a graph describing all the scenarios in the specification space defined by the project. It may also highlight a group of scenarios, such as those created by the sample or an ensemble sub-commands. The graph can be in written in JSON, gv (Graphviz' graph description language), or PDF.

Parameters

-f/--format FORMAT_NAME

Is the output format. This can be json, gv, or pdf. The pdf is often the most convenient during development, but it requires Graphviz to be installed, with dot being in the user’s PATH environment variable. provengo will attempt to open the generated pdf in the system’s default viewer.

--max-depth NUM

Maximum model exploration depth. Nodes/events that are further from the start will not be shown.

-o/--output-file PATH

Path to a directory where the output file should be created.

--highlight SOURCE.HIGHLIGHT

Path to a file containing runs. This file can be generated, e.g., using the sample or ensemble modes.

--layout

Horizontal or vertical graph, the options are: horizontal(left to right), vertical(top to bottom), r-vertical(bottom to top), r-horizontal(right to left).

--style STYLE_NAME

Visualization style. Either raw (no styling), styled, or full. Defaults to styled.

In order to generate PDFs, Graphviz’s dot command has to be in the user’s PATH variable.
Example 1. Generating a graph in PDF format

If we run the command:

$ provengo --batch-mode create hello-world

And replace the content of the file hello-world/spec/js/hello-world.js with:

bthread('A,B', function () {
  request(BEvent("A"))
  request(BEvent("B"))
})

bthread('A,B', function () {
  request(BEvent("C"))
  request(BEvent("D"))
})

We can run the following command to generate a PDF graph of the specification space:

$ provengo analyze -f pdf hello-world

This will generate a PDF file in the hello-world directory, which can be opened in a PDF viewer.

The file should look like:

analyze