package goblint

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module I = Basetype.CilExp
include module type of struct include Offset.Exp end

Offset with Index.Exp indices.

include Offset.Printable with type idx = GoblintCil.exp
type idx = GoblintCil.exp

Type of indices in offset.

include Printable.S with type t = idx Goblint_lib__.Offset_intf.t
type t = [
  1. | `NoOffset
    (*

    No offset. Marks the end of offset list.

    *)
  2. | `Field of CilType.Fieldinfo.t * idx Goblint_lib__.Offset_intf.t
    (*

    Offset starting with a struct field.

    *)
  3. | `Index of idx * idx Goblint_lib__.Offset_intf.t
    (*

    Offset starting with an array index.

    *)
]
val equal : t -> t -> bool
val hash : t -> int
val compare : t -> t -> int
val show : t -> string
val pretty : unit -> t -> Printable.Pretty.doc
val printXml : 'a BatInnerIO.output -> t -> unit
val name : unit -> string
val to_yojson : t -> Yojson.Safe.t
val tag : t -> int

Unique ID, given by HConsed, for context identification in witness

val arbitrary : unit -> t QCheck.arbitrary
val relift : t -> t
val is_definite : t -> bool

Whether offset has only definite integer indexing (and fields).

val contains_index : t -> bool

Whether offset contains any indexing.

val add_offset : t -> t -> t

add_offset o1 o2 appends o2 to o1.

val remove_offset : t -> t

Remove last indexing or field from offset.

val prefix : t -> t -> t option

prefix o1 o2 checks if o1 is a prefix of o2.

  • returns

    Some o if it is (such that add_offset o1 o = o2), None if it is not.

val map_indices : (idx -> idx) -> t -> t

Apply function to all indexing.

val top_indices : t -> t

Change all indices to top indices.

val to_exp : t -> GoblintCil.exp Goblint_lib__.Offset_intf.t

Convert to Goblint offset with GoblintCil.exp indices.

val to_cil_offset : t -> GoblintCil.offset

Version of to_cil which drops indices for ArrayDomain.

val cmp_zero_offset : t -> [ `MustZero | `MustNonzero | `MayZero ]

Compare offset to zero offset.

Zero indices and first fields of a struct are in the same physical memory location as the outer object.

  • returns

    `MustZero if definitely zero, `MustNonzero if definitely not zero, `MayZero if unknown.

val type_of : base:GoblintCil.typ -> t -> GoblintCil.typ

Type of the offset on the base type.

  • raises Type_of_error

    if could not follow offset completely.

val of_cil : GoblintCil.offset -> t

Convert from CIL offset.

val to_cil : t -> GoblintCil.offset

Convert to CIL offset.

val kill : Basetype.Variables.t -> t -> t
val replace : GoblintCil.varinfo -> GoblintCil.exp -> t -> t
val top : unit -> [> `NoOffset ]
val is_top : [> `NoOffset ] -> bool
val bot : unit -> 'a
val is_bot : 'a -> bool
val leq : [> `Field of F.t * 'b | `Index of I.t * 'c ] as 'a -> [> `Field of F.t * 'e | `Index of I.t * 'f | `NoOffset ] as 'd -> bool
val meet : [> `Field of F.t * 'b | `Index of I.t * 'c | `NoOffset ] as 'a -> 'd -> 'e
val narrow : [> `Field of F.t * 'a | `Index of I.t * 'a | `NoOffset ] as 'a -> 'a -> 'a
val join : [> `Field of F.t * 'b | `Index of I.t * 'c ] as 'a -> [> `Field of F.t * 'e | `Index of I.t * 'f ] as 'd -> [> `Field of F.t * 'g | `Index of I.t * 'g | `NoOffset ] as 'g
val widen : [> `Field of F.t * 'a | `Index of I.t * 'a ] as 'a -> [> `Field of F.t * 'b | `Index of I.t * 'b ] as 'b -> [> `Field of F.t * 'c | `Index of I.t * 'c | `NoOffset ] as 'c
val collapse : [> `Field of F.t * 'b | `Index of I.t * 'c | `NoOffset ] as 'a -> 'd -> bool
val real_region : t -> 'a -> bool
val pretty_diff : unit -> (t * t) -> GoblintCil.Pretty.doc
val occurs : Basetype.Variables.t -> [< `Field of 'b * 'c | `Index of GoblintCil.exp * 'd | `NoOffset ] as 'a -> bool
OCaml

Innovation. Community. Security.