package diffast-core

  1. Overview
  2. Docs
module Loc = Diffast_misc.Loc
module Xlist = Diffast_misc.Xlist
module Xset = Diffast_misc.Xset
module Xhash = Diffast_misc.Xhash
module Xfile = Diffast_misc.Xfile
module Xprint = Diffast_misc.Xprint
module Xchannel = Diffast_misc.Xchannel
module Compression = Diffast_misc.Compression
module Otree = Diffast_misc.Otree
module Json = Node_mapping.Json
module Nodetbl = Node.Tbl
val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a
val del_bg : string
val del_fg : string
val ins_bg : string
val ins_fg : string
val mov_bg : string
val mov_fg : string
val rel_bg : string
val rel_fg : string
val movrel_bg : string
val movrel_fg : string
type line_match =
  1. | LM_single of int * int
  2. | LM_multi of int * int * int
val get_label : < children : < data : < is_named : bool ; label : string.. >.. > array ; data : < is_named : bool ; label : string.. >.. > -> string
val _same_digest : < get_digest : < data : < _digest : 'b option ; eq : < _digest : 'b option.. > as 'c -> bool.. > ; initial_nchildren : int.. > as 'a -> 'b.. > -> < get_digest : < data : 'c ; initial_nchildren : int.. > as 'd -> 'b.. > -> ?leaf_comparison:bool -> ?digest_for_leaf:bool -> ?digest_for_all:bool -> 'a -> 'd -> bool
val tbl_add : ('a, 'b list) Hashtbl.t -> 'a -> 'b -> unit
val tbl_add_s : ('a, 'b Xset.t) Hashtbl.t -> 'a -> 'b -> unit
type segment = int * int
val sort_segments : segment list -> segment list
val segments_to_string : segment list -> string
val merge_segments : segment list list -> (int * int) list
include module type of struct include Editop end
val sprintf : ('a, unit, string) format -> 'a
type move_id = Moveid.t
type move_kind = Editop.move_kind =
  1. | Mnormal
  2. | Mpermutation
  3. | Modd
val move_id_to_string : Moveid.t -> string
val move_kind_to_string : move_kind -> string
type 'node_t t = 'node_t Editop.t =
  1. | Delete of bool * 'node_t Info.t * 'node_t Info.t list ref
  2. | Insert of bool * 'node_t Info.t * 'node_t Info.t list ref
  3. | Relabel of bool ref * 'node_t Info.t * 'node_t Info.t list ref * 'node_t Info.t * 'node_t Info.t list ref
  4. | Move of move_id ref * move_kind ref * 'node_t Info.t * 'node_t Info.t list ref * 'node_t Info.t * 'node_t Info.t list ref
type tag = Editop.tag =
  1. | Tdel
  2. | Tins
  3. | Trel
  4. | Tmov
val tag_to_string : tag -> string
val hash : < uid : UID.t.. > t -> tag * UID.t * UID.t
val to_string : < data : < gid : Diffast_core.Info.GI.t ; label : string.. > ; gindex : Diffast_core.Info.GI.t ; initial_pos : int ; is_collapsed : bool ; uid : Diffast_core.Info.UID.t.. > t -> string
val to_string_gid : < data : < gid : Diffast_core.Info.GI.t ; label : string.. > ; gindex : Diffast_core.Info.GI.t ; initial_pos : int ; is_collapsed : bool.. > t -> string
val is_whole : < is_collapsed : 'a.. > -> 'a
val make_delete : < data : < src_loc : Diffast_core.Info.Loc.t.. > ; is_collapsed : bool.. > as 'a -> 'a t
val make_insert : < data : < src_loc : Diffast_core.Info.Loc.t.. > ; is_collapsed : bool.. > as 'a -> 'a t
val make_relabel : < data : < src_loc : Diffast_core.Info.Loc.t.. >.. > as 'a -> 'a -> 'a t
val _make_move : move_id -> move_kind -> 'a Info.t -> 'a Info.t -> 'a t
val make_move : move_id -> 'a Info.t -> 'a Info.t -> 'a t
val make_move_permutation : move_id -> 'a Info.t -> 'a Info.t -> 'a t
val make_move_odd : move_id -> 'a Info.t -> 'a Info.t -> 'a t
val ups : unit -> Diffast_core.Misc.UID.t -> string
val nps : unit -> < data : < get_category : string ; get_name : string ; get_value : string ; src_loc : Diffast_core.Misc.Loc.t.. > ; uid : Diffast_core.Misc.UID.t.. > -> string
val gps : unit -> Diffast_core.Misc.GI.t -> string
val nups : unit -> < uid : Diffast_core.Misc.UID.t.. > -> string
val ngps : unit -> < gindex : Diffast_core.Misc.GI.t.. > -> string
val nugps : unit -> < gindex : Diffast_core.Misc.GI.t ; uid : Diffast_core.Misc.UID.t.. > -> string
val usps : unit -> Diffast_core.Misc.UID.t list -> string
val nsps : unit -> < uid : Diffast_core.Misc.UID.t.. > list -> string
val naps : unit -> < uid : Diffast_core.Misc.UID.t.. > array -> string
val locps : unit -> < data : < src_loc : Diffast_core.Misc.Loc.t.. >.. > -> string
val labps : unit -> < data : < get_category : string ; get_name : string ; get_value : string.. >.. > -> string
val get_stmt : < initial_parent : < data : < is_statement : bool.. > ; initial_parent : 'a.. > as 'a.. > -> 'a
val get_bn : < initial_parent : < data : < is_boundary : bool.. > ; initial_parent : 'a.. > as 'a.. > -> 'a
val boundary_stable : (Diffast_misc.UID.t -> Diffast_misc.UID.t) -> (Diffast_misc.UID.t -> Diffast_misc.UID.t -> bool) -> < _replace_children : ?initial:bool -> (int * Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array) list -> unit ; _set_is_collapsed : bool -> unit ; add_child : int -> Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; add_child_leftmost : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; add_child_rightmost : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; add_children_leftmost : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array -> unit ; add_children_rightmost : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array -> unit ; add_substance : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; apath : Diffast_misc.Path.t ; begin_mutation : unit -> unit ; children : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array ; children_indexes : int list ; children_uids : Diffast_misc.UID.t list ; clear_collapsible : unit ; clear_in_path : unit ; collapse : int -> Diffast_misc.Xhash.t -> unit ; collapse_locked : bool ; collapse_not_locked : bool ; collapsible : bool ; data : Spec.node_data_t ; decide_collapsible_or_not : unit ; del_leftmost_child : unit -> unit ; del_rightmost_child : unit -> unit ; end_mutation : ?overwrite:bool -> unit -> unit ; expand : unit ; get_substances : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 list ; gindex : Diffast_core.Spec.SB.Otree.GI.t ; has_hidden_parent : bool ; has_initial_parent : bool ; has_later_mutation : bool ; has_parent : bool ; hash : int ; hidden_children : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array ; hidden_parent : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 ; hide_parent : unit ; in_path : bool ; index : int ; init_mutation : unit -> unit ; initial_ancestor_nodes : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 list ; initial_children : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array ; initial_children_uids : Diffast_misc.UID.t list ; initial_nchildren : int ; initial_parent : 'b ; initial_pos : int ; initial_to_string : string ; insert_path : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 list -> unit ; is_collapsed : bool ; is_contracted : bool ; is_leaf : bool ; is_valid : bool ; iter_initial_ancestor_nodes : (Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit) -> unit ; lock_collapse : unit ; nchildren : int ; nth_child : int -> Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 ; parent : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 ; parent_edge : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 option ; path : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 Diffast_core.Spec.SB.Otree.path ; pos : int ; preorder_index : int ; print : unit ; prune : unit ; prune_all_children : unit ; prune_children : int list -> unit ; prune_initial_children : int list -> unit ; prune_nth_child : int -> unit ; replace_children : (int * Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array) list -> unit ; replace_nth_child : int -> Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array -> unit ; set_apath : Diffast_misc.Path.t -> unit ; set_children : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array -> unit ; set_collapsible : unit ; set_data : Spec.node_data_t -> unit ; set_digest : Diffast_misc.Xhash.t -> unit ; set_gindex : Diffast_core.Spec.SB.Otree.GI.t -> unit ; set_hidden_children : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array -> unit ; set_in_path : unit ; set_index : int -> unit ; set_initial_children : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 array -> unit ; set_initial_parent : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; set_initial_pos : int -> unit ; set_parent : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; set_parent_edge : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 option -> unit ; set_path : Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 list -> unit ; set_pos : int -> unit ; set_preorder_index : int -> unit ; to_dot : ?mklab:(Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> string) -> unit -> string ; to_dot_str : ?mklab:(Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> string) -> unit -> string ; to_dot_str_ini : ?mklab:(Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> string) -> unit -> string ; to_qualified_string : string ; to_rep : string ; to_string : string ; uid : Diffast_misc.UID.t ; unhide_parent : unit ; unlock_collapse : unit ; v_delete_child : int -> unit ; v_delete_children : int list -> unit ; v_insert_child : ?later:bool -> ?offset:float -> int -> Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; v_insert_children : ?later:bool -> ?offset:float -> int -> Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 list -> unit ; v_update_child : int -> Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 -> unit ; v_update_children : int -> Spec.node_data_t Diffast_core.Spec.SB.Otree.node2 list -> unit > as 'a -> 'c -> bool
val get_mid : 'a t -> move_id
val add : < data : < gid : Diffast_core.Info.GI.t ; label : string.. > ; gindex : Diffast_core.Info.GI.t ; initial_pos : int ; is_collapsed : bool ; uid : Diffast_core.Info.UID.t.. > as 'a t Nodetbl.t -> Nodetbl.key -> 'a t -> unit
val add2 : < data : < gid : Diffast_core.Info.GI.t ; label : string.. > ; gindex : Diffast_core.Info.GI.t ; initial_pos : int ; is_collapsed : bool ; uid : Diffast_core.Info.UID.t.. > as 'a t Nodetbl.t -> 'a t Nodetbl.t -> Nodetbl.key -> Nodetbl.key -> 'a t -> unit
val gid_of_edit1 : < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > t -> Diffast_core.Info.GI.t
val gid_of_edit2 : < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > t -> Diffast_core.Info.GI.t
val comp_edits_topdown : ('a t -> 'b) -> 'a t -> 'a t -> int
val _sort_edit_list_topdown : ('a t -> 'b) -> 'a t list -> 'a t list
val sort_edit_list_topdown : < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > as 'a t list -> 'a t list
val comp_edits_bottomup : 'a -> < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > t -> < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > t -> int
val _sort_edit_list_bottomup : 'a -> < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > as 'b t list -> 'b t list
val sort_edit_list_bottomup : < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > as 'a t list -> 'a t list
val sort_mids_movs : ('a t -> 'a t -> int) -> 'a t list -> 'a t list
val sort_move_list_topdown : < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > as 'a t list -> 'a t list
val sort_move_list_bottomup : < data : < gid : Diffast_core.Info.GI.t.. > ; gindex : Diffast_core.Info.GI.t.. > as 'a t list -> 'a t list
val tbl_remove : 'a Nodetbl.t -> Nodetbl.key -> unit
exception Found
exception Abort
val is_ghost_node : < data : < src_loc : Loc.t.. >.. > -> bool
class formatters_base : delete:(int -> int -> segment list -> string) -> insert:(int -> int -> segment list -> string) -> relabel:(bool -> int -> int -> segment list -> int -> int -> segment list -> string) -> move:(int -> int -> segment list -> int -> int -> segment list -> string) -> align:(line_match -> string) -> ignored1:(segment -> string) -> ignored2:(segment -> string) -> misparsed1:(segment -> string) -> misparsed2:(segment -> string) -> object ... end
type move_region_tbl_t = (MID.t, GI.t * GI.t * GI.t * GI.t) Hashtbl.t
class [+'a, +'b] seq_base : < dump_size_threshold : int ; ignore_non_orig_relabel_flag : bool ; match_algo_threshold : int ; moveid_generator : < gen : MID.t.. > ; recover_orig_ast_flag : bool ; verbose_flag : bool ; viewer_flag : bool ; weak_eq_flag : bool.. > -> object ... end
OCaml

Innovation. Community. Security.