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/Structural_descr/index.html
Module Frama_c_kernel.Structural_descr
Internal representations of OCaml type as first class values. These values are called structural descriptors.
Type declarations
Type used for handling (possibly mutually) recursive structural descriptors. See module Recursive
.
type single_pack = private Unmarshal.t
type pack = private
| Nopack
(*Was impossible to build a pack.
*)| Pack of single_pack
(*A standard pack.
*)| Recursive of recursive
Structural descriptor used inside structures.
type t = private
| Unknown
(*Use it either for unmarshable types or if you don't know its internal representation. In any case, values of types with this descriptor will never be written on disk.
*)| Abstract
(*The data is marshable as an usual OCaml value. No specific processing will be applied on any part of such a data.
*)| Structure of structure
(*Provide a description of the representation of data.
*)| T_pack of single_pack
(*Internal use only. Do not use it outside the library
*)
Type of internal representations of OCaml type.
Example: the structural descriptor of A | B of int * bool | C of string
is Structure (Sum [| [| p_int; p_bool |]; [| p_string |] |])
. Ok, in this case, just Abstract
is valid too.
and structure = private
| Sum of pack array array
(*
*)Sum c
describes a non-array type wherec
is an array describing the non-constant constructors of the type being described (in the order of their declarations in that type). Each element of this latter array is an array oft
that describes (in order) the fields of the corresponding constructor.| Array of pack
(*The data is an array of values of the same type, each value being described by the pack.
*)
Description with details.
Pack builders
module Recursive : sig ... end
Use this module for handling a (possibly recursive) structural descriptor d
. Call Recursive.create ()
(returning r
) before building d
. Build d
and use Recursive r
in places where d
should be put. Call Recursive.update r d
after building d
.
Predefined descriptors
val t_unknown : t
val t_abstract : t
val t_unit : t
val t_int : t
val t_string : t
val t_float : t
val t_bool : t
val t_int32 : t
val t_int64 : t
val t_nativeint : t
Use the functions below only if the compare/hash functions cannot change by marshalling.
Packed versions of predefined descriptors.
val p_abstract : pack
Equivalent to pack Abstract
val p_unit : pack
val p_int : pack
val p_string : pack
val p_float : pack
val p_bool : pack
val p_int32 : pack
val p_int64 : pack
val p_nativeint : pack
Internals
These values must be used only inside the Type library.
val unsafe_pack : Unmarshal.t -> pack
val of_pack : single_pack -> t