Utils.Match_map
A map of a matching.
A matching is either a single string of assertions for most matches (Direct
) or potentially multiple strings of assertions when folding a predicate (Fold
), each representing a case of the predicate.
Each string of assertions (dubbed match_seg
) is essentially a singly linked list of Assertion
s (each of which contains information about that assertion - see assertion_data
), terminated by a MatchResult
that states whether that matching (or that case in the matching) was a success.
type kind = Engine.Matcher.match_kind
Describes why this matching is happening
val kind_to_yojson : kind -> Yojson.Safe.t
val kind_of_yojson : Yojson.Safe.t -> kind Ppx_deriving_yojson_runtime.error_or
val match_result_to_yojson : match_result -> Yojson.Safe.t
val match_result_of_yojson :
Yojson.Safe.t ->
match_result Ppx_deriving_yojson_runtime.error_or
A substitution, and the ID of the assertion where it was learned
val substitution_to_yojson : substitution -> Yojson.Safe.t
val substitution_of_yojson :
Yojson.Safe.t ->
substitution Ppx_deriving_yojson_runtime.error_or
type assertion_data = {
id : Logging.Report_id.t;
The report ID of the assertion in the log database
*)fold : (Logging.Report_id.t * match_result) option;
The ID of the fold matching and its result, if this assertion requires a fold
*)assertion : string;
The string representation of this assertion
*)substitutions : substitution list;
A list of the substitutions learned from this assertion specifically
*)}
Represents one step of a matching
val assertion_data_to_yojson : assertion_data -> Yojson.Safe.t
val assertion_data_of_yojson :
Yojson.Safe.t ->
assertion_data Ppx_deriving_yojson_runtime.error_or
type node =
| Assertion of assertion_data * Logging.Report_id.t list
| MatchResult of Logging.Report_id.t * match_result
val node_to_yojson : node -> Yojson.Safe.t
val node_of_yojson : Yojson.Safe.t -> node Ppx_deriving_yojson_runtime.error_or
type t = {
kind : kind;
roots : Logging.Report_id.t list;
nodes : (Logging.Report_id.t, node) Utils.Prelude.Hashtbl.t;
result : match_result;
}
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
val _ : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
module type Build = Debugger_utils.Match_map.Build
Build.f
: Given the ID of a matching, build the representative matching map
module Make_builder = Debugger_utils.Match_map.Make_builder