Module Astral_internal.SL_graph

include module type of struct include SL_graph0 end
module SL_edge = SL_graph0.SL_edge
module G = SL_graph0.G
val compare_edge_e : G.E.t -> G.E.t -> int
val get_vertices : G.t -> G.vertex list
val get_edges : G.t -> G.edge list
val get_fields : G.t -> MemoryModel.Field.t list
val compare : G.t -> G.t -> int
val equal : G.t -> G.t -> bool
module S = SL_graph0.S
include sig ... end
val show : S.t -> string
val pp : Stdlib.Format.formatter -> S.t -> unit
val print : ?prefix:string -> S.t -> unit
val show_option : S.t option -> string
val print_option : ?prefix:string -> S.t option -> unit
val dump : string -> S.t -> unit
val show_list : ?separator:string -> S.t list -> string
val pp_list : Stdlib.Format.formatter -> S.t list -> unit
val print_list : ?separator:string -> ?prefix:string -> S.t list -> unit
include sig ... end
module Set = SL_graph0.Set
module MonoList = SL_graph0.MonoList
module Map = SL_graph0.Map
module MonoMap = SL_graph0.MonoMap

Projections

val filter : G.t -> (G.edge -> bool) -> G.t
val projection : G.t -> SL_edge.t list -> G.t
val projection_sort : Astral_internal.SL.Term.Sort.t -> G.t -> G.t
val pure_projection : G.t -> G.t
val projection_eq : G.t -> G.g
val projection_neq : G.t -> G.t
val projection_pointer : G.t -> G.t
val spatial_projection : G.t -> G.t
val projection_field : MemoryModel.Field.t -> G.t -> G.t
val projection_path : G.t -> G.t
val projection_path_field : MemoryModel.Field.t -> G.t -> G.t
val neighbours : G.t -> G.vertex -> G.vertex list
val equivalence_class : G.t -> G.V.t -> G.V.t list
val must_disjoint_with : G.t -> SL.Term.t -> MemoryModel.Field.t -> SL.Term.t -> SL.Term.t list
val must_disjoint : G.t -> MemoryModel.Field.t -> SL.Term.t -> SL.Term.t -> G.V.t -> bool
val must_eq : G.t -> G.vertex -> G.vertex -> bool
val must_neq : G.t -> G.vertex -> G.vertex -> bool
val must_pointer : G.t -> MemoryModel.Field.t -> G.vertex -> G.vertex -> bool
val must_pointer_any : G.t -> G.vertex -> bool
val must_root : G.t -> G.vertex -> bool
val must_path : G.t -> MemoryModel.Field.t -> SL.Term.t -> SL.Term.t -> bool
val must_proper_path_any : G.t -> G.vertex -> bool
val nb_must_pointers : G.t -> Astral_internal.SL.Term.Sort.t -> int
val must_allocated : ?visited:SL.Term.t list -> SL.Term.t -> G.t -> bool
val must_alloc : G.t -> SL.Term.t list
val nb_allocated : ?distinct:bool -> G.t -> int
val nb_roots : G.t -> int
val must_successor_ptr : G.t -> MemoryModel.Field.t -> G.vertex -> G.vertex option

TODO: SL-graph normalisation

val must_successor_any : G.t -> MemoryModel.Field.t -> G.vertex -> G.vertex
val must_successor_edge : G.t -> MemoryModel.Field.t -> G.vertex -> G.edge
val nb_joins : G.t -> MemoryModel.Field.t -> int
include module type of struct include G end
include module type of struct include Self end
type t = Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(Astral_internal.SL.Term)(Astral_internal.SL_graph0.SL_edge).t
type vertex = V.t
type edge = E.t
val is_directed : bool
val is_empty : t -> bool
val nb_vertex : t -> int
val nb_edges : t -> int
val out_degree : t -> vertex -> int
val in_degree : t -> vertex -> int
val mem_vertex : t -> vertex -> bool
val mem_edge : t -> vertex -> vertex -> bool
val mem_edge_e : t -> edge -> bool
val find_edge : t -> vertex -> vertex -> edge
val find_all_edges : t -> vertex -> vertex -> edge list
val succ : t -> vertex -> vertex list
val pred : t -> vertex -> vertex list
val succ_e : t -> vertex -> edge list
val pred_e : t -> vertex -> edge list
val iter_vertex : (vertex -> unit) -> t -> unit
val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges : (vertex -> vertex -> unit) -> t -> unit
val fold_edges : (vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges_e : (edge -> unit) -> t -> unit
val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a
val map_vertex : (vertex -> vertex) -> t -> t
val iter_succ : (vertex -> unit) -> t -> vertex -> unit
val iter_pred : (vertex -> unit) -> t -> vertex -> unit
val fold_succ : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val fold_pred : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_succ_e : (edge -> unit) -> t -> vertex -> unit
val fold_succ_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_pred_e : (edge -> unit) -> t -> vertex -> unit
val fold_pred_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val empty : t
val add_vertex : t -> vertex -> t
val remove_vertex : t -> vertex -> t
val add_edge : t -> vertex -> vertex -> t
val remove_edge : t -> vertex -> vertex -> t
val remove_edge_e : t -> edge -> t
include sig ... end
type g = Self.t
val transitive_closure : ?reflexive:bool -> g -> g
val add_transitive_closure : ?reflexive:bool -> g -> g
val transitive_reduction : ?reflexive:bool -> g -> g
val replace_by_transitive_reduction : ?reflexive:bool -> g -> g
val mirror : g -> g
val complement : g -> g
val intersect : g -> g -> g
val union : g -> g -> g
val add_edge_e : t -> (SL.Term.t * SL_graph0.SL_edge.t * SL.Term.t) -> t
include sig ... end
val fprint_graph : Stdlib.Format.formatter -> Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(Astral_internal.SL.Term)(Astral_internal.SL_graph0.SL_edge).t -> unit
val output_graph : Stdlib.out_channel -> Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(Astral_internal.SL.Term)(Astral_internal.SL_graph0.SL_edge).t -> unit
val output_file : string -> Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(Astral_internal.SL.Term)(Astral_internal.SL_graph0.SL_edge).t -> unit
val must_pred_field : G.t -> G.vertex -> (G.E.vertex * MemoryModel.Field.t) option
module CC = SL_graph0.CC
val is_connected : G.t -> bool
val are_skeleton_fields : G.t -> MemoryModel.Field.t list -> bool

==== Evaluation ====

val eval_term : G.t -> SL.Term.t -> SL.Term.t option
val lift : G.t -> (G.t -> SL.Term.t -> SL.Term.t -> bool) -> (G.t -> SL.Term.t -> SL.Term.t -> bool) -> SL.Term.t -> SL.Term.t -> ThreeValuedLogic.t
val eval_predicate : G.t -> SL.t -> ThreeValuedLogic.t

==== Edge contraction ====

Reimplementation of the algorithm from Ocamlgraph which does not allow to provide vertex selection function.

TODO: tests

val contract : G.t -> (SL.Term.t -> bool) -> G.t

==== Reachability ====

module Reachability : sig ... end
val reachable_nodes : G.t -> SL.Term.t -> G.vertex list
val find_reachable : G.t -> SL.Term.t -> SL.Term.MonoList.t -> G.vertex option

==== Paths ====

module W : sig ... end
module Dijkstra : sig ... end
val find_path : G.t -> G.V.t -> G.V.t -> MemoryModel.Field.t list

==== Vertex substitution ====

module GM : sig ... end
val substitute : G.t -> vertex:SL.Term.t -> by:SL.Term.t -> G.t
val substitute_list : G.t -> vertices:SL.Term.t list -> by:SL.Term.t list -> G.t

==== SL-graph construction ====

val all_equal : SL.Term.t list -> G.t
val all_distinct : SL.Term.t list -> G.t
val paths : G.t -> G.edge list
val unpack : ('a * SL_edge.t * 'b) -> 'a * MemoryModel.Field.t * 'b
val update : G.g -> G.g -> G.t
val saturate_heap_terms : SL.t -> G.t -> G.t
val disjoint_union : ?stars:bool -> G.t list -> G.t
val of_pointer : SL.Term.t -> MemoryModel.StructDef.t -> SL.Term.t list -> G.t

Construct node with all *location*-fields.

val normalise : G.t -> G.t
exception Contradiction
val has_contradiction : G.t -> bool
val do_normalise : G.t -> G.t
val compute : ?normalise:bool -> ?stars:bool -> SL.t -> G.t