ciaopp-dump-fmt: Graph formatting for PLAI dumped results

Author(s): Isabel Garcia-Contreras.

Stability: [devel] Currently the subject of active development and/or research. Functionality may be limited and API and/or functionality may change without warning or deprecation period. Not recommended yet for use in production.

This module implements a command to show a graph generated with the graphviz library (dot comand).


Analyze a module and dump the result

?- use_module(ciaopp(ciaopp)).
?- use_module(ciaopp(p_unit/p_dump)).

?- module(['path/to/your/main', 'path/to/your/lib', '...']).
?- Domain = shfr, analyze(Domain).
?- dump('path/to/dump/analysis.dump').

To generate the graph:

$ ciao build ciaopp
$ ciaopp-dump-fmt "path/to/dump/analysis.dump"

It is generated as path/to/dump/analysis.pdf (also path/to/dump/ is generated).

Graph example (dot format)

digraph G {
	subgraph cluster_0 {
		node [style=filled,color=white];
		a0 -> a1 -> a2 -> a3;
		label = "process #1";
	subgraph cluster_1 {
		node [style=filled];
		b0 -> b1 -> b2 -> b3;
		label = "process #2";
	start -> a0;
	start -> b0;
	a1 -> b3;
	b2 -> a3;
	a3 -> a0;
	a3 -> end;
	b3 -> end;

	start [shape=Mdiamond];
	end [shape=Msquare];