package frama-c
Install
Dune Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
NNicolas Bellec
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
VVincent Botbol
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
RRemi Lazarini
-
TTristan Le Gall
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
PPierre Nigron
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
JJan Rochel
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=d2fbb3b8d0ff83945872e9e6fa258e934a706360e698dae3b4d5f971addf7493
doc/frama-c.kernel/Frama_c_kernel/Bit_utils/index.html
Module Frama_c_kernel.Bit_utils
Some bit manipulations.
val sizeofchar : unit -> Integer.t
sizeof(char)
in bits
val sizeof : Cil_types.typ -> Int_Base.t
sizeof ty
is the size of ty
in bits. This function may return Int_Base.top
.
val osizeof : Cil_types.typ -> Int_Base.t
osizeof ty
is the size of ty
in bytes. This function may return Int_Base.top
.
val is_signed_int_enum_pointer : Cil_types.typ -> bool
true
means that the type is signed.
val signof_typeof_lval : Cil_types.lval -> bool
val sizeof_vid : Cil_types.varinfo -> Int_Base.t
val sizeof_lval : Cil_types.lval -> Int_Base.t
val sizeof_pointed : Cil_types.typ -> Int_Base.t
val osizeof_pointed : Cil_types.typ -> Int_Base.t
val sizeof_pointed_lval : Cil_types.lval -> Int_Base.t
val max_bit_address : unit -> Integer.t
val max_bit_size : unit -> Integer.t
val max_byte_address : unit -> Integer.t
val max_byte_size : unit -> Integer.t
Pretty printing
val pretty_bits :
Cil_types.typ ->
use_align:bool ->
align:Abstract_interp.Rel.t ->
rh_size:Integer.t ->
start:Integer.t ->
stop:Integer.t ->
Format.formatter ->
bool * Cil_types.typ option
Pretty prints a range of bits in a type for the user. Tries to find field names and array indexes, whenever possible.
Mapping from numeric offsets to symbolic ones.
val type_compatible : Cil_types.typ -> Cil_types.typ -> bool
Comparison of the shape of two types. Attributes are completely ignored.
type offset_match =
| MatchType of Cil_types.typ
(*Offset that has this type (modulo attributes)
*)| MatchSize of Integer.t
(*Offset that has a type of this size
*)| MatchFirst
(*Return first symbolic offset that matches
*)
We want to find a symbolic offset that corresponds to a numeric one, with one additional criterion:
val find_offset :
Cil_types.typ ->
offset:Integer.t ->
offset_match ->
Cil_types.offset * Cil_types.typ
find_offset typ ~offset ~size
finds a subtype t
of typ
that describes the type of the bits offset..offset+size-1
in typ
. May return a subtype of typ
, or a type that is a sub-array of an array type in typ
. Also returns a Cil_types.offset
off
that corresponds to offset
. (But we do not have the guarantee that typeof(off) == typ
, because of sub-arrays.)