Module type Sig.Graph

Signature for domains that can generate new program graphs

include Std_extra.Types.PRINTABLE
type t
type state

The free algebra state, it is often a part of the full domain state (eg left/right projection in a product). To account for this difference, graph operation take a cast argument, casting from the full state to the free algebra substate.

val size : t -> int

Number of nodes in the graph

val dotty_printer : Stdlib.Format.formatter -> t -> unit

Print the graph in dotty format

val make : cast:('a -> state) -> join_preds:(Ast.Program.Loc.t -> 'a Ast.Program.LocMap.t -> 'a option) -> 'a Ast.Program.LocMap.t -> t

Generate the graph

val assertions_and_dead_ends : cast:('a -> state) -> t -> 'a Ast.Program.LocMap.t -> int * int

Returns the number of assertions (nodes with a single guarded child) and dead ends (nodes with no children) in the graph