bap-c

A C language support library for BAP
IN THIS PACKAGE
Module Bap_c_data

C Data model.

This module defines abstractions for C values.

A value is backed by a datum - a sequence of bits that represents the value. This module also defines models for integer representation.

type model32 = [
| `LP32
| `ILP32
]

models for 32 bit systems

type model64 = [
| `ILP64
| `LLP64
| `LP64
]

models for 64 bit systems

type model = [
| model32
| model64
]

The following table summarize all models of integer representation.

       LP32	 ILP32	 ILP64	 LLP64	 LP64
 char	  8	    8	     8	     8	    8
 short	 16	   16	    16	    16	   16
 int	 16	   32	    64	    32	   32
 long	 32	   32	    64	    32	   64
 addr    32	   32	    64	    64	   64
type value =
| Top(*

any possible value

*)
| Set of Bap.Std.word list(*

one of the specified

*)

Abstract value lattice. The lattice is complete, and Set [] is the supremum, i.e., the bot.

val bin_shape_value : Core_kernel.Bin_prot.Shape.t
val __bin_read_value__ : ( int -> value ) Core_kernel.Bin_prot.Read.reader
val compare_value : value -> value -> int
val value_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> value
val sexp_of_value : value -> Ppx_sexp_conv_lib.Sexp.t
type t =
| Imm of Bap.Std.Size.t * value(*

Imm (size,value)

*)
| Seq of t list(*

Seq (t1,..,tN)

*)
| Ptr of t(*

Ptr (type,size)

*)

abstraction of a С datum.

The datum is a sequence of bits, that represent a particular C value. We abstract datum as either an immediate value of the given size and value lattice, or a sequence of data, or a pointer to a datum.

val __bin_read_t__ : ( int -> t ) Core_kernel.Bin_prot.Read.reader
val compare : t -> t -> Base.Int.t
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t