Module LibraryDesc

Library function descriptor (specification).

module Cil = GoblintCil

Pointer argument access specification.

module Access : sig ... end

Pointer argument access specification.

val equal_math : math -> math -> Ppx_deriving_runtime.bool
val compare_math : math -> math -> Ppx_deriving_runtime.int
val hash_math : math -> int
type special =
  1. | Alloca of Cil.Cil.exp
  2. | Malloc of Cil.Cil.exp
  3. | Calloc of {
    1. count : Cil.Cil.exp;
    2. size : Cil.Cil.exp;
    }
  4. | Realloc of {
    1. ptr : Cil.Cil.exp;
    2. size : Cil.Cil.exp;
    }
  5. | Free of Cil.Cil.exp
  6. | Assert of {
    1. exp : Cil.Cil.exp;
    2. check : bool;
    3. refine : bool;
    }
  7. | Lock of {
    1. lock : Cil.Cil.exp;
    2. try_ : bool;
    3. write : bool;
    4. return_on_success : bool;
    }
  8. | Unlock of Cil.Cil.exp
  9. | ThreadCreate of {
    1. thread : Cil.Cil.exp;
    2. start_routine : Cil.Cil.exp;
    3. arg : Cil.Cil.exp;
    4. multiple : bool;
    }
  10. | ThreadJoin of {
    1. thread : Cil.Cil.exp;
    2. ret_var : Cil.Cil.exp;
    }
  11. | ThreadExit of {
    1. ret_val : Cil.Cil.exp;
    }
  12. | ThreadSelf
  13. | Globalize of Cil.Cil.exp
  14. | Signal of Cil.Cil.exp
  15. | Broadcast of Cil.Cil.exp
  16. | MutexAttrSetType of {
    1. attr : Cil.Cil.exp;
    2. typ : Cil.Cil.exp;
    }
  17. | MutexInit of {
    1. mutex : Cil.Cil.exp;
    2. attr : Cil.Cil.exp;
    }
  18. | SemInit of {
    1. sem : Cil.Cil.exp;
    2. pshared : Cil.Cil.exp;
    3. value : Cil.Cil.exp;
    }
  19. | SemWait of {
    1. sem : Cil.Cil.exp;
    2. try_ : bool;
    3. timeout : Cil.Cil.exp option;
    }
  20. | SemPost of Cil.Cil.exp
  21. | SemDestroy of Cil.Cil.exp
  22. | Wait of {
    1. cond : Cil.Cil.exp;
    2. mutex : Cil.Cil.exp;
    }
  23. | TimedWait of {
    1. cond : Cil.Cil.exp;
    2. mutex : Cil.Cil.exp;
    3. abstime : Cil.Cil.exp;
      (*

      Unused

      *)
    }
  24. | Math of {
    1. fun_args : math;
    }
  25. | Memset of {
    1. dest : Cil.Cil.exp;
    2. ch : Cil.Cil.exp;
    3. count : Cil.Cil.exp;
    }
  26. | Bzero of {
    1. dest : Cil.Cil.exp;
    2. count : Cil.Cil.exp;
    }
  27. | Memcpy of {
    1. dest : Cil.Cil.exp;
    2. src : Cil.Cil.exp;
    3. n : Cil.Cil.exp;
    }
  28. | Strcpy of {
    1. dest : Cil.Cil.exp;
    2. src : Cil.Cil.exp;
    3. n : Cil.Cil.exp option;
    }
  29. | Strcat of {
    1. dest : Cil.Cil.exp;
    2. src : Cil.Cil.exp;
    3. n : Cil.Cil.exp option;
    }
  30. | Strlen of Cil.Cil.exp
  31. | Strstr of {
    1. haystack : Cil.Cil.exp;
    2. needle : Cil.Cil.exp;
    }
  32. | Strcmp of {
    1. s1 : Cil.Cil.exp;
    2. s2 : Cil.Cil.exp;
    3. n : Cil.Cil.exp option;
    }
  33. | Abort
  34. | Identity of Cil.Cil.exp
    (*

    Identity function. Some compiler optimization annotation functions map to this.

    *)
  35. | Setjmp of {
    1. env : Cil.Cil.exp;
    }
  36. | Longjmp of {
    1. env : Cil.Cil.exp;
    2. value : Cil.Cil.exp;
    }
  37. | Bounded of {
    1. exp : Cil.Cil.exp;
    }
    (*

    Used to check for bounds for termination analysis.

    *)
  38. | Rand
  39. | Unknown
    (*

    Anything not belonging to other types.

    *)

Type of special function, or Unknown.

module Accesses : sig ... end

Pointer arguments access specification.

type attr =
  1. | ThreadUnsafe
    (*

    Function is not thread-safe to call, e.g. due to its own internal (global) state.

    *)
  2. | InvalidateGlobals
    (*

    Function invalidates all globals when called.

    *)

Function attribute.

type t = {
  1. special : Cil.Cil.exp list -> special;
    (*

    Conversion to special using arguments.

    *)
  2. accs : Accesses.t;
    (*

    Pointer arguments access specification.

    *)
  3. attrs : attr list;
    (*

    Attributes of function.

    *)
}

Library function descriptor.

module MathPrintable : sig ... end
module MathLifted : sig ... end