package mopsa

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Core.HookSource

Hooks are modules that can observe the execution of the transfer functions without modifying their output. They can be used however to enrich the analysis by adding information to the context.

Sourcemodule type HOOK = sig ... end

Signature of a hook

Sourcemodule type STATELESS_HOOK = sig ... end

Signature of a stateless hook

Sourceval register_hook : (module HOOK) -> unit

Register a new hook

Sourceval register_stateless_hook : (module STATELESS_HOOK) -> unit

Register a new stateless hook

Sourceval activate_hook : string -> unit

Activate a registered hook

Sourceval find_hook : string -> (module HOOK)

Find a registered hook

Sourceval mem_hook : string -> bool

Check whether a hook exits

Sourceval list_hooks : unit -> (module HOOK) list

List all existing hooks

Sourceval deactivate_hook : string -> ('a, 'a) Manager.man -> 'a Flow.flow -> unit

Deactivate an active hook

Sourceval init : unit -> unit

Initialize hooks manager

Sourceval init_hook : string -> 'a Context.ctx -> 'a Context.ctx

Initialize an active hook

Sourceval is_hook_active : string -> bool

Check wether a hook is active

Sourceval init_active_hooks : 'a Context.ctx -> 'a Context.ctx

Initialize all active hooks

Sourceval on_before_exec : Route.route -> Ast.Stmt.stmt -> ('a, 'a) Manager.man -> 'a Flow.flow -> 'a Context.ctx option

Call on_before_exec on all active hooks

Sourceval on_after_exec : Route.route -> Ast.Stmt.stmt -> ('a, 'a) Manager.man -> 'a Flow.flow -> 'a Post.post -> 'a Context.ctx option

Call on_after_exec on all active hooks

Sourceval on_before_eval : Route.route -> Ast.Semantic.semantic -> Ast.Expr.expr -> ('a, 'a) Manager.man -> 'a Flow.flow -> 'a Context.ctx option

Call on_before_eval on all active hooks

Sourceval on_after_eval : Route.route -> Ast.Semantic.semantic -> Ast.Expr.expr -> ('a, 'a) Manager.man -> 'a Flow.flow -> 'a Eval.eval -> 'a Context.ctx option

Call on_after_eval on all active hooks

Sourceval on_finish : ('a, 'a) Manager.man -> 'a Flow.flow -> unit

Call on_finish on all active hooks

OCaml

Innovation. Community. Security.