Batch analysis client

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 contains predicates for managing the batch analysis of sets of modules.

Note: this code is not performing multi-modular analysis. Some of its components can be generalized for other processes (compilation, program transformation) and be integrated into the build system, compiler, analyzer, etc.

Analysis options

  • no_incremental : By default, analysis is made only for modules in Paths which were not analyzed before. With this option, analysis will be runned from scratch.
  • timeout(T) : T is the time limit for the analysis of each module independently.
  • analysis(ListAbsInt) : ListAbsInt is a list of abstract domains available in ciaopp.
  • workers(N) : N is the number of threads use to perform the analysis of independent modules. Currently only 1 worker is supported.
Example:
? - use_module(ciaopp_batch(ciaopp_batch)).
? - analysis_start(['~/ciao-devel/core/lib/'], [timeout(40), analysis([eterms, gr])]).

Fast load through caching of assertions from libraries is available in ciaopp_worker.

To create and manually update this cache run command: update_lib_cache

Configuring ciaopp flags is not available yet.

Description of the implementation

Prolog files:

  • ciaopp_batch.pl: driver for the per-module CiaoPP analysis
  • ciaopp_master.pl: performs control of ciaopp_workers, i.e., launchs them and kills them.
  • ciaopp_worker.pl: does the actual analysis.
  • ciaopp_batch_aux.pl: file for auxiliary predicates.
  • statistics_collecter.pl: collects statistics of the analyzed files (time and memory).

Other directories:

  • Attic/: placeholder for not used files that may be useful at some point

Data files

The status of the analysis is stored in the data/ directory:

  • data/task_status.pl: status of the modules (analyzed, errors, etc)
  • last_analyzed_file.pl: last analyzed predicate
  • analysis.log: date and time when each module started being analyzed

Usage and interface

  • Library usage:
    :- use_module(ciaopp_batch(ciaopp_batch)).
  • Exports:

Documentation on exports

Usage:analysis_start(Paths,Opts)

Analyzes modules in some Paths and dumps their analysis information to disk, given some Opts.

  • The following properties should hold at call time:
    (list/1)Paths is a list.
    (list/1)Opts is a list.

Imported from db_analysis (see the corresponding documentation for details).

Imported from db_analysis (see the corresponding documentation for details).

Documentation on internals

Usage:analysis_opt(Opt)

Option of ciaopp batch (not ciaopp flags)

    Documentation on imports

    This module has the following direct dependencies: