Incremental analysis (low level)

Author(s): Isabel Garcia-Contreras (ported from ciaopp-0.8).

This module contains the basic operations for adding or removing clauses to ciaopp (currently working for fixpoint dd) and perform an incremental reanalysis.

The posible actions are:

  • Initialize ciaopp for incremental analysis (see init_empty_inc_analysis), for clauses to be added/removed from, they should be implemented in a file passed to this predicate.

  • Add clauses to analysis (see td_add_clauses/2). Adds clauses and performs top down reanalysis.

  • Remove clauses from analysis, following a top down strategy (see td_delete_clauses/2). Removes clauses and performs top down reanalysis.

  • Remove clauses from analysis, following a bottom up strategy (see bu_delete_clauses/2). Removes clauses and reanalyzes according to the strategy defined.


Documentation on exports

Initializes ciaopp for incremental analysis. Removes all previous analysis info.

Usage:init_file_inc_analysis(Files,Cls,Ds)

Initializes incremental analysis with a file.

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

Usage:cl_from_clid(+Clid,-Cl)

Gets the processed clause Cl associated with clause id Clid.

  • The following properties should hold at call time:
    (atm/1)Clid is an atom.

Usage:td_add_clauses(Clids,AbsInt)

Adds a list of already processed clauses, expressed with their clause id (Clids) to the code database and updates the analysis of abstract domain AbsInt with them.

  • The following properties should hold at call time:
    (list/1)Clids is a list.
    (atm/1)AbsInt is an atom.

Usage:td_delete_clauses(Clids,AbsInt)

Removes clauses with ids of list Clids for abstract domain AbsInt from analysis using top-down deletion strategy and performs a reanalysis.

  • The following properties should hold at call time:
    (list/1)Clids is a list.
    (atm/1)AbsInt is an atom.

Usage:bu_delete_clauses(Clids,AbsInt)

Removes clauses Cls for abstract domain AbsInt from analysis using the bottom up deletion strategy and performs a reanalysis.

  • The following properties should hold at call time:
    (list/1)Clids is a list.
    (atm/1)AbsInt is an atom.

Usage:td_rec_delete_complete(Id,AbsInt)

This predicate removes the complete with Id in domain AbsInt and all its dependent information

    Usage:run_inc_fixpoint(AbsInt)

    This predicate runs fixpoint for abstract domain AbsInt. It is thought to be runned after adding information from registry files in intermodular analysis.

      Usage:incrementally_update_analysis(Mod,AbsInt)

      Mod is the module that will be reanalyzed after updating its external completes. To be called in modular analysis, no following analysis needed. This is a top-down strategy update