package mopsa

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mopsa-analyzer-v1.2.tar.gz
md5=37966e98ffeebcedc09bd6e9b2b81f69
sha512=40d4d826c25f680766c07eccbabdf5e8a4fa023016e8a164e4e4f6b3781c8484dc4df437055721dfd19b9db8fb7fe3b61236c4833186d346fc7204a68d01eaaa

doc/mopsa.mopsa_analyzer/Mopsa_analyzer/Languages/Universal/Hooks/Loop_profiler/Hook/index.html

Module Loop_profiler.Hook

Hook header

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

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

Profiling records

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

type loop = {
  1. range : MopsaLib.range;
  2. body : MopsaLib.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
type 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

Statistics table mapping loops to iterations stats

val print : Format.formatter -> unit -> unit

Print statistics table

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

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

val stack : frame list ref

Stack of still-executing loops

val is_loop_body : MopsaLib.stmt -> bool

Check whether a statement is the body of the top loop

val on_enter_loop : MopsaLib.range -> MopsaLib.stmt -> unit

Event raised when we enter a loop

val on_enter_body : unit -> unit

Event raised when we start a new iteration

val on_exit_body : unit -> unit

Event raised when we terminate an iteration

val on_exit_loop : 'a -> MopsaLib.stmt -> unit

Event raised when we exit a loop

Events handlers

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

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

Innovation. Community. Security.