Frama-C API - Position
Description of the current position of the analysis.
type local = Frama_c_kernel.Cil_types.stmt * Callstack.tLocal position: a statement and its associated callstack.
type t = private | RootCall of {thread : int;entry_point : Frama_c_kernel.Kernel_function.t;
}| GlobalInit of Frama_c_kernel.Cil_types.varinfo| Local of local
General position.
module type S = sig ... endmodule Local : sig ... endinclude S with type t := t
include Frama_c_kernel.Datatype.S_with_collections with type t := t
include Frama_c_kernel.Datatype.S with type t := t
include Frama_c_kernel.Datatype.S_no_copy with type t := t
include Frama_c_kernel.Datatype.Ty with type t := t
val ty : t Frama_c_kernel.Type.tval datatype_descr : t Frama_c_kernel.Descr.tDatatype descriptor.
val packed_descr : Frama_c_kernel.Structural_descr.packPacked version of the descriptor.
val reprs : t listList of representants of the descriptor.
val hash : t -> intHash function: same spec than Hashtbl.hash.
val pretty : Stdlib.Format.formatter -> t -> unitPretty print each value in an user-friendly way.
val mem_project : (Frama_c_kernel.Project_skeleton.t -> bool) -> t -> boolmem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.
module Set : Frama_c_kernel.Datatype.Set with type elt = tmodule Map : Frama_c_kernel.Datatype.Map with type key = tmodule Hashtbl : Frama_c_kernel.Datatype.Hashtbl with type key = tval loc : t -> Frama_c_kernel.Cil_types.locationloc p returns the source location of the given position.
val pos : t -> Frama_c_kernel.Filepath.positionpos p returns the source file of the given position.
val kinstr : t -> Frama_c_kernel.Cil_types.kinstrkinstr p returns the kinstr associated to the position.
val pretty_loc : Stdlib.Format.formatter -> t -> unitPretty-print the position as a location in a source file. In the case of a local position, the short callstack leading to that position is also printed.
Constructors
val local : Frama_c_kernel.Cil_types.stmt -> Callstack.t -> tlocal stmt cs creates a local position.
val root_call : thread:int -> entry_point:Frama_c_kernel.Cil_types.kernel_function -> troot_call ~thread ~entry_point creates a position pointing to the root call of the analysis.
val global_init : Frama_c_kernel.Cil_types.varinfo -> tglobal_init vi creates a position pointing to the global variable vi's initialization.
Conversions
val of_kinstr : Frama_c_kernel.Cil_types.kinstr -> Callstack.t -> tof_kinstr ki callstack creates a position at the given kinstr and the given callstack. If kinstr is Kstmt, it will be a local position. Otherwise, the position will be the top of the callstack or a global position if the callstack is empty.
Accessors
val is_local : t -> boolis_local p returns true if p is a local position.
val kf : t -> Frama_c_kernel.Cil_types.kernel_function optionkf p returns the kernel function of a local position p or None if it is a global position.
val stmt : t -> Frama_c_kernel.Cil_types.stmt optionstmt p returns the stmt of a local position p or None if it is a global position.
val callstack : t -> Callstack.t optioncallstack p returns the callstack of a local position or None if it is a global position.
