[ library(cpviz) | Reference Manual | Alphabetic Index ]

viz(+Handle, ?ToolSpecs)

Run the CP-Viz viz program to convert xml traces to graphics
A (just closed) visualisation handle
Configuration options for the output to produce


This predicate provides a convenient interface to CP-Viz's 'viz' program, which converts XML trace log files into various drawing formats. It is meant to be invoked just after the trace files have been produced. Afterwards, the resulting output may be viewed using viztool.

The Handle argument should be the handle of a finished tracing session, which must have been closed already via close_visualization/1.

The 'viz' program needs a configuration.xml file with options. If such a file is present in the directory where the trace log files are located, and you want to use it, then set ToolSpecs to []. Otherwise, a configuration file will be created from the ToolSpecs. ToolSpecs is a list of tool-structures with the following arguments (all arguments except 'show' are optional):

tree or viz
layout (default), distribution, treemap, graph, values
compact (default) or expanded. This controls whether failed subtrees are displayed in compact form.
all, final, or a positive or negative integer
positive integer (width of SVG canvas in pixels, default 700)
positive integer (height of SVG canvas in pixels, default 700)
Alternatively, ToolSpecs can remain completely uninstantiated, in which case it defaults to the following two-element list:
For the meaning of the options refer to the CP-Viz documentation.

After processing the log files with viz/2, you can start viztool/0 and view the results, which are located in the directory specified by Handle (default 'OUTPUT'). Open the aaa.idx file.

Modes and Determinism


    % for using default configuration settings:
    viz(Handle, _).

    % with specific configuration settings:
    viz(Handle, [

See Also

visualization : create_visualization / 2, visualization : close_visualization / 1, viztool / 0