Module BO.BufferOverrunField

Inferbo-specific constant field names

val pp : pp_lhs:(Stdlib.Format.formatter -> 'a -> unit) -> sep:string -> Stdlib.Format.formatter -> 'a -> IR.Fieldname.t -> unit

A parameterized pretty printer for field appended values

val get_type : IR.Fieldname.t -> IR.Typ.t option

Get type of field that is constructed in this module. This does not work in Java at the moment.

val c_strlen : unit -> IR.Fieldname.t

Field for C string's length

val cpp_vector_elem : vec_typ:IR.Typ.t -> elt_typ:IR.Typ.t -> IR.Fieldname.t

Field for C++ vector's elements

val java_collection_internal_array : IR.Fieldname.t

Field for Java collection's elements

val java_linked_list_index : IR.Fieldname.t

Virtual field for index of Java's linked list

val java_linked_list_length : IR.Fieldname.t

Virtual field for length of Java's linked list

val is_cpp_vector_elem : IR.Fieldname.t -> bool

Check if the field is for C++ vector's elements

val is_java_collection_internal_array : IR.Fieldname.t -> bool

Check if the field is for Java collection's elements

Field domain constructor

type field_typ = IR.Typ.t option
type 'prim t =
| Prim of 'prim
| Field of {
prefix : 'prim t;
fn : IR.Fieldname.t;
typ : field_typ;
}
| StarField of {
prefix : 'prim t;
last_field : IR.Fieldname.t;
}

Represents a path starting with prefix and ending with the field last_field, the middle can be anything. Invariants:

  • There is at most one StarField
  • StarField excluded, there are no duplicate fieldnames
  • StarField can only be followed by Deref elements
val compare : ('prim -> 'prim -> int) -> 'prim t -> 'prim t -> int
val mk_append_field : prim_append_field:(?⁠typ:IR.Typ.t -> 'prim t -> IR.Fieldname.t -> (depth:int -> 'prim t -> 'prim t) -> int -> 'prim -> 'prim t) -> prim_append_star_field:('prim t -> IR.Fieldname.t -> ('prim t -> 'prim t) -> 'prim -> 'prim t) -> ?⁠typ:IR.Typ.t -> 'prim t -> IR.Fieldname.t -> 'prim t
val mk_append_star_field : prim_append_star_field:('prim t -> IR.Fieldname.t -> ('prim t -> 'prim t) -> 'prim -> 'prim t) -> 'prim t -> IR.Fieldname.t -> 'prim t