package bap-primus-support

  1. Overview
  2. Docs
Provides supporting components for Primus

Install

Dune Dependency

Authors

Maintainers

Sources

v2.1.0.tar.gz
sha256=631fc58628418e4856709a0cfc923a65e00c9494fbd28d444c633d11194831de
md5=3db9deac8d429b9b8a8ec9aec54987b1

doc/bap-primus-track-visited/Bap_primus_track_visited/index.html

Module Bap_primus_track_visited

Tracks program terms evaluated by Primus.

This module provides a component and an interface to the visitation tracker that keeps records of all basic block terms visited during Primus evaluation.

During the initialization the component adds all basic blocks that have the visited attribute to the list of already visited blocks. This is done only when the system starts and the visited set is not synchronized anymore. Also, when a Primus system is started, the component will mark with the dead attribute all terms that are not already marked with with the visited attribute.

Finally, when the system is stopped, the component will update the product data structure and mark all terms that was visited during the system run with the visited attribute.

Although the visitation tracks only basic blocks it adds the visited and dead attributes to all subterms of a visited block.

If a function is stubbed then when a stub is invoked the whole body of a function is also marked as visited (and the blocks of the function are added to the visited set).

val init : unit -> unit

initializes the tracker component.

This function is called by the primus-mark-visited component, and is not necessary to call, unless this plugin is not used.

val progress : (int * int) Bap_primus.Std.Primus.observation

progress (visited,total) is posted every time a Primus machine makes progress and evaluates a previously unvisited basic block.

visited - is the total number of visited basic blocks; total - is the total number of blocks in the program.

module Set : sig ... end

The online interface to the set of visited basic blocks.

OCaml

Innovation. Community. Security.