package binsec
Install
dune-project
Dependency
Authors
-
AAdel Djoudi
-
BBenoit Boero
-
BBenjamin Farinier
-
CChakib Foulani
-
DDorian Lesbre
-
FFrédéric Recoules
-
GGuillaume Girol
-
JJosselin Feist
-
LLesly-Ann Daniel
-
MMahmudul Faisal Al Ameen
-
MManh-Dung Nguyen
-
MMathéo Vergnolle
-
MMatthieu Lemerre
-
NNicolas Bellec
-
OOlivier Nicole
-
RRichard Bonichon
-
RRobin David
-
SSébastien Bardin
-
SSoline Ducousso
-
TTa Thanh Dinh
-
YYaëlle Vinçont
-
YYanis Sellami
Maintainers
Sources
sha256=b758f3428b62a03103403196af99a5bb7df77a35afbcc5ce2d2b1fbe6d2ab36b
sha512=afa4fdf09ae0c2ab02530d674f9f2c1473d156e0438b4cb9c262ffea2d98c448251de55cd6fb176562edaae3897aeabe873ffa1ad47f861c75e1943792d90261
doc/binsec.sse/Binsec_sse/Revision/index.html
Module Binsec_sse.RevisionSource
include module type of struct include Binsec_sse_loader.Disassembly.Revision end
include Binsec_sse_loader.Ir.GRAPH
include Graph.Sig.G with type V.t = int and type E.t = int * bool * int
Graph structure
Abstract type of graphs
module V = Binsec_sse_loader.Disassembly.Revision.VVertices have type V.t and are labeled with type V.label (note that an implementation may identify the vertex with its label)
type vertex = V.tmodule E = Binsec_sse_loader.Disassembly.Revision.EEdges have type E.t and are labeled with type E.label. src (resp. dst) returns the origin (resp. the destination) of a given edge.
type edge = E.tSize functions
val is_empty : t -> boolval nb_vertex : t -> intval nb_edges : t -> intDegree of a vertex
Membership functions
find_edge g v1 v2 returns the edge from v1 to v2 if it exists. Unspecified behaviour if g has several edges from v1 to v2.
find_all_edges g v1 v2 returns all the edges from v1 to v2.
Successors and predecessors
You should better use iterators on successors/predecessors (see Section "Vertex iterators").
Labeled edges going from/to a vertex
Graph iterators
Iter on all edges of a graph. Edge label is ignored.
Fold on all edges of a graph. Edge label is ignored.
Map on all vertices of a graph.
The current implementation requires the supplied function to be injective. Said otherwise, map_vertex cannot be used to contract a graph by mapping several vertices to the same vertex. To contract a graph, use instead create, add_vertex, and add_edge.
Vertex iterators
Each iterator iterator f v g iters f to the successors/predecessors of v in the graph g and raises Invalid_argument if v is not in g. It is the same for functions fold_* which use an additional accumulator.
<b>Time complexity for ocamlgraph implementations:</b> operations on successors are in O(1) amortized for imperative graphs and in O(ln(|V|)) for persistent graphs while operations on predecessors are in O(max(|V|,|E|)) for imperative graphs and in O(max(|V|,|E|)*ln|V|) for persistent graphs.
iter/fold on all successors/predecessors of a vertex.
iter/fold on all edges going from/to a vertex.
val node : t -> vertex -> Binsec_sse_loader.Ir.nodeinclude Binsec_sse_loader.Ir.INSTRUMENT
with type t := t
and type vertex := vertex
val insert_before :
t ->
vertex ->
?label:Binsec_sse_loader.Ir.label ->
Binsec_sse_loader.Ir.fallthrough ->
unitval insert_before_v :
t ->
vertex ->
?label:Binsec_sse_loader.Ir.label ->
Binsec_sse_loader.Ir.fallthrough ->
vertexval insert_list_before :
t ->
vertex ->
?label:Binsec_sse_loader.Ir.label ->
Binsec_sse_loader.Ir.fallthrough list ->
unitval insert_list_before_v :
t ->
vertex ->
?label:Binsec_sse_loader.Ir.label ->
Binsec_sse_loader.Ir.fallthrough list ->
vertex