
We describe here different facilities available for inspecting analysis results.
CiaoPP produces normally two types of outputs:
The level of detail in both messages and output files can be controlled using preprocessor flags. Some examples:
The output files described above go through some post-processing aimed at making them more readable and also reloadable into CiaoPP. This includes for example translating from the internal representation of the abstract domain elements to user-level properties and eliminating unnecessary module qualifications. However, it is also possible to inspect the analysis results without any post-processing. To generate this raw output simply set the preprocess flag output_lang to raw before generating the analysis output:
?- set_pp_flag(output_lang, raw).
yes
% make analysis
?- module(foo).
{Loading current module from foo.pl
{loaded in 390.268 msec.}
}
yes
?- analyze(eterms).
{Analyzing foo.pl
{preprocessed for the plai fixpoint in 1.736 msec.}
{analyzed by plai using eterms with local-control off in 5.106 msec.}
}
?- output.
{written file .../foo_eterms_co.pl}
yes
?- % open file or C-c C-v in emacs, etc. In contrast to the usual output, in the raw output clauses are represented using CiaoPP's internal clause representation and the abstract values are represented using the internal representation of the abstract domain elements. The latter is specially useful when developing a new abstract domain, since if the predicates asub_to_info/5, asub_to_native/6, etc. are not defined, no useful information appears in the normal output.
In addition, in this raw output true assertions are always generated for all call/success pattern inferred by the analysis, each identified by the node id. In the body, each reachable program point is adorned with one or more true annotations—one per inferred call pattern—each attaching the id of its corresponding call pattern.
Analysis graphs can be dumped to some file <file> and inspected in several ways as follows:
First, dump the analysis graph in <file>:
ciaopp ?- use_module(ciaopp(p_dump)). yes ciaopp ?- dump(<file>).
Then, use the ciaopp-dump command for inspecting the analysis graph dumped in <file>:
$ ciaopp-dump show <file> # Print info of the dump <file>. $ ciaopp-dump fmt <file> # Outputs the analysis result in dot format. $ dot -Tpdf <file>.dot -o <file>.pdf # Generates a graph in pdf of the analysis dot file.
It is also possible to access the solver's databases directly from within the top-level by querying the plai_db:complete/7 or plai_db:memo_table/6 predicates. For example:
ciaopp ?- use_module(ciaopp(plai/plai_db)). yes ciaopp ?- complete(SgKey,AbsInt,Sg,Proj,Prime,Id,Parents).