package mopsa

  1. Overview
  2. Docs
MOPSA: A Modular and Open Platform for Static Analysis using Abstract Interpretation

Install

Dune Dependency

Authors

Maintainers

Sources

mopsa-analyzer-v1.1.tar.gz
md5=fdee20e988343751de440b4f6b67c0f4
sha512=f5cbf1328785d3f5ce40155dada2d95e5de5cce4f084ea30cfb04d1ab10cc9403a26cfb3fa55d0f9da72244482130fdb89c286a9aed0d640bba46b7c00e09500

doc/hooks/Hooks/Loop_profiler/Hook/index.html

Module Loop_profiler.HookSource

Hook header

***************

Sourceval name : string
Sourceval debug : ('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a

Profiling records

*********************

Sourcetype loop = {
  1. range : Mopsa.range;
  2. body : Mopsa.stmt;
}

A loop is identified by its range and its body. The information of body is necessary to compute the number of iterations

module LoopMap : sig ... end
Sourcetype iterations = int list

For each loop, and for each time we hit the loop, we compute the number of iterations until we exit the loop

Sourceval stats : iterations LoopMap.t Stdlib.ref

Statistics table mapping loops to iterations stats

Sourceval print : Stdlib.Format.formatter -> unit -> unit

Print statistics table

Sourcetype frame = {
  1. loop : loop;
  2. iterations : int;
  3. inside : bool;
}

A frame in the stack of still-executing loops, for tracking the number iterations

Sourceval stack : frame list Stdlib.ref

Stack of still-executing loops

Sourceval is_loop_body : Mopsa.stmt -> bool

Check whether a statement is the body of the top loop

Sourceval on_enter_loop : Mopsa.range -> Mopsa.stmt -> unit

Event raised when we enter a loop

Sourceval on_enter_body : unit -> unit

Event raised when we start a new iteration

Sourceval on_exit_body : unit -> unit

Event raised when we terminate an iteration

Sourceval on_exit_loop : 'a -> Mopsa.stmt -> unit

Event raised when we exit a loop

Events handlers

*******************

Sourceval init : 'a -> unit
Sourceval on_before_exec : 'a -> Mopsa.stmt -> 'b -> 'c -> unit
Sourceval on_after_exec : 'a -> Mopsa.stmt -> 'b -> 'c -> 'd -> unit
Sourceval on_before_eval : 'a -> 'b -> 'c -> 'd -> 'e -> unit
Sourceval on_after_eval : 'a -> 'b -> 'c -> 'd -> 'e -> 'f -> unit
Sourceval on_finish : 'a -> 'b -> unit
OCaml

Innovation. Community. Security.