package frama-c

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

Utilities to pretty print source with located Ast elements

type localizable =
  1. | PStmt of Cil_types.kernel_function * Cil_types.stmt
    (*

    Full statement (with attributes, annotations, etc.)

    *)
  2. | PStmtStart of Cil_types.kernel_function * Cil_types.stmt
    (*

    Naked statement (only skind, without attributes, annotations, etc.)

    *)
  3. | PLval of Cil_types.kernel_function option * Cil_types.kinstr * Cil_types.lval
    (*

    L-Values

    *)
  4. | PExp of Cil_types.kernel_function option * Cil_types.kinstr * Cil_types.exp
    (*

    Non l-value expressions

    *)
  5. | PTermLval of Cil_types.kernel_function option * Cil_types.kinstr * Property.t * Cil_types.term_lval
    (*

    Term l-values inside properties

    *)
  6. | PVDecl of Cil_types.kernel_function option * Cil_types.kinstr * Cil_types.varinfo
    (*

    Declaration and definition of variables and function. Check the type of the varinfo to distinguish between the various possibilities. If the varinfo is a global or a local, the kernel_function is the one in which the variable is declared. The kinstr argument is given for local variables with an explicit initializer.

    *)
  7. | PGlobal of Cil_types.global
    (*

    Global definitions except global variables and functions.

    *)
  8. | PIP of Property.t
  9. | PType of Cil_types.typ

The kind of object that can be selected in the source viewer.

val label : localizable -> string

Name (or category).

val glabel : Cil_types.global -> string

Name (or category).

val pretty : Stdlib.Format.formatter -> localizable -> unit

Description of a localizable.

val pp_debug : Stdlib.Format.formatter -> localizable -> unit

Debugging.

val localizable_of_global : Cil_types.global -> localizable
val localizable_of_kf : Cil_types.kernel_function -> localizable
val kf_of_localizable : localizable -> Cil_types.kernel_function option
val ki_of_localizable : localizable -> Cil_types.kinstr
val varinfo_of_localizable : localizable -> Cil_types.varinfo option
val typ_of_localizable : localizable -> Cil_types.typ option
val loc_of_localizable : localizable -> Cil_types.location

Might return Location.unknown

val loc_to_localizable : ?precise_col:bool -> Filepath.position -> localizable option

return the (hopefully) most precise localizable that contains the given Filepath.position. If precise_col is true, takes the column number into account (possibly a more precise, but costly, result).

  • since 24.0-Chromium
module type Tag = sig ... end
module type S_pp = sig ... end
module Make (_ : Tag) : S_pp