Analyze driver (monolithic)

This module provides the main entry points for for performing analysis and assertion checking. It requires loading the program before (e.g., with frontend_driver).

Adding new analysis

To include a new analysis, add a clause for analyze/2 (and for analysis/1).

As an alternative, you can add clauses for the multifile predicates analysis/4 and analysis/1, directly in your own sources.

See the file examples/Extending/myanalyzer.pl in the source directory for an example of this.


Usage and interface

Documentation on exports

No further documentation available for this predicate.

No further documentation available for this predicate.

PREDICATEanalyze/1

Usage 1:analyze(Analysis)

Returns on backtracking all available analyses.

  • The following properties should hold at call time:
    (var/1)Analysis is a free variable.
  • The following properties should hold upon exit:
    (analysis/1)Analysis is a valid analysis identifier.

Usage 2:analyze(Analysis)

Analyzes the current module with Analysis. If the intermod flag is not off, this predicate may call module/1.

  • The following properties should hold at call time:
    (nonvar/1)Analysis is currently a term which is not a free variable.
    (analysis/1)Analysis is a valid analysis identifier.
  • The following properties should hold globally:
    (not_fails/1)All the calls of the form analyze(Analysis) do not fail.
    (no_choicepoints/1)A call to analyze(Analysis) does not leave new choicepoints.

PREDICATEanalyze/2

Usage:analyze(Analysis,Info)

Same as analyze(Analysis) but in Info returns statistics (time and memory).

  • The following properties should hold at call time:
    (nonvar/1)Analysis is currently a term which is not a free variable.
    (var/1)Info is a free variable.

PREDICATEanalyze1/2
No further documentation available for this predicate.

A regular type, defined as follows:
ctcheck_sum(ok).
ctcheck_sum(warning).
ctcheck_sum(error).

Usage:acheck_summary(S)

Checks assertions w.r.t. analysis information. Upon success S is bound to: ok (the compile-time checking process has generated no error nor warning), warning (compile-time checking has not generated any error, but there has been at least one warning) or error (at least one error has been produced).

PREDICATEacheck/0

Usage:

Checks assertions w.r.t. analysis information.

    PREDICATEacheck/1
    No further documentation available for this predicate.

    Usage:

    Cleans all analysis info but keep the program as wether it would be just read.

      No further documentation available for this predicate.

      No further documentation available for this predicate.

      PREDICATEtrace_fixp/1

      Usage 1:trace_fixp(X)

      Mode for querying the current flag value.

      • The following properties should hold at call time:
        (var/1)X is a free variable.
      • The following properties should hold upon exit:
        (list/2)X is a list of trace_options.

      Usage 2:trace_fixp(X)

      Mode for setting the current flag to a single value.

      Usage 3:trace_fixp(X)

      Mode for setting the current flag to several values.

      • The following properties should hold at call time:
        (list/2)X is a list of trace_options.
      • The following properties should hold globally:
        (not_further_inst/2)X is not further instantiated.

      Documentation on multifiles

      Specifies an analysis that can be lazy loaded The predicate is multifile.

      Given an analysis, returns the module that contains the implementation (or entry point) of a lazy loadable analysis. Such module must implement the analysis/4 multifile clause. The predicate is multifile.

      Helps to determine if an analysis was already loaded. Must be defined in the same module specified by analysis_module/2. The predicate is multifile.

      PREDICATEanalysis/4

      Usage:analysis(Analysis,Clauses,Dictionaries,Info)

      Performs Analysis on program Clauses.

      • The following properties should hold at call time:
        (analysis/1)Analysis is a valid analysis identifier.
      The predicate is multifile.

      PROPERTYanalysis/1

      Usage:analysis(Analysis)

      Analysis is a valid analysis identifier.

        The predicate is multifile.

        PREDICATEaidomain/1
        See the chapter on domains. The predicate is multifile.