package mopsa

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

Callstack - representation of the call stack of a program execution

Call sites

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

type callsite = {
  1. call_fun_orig_name : string;
    (*

    Original name of the called function

    *)
  2. call_fun_uniq_name : string;
    (*

    Unique name of the called function

    *)
  3. call_range : Location.range;
    (*

    Call location

    *)
}

Call site is the location of a call in the program

val pp_callsite : Stdlib.Format.formatter -> callsite -> unit

Print a call site

val compare_callsite : callsite -> callsite -> int

Compare two call sites

Call stacks

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

type callstack = callsite list

A call stack

val pp_callstack : Stdlib.Format.formatter -> callstack -> unit

Print a call stack

val pp_callstack_short : Stdlib.Format.formatter -> callstack -> unit

Print a call stack in a short style

val compare_callstack : callstack -> callstack -> int

Compare two call stacks

val empty_callstack : callstack

Empty call stack

val is_empty_callstack : callstack -> bool

Check that a call stack is empty

val callstack_length : callstack -> int

Return the length of a call stack

val push_callstack : string -> ?uniq:string -> Location.range -> callstack -> callstack

push_callstack orig ~uniq range cs adds the call to function orig at location range at the top of the call stack cs. The default unique function name of the function is its original name.

exception Empty_callstack

Exception raised when a call stack is empty

val pop_callstack : callstack -> callsite * callstack

pop_callstack cs returns the last call site in cs and the remaining call stack. Raises Empty_callstack if the call stack is empty.

val callstack_top : callstack -> callsite

callstack_top cs returns the last call site in cs. Raises Empty_callstack if the call stack is empty.

val callstack_begins_with : callstack -> callstack -> bool

callstack_begins_with ext cs checks that ext is an extension of cs, i.e. ext = x @ cs

OCaml

Innovation. Community. Security.