% k55.5.0+dev0-2025-04-28/'Diffing$DefsF$leftA;@@@A@@@@@7../../utils/diffing.mli | ~ | @@@@'Diffing@@A@%rightB;@@ A@@@@@ @   @  @@@@ A@A@"eqC;@@A@@@@@A  A  @@@@B@A@$diffD;@@A@@@@@D  D  @@@@C@A@%stateE;@@'A@@@@@&G  'G  @@@@%D@A@@@*~ e e+I & )@)E@@+change_kindG;@@(Deletion@@9N  :N  @@8G@)Insertion@@BO  CO  @@AH@,Modification@@KP  LP  @@JI@,Preservation@@TQ  UQ  @@SJ@@@A@@@@@XM  @@A@VF@A@&prefixZ*Format_doc'printer@#int@@@ m@'Diffing+change_kind@@@ n@@ o@@@ q@}R  ~R  @@|K@@%style@'Diffing+change_kind@@@ r@@$list$Misc%Style%style@@@@@@@@@S  S  =@@L@@&changeH;$left@%right@"eq@$diff@@D&DeleteI@@@W g iW g z@@N@&Insert#I@@@X { }X { @@O@$Keep4I@2I@0I@@@Y  Y  @@P@&ChangeFI@DI@=I@@@Z  Z  @@Q@@@A@YYYY@@@@@@@@V @ @ @@@@M@A@(classify@'Diffing&change@@@@@@@@ @@@@@'Diffing+change_kind@@@@@@-\  .\  @@,R@@ӱ&DefineI@!DJH&changeK;@@DA'Diffing&change!D$left@@@!D%right@@@!D"eq@@@!D$diff@@@@@@@@@@pfqf4@@@@oT@@@%patchL;@@zA'Diffing&Define&change@@@1@@@3@@@@g57g5O@@@@U@A@*ParametersN-update_resultM;@@A@@@@@kk@@@@V@A@&weight@'Diffing&Define&change@@@D@@FE@@@E@@G@mm@@W@@$test@!D%state@@@H@@T@!D$left@@@I@@R@!D%right@@@J@@P&Stdlib&result!D"eq@@@K!D$diff@@@L@@@O@@Q@@S@@U@q>Bq>w@@X@@&update@'Diffing&Define&change@@@V@@[@!D%state@@@W@@Y'Diffing&Define*Parameters-update_result@@@X@@Z@@\@,w-w%@@+Y@@@@0j1|@/Z@@!SO$diff@!D%state@@@]@@i@%array!D$left@@@^@@@`@@g@!D%right@@@a@@@c@@e'Diffing&Define%patch@@@d@@f@@h@@j@{|%@@z[@@@@~@~\@@ӱ&SimpleP@@@V@@@@@+A@@@@@@@@@@r%state@@@@@@ $left@@@@@@%right@@@@@&Stdlib&result "eq@@@&$diff@@@@@@@@@@@@@7@@@@@@@@@<%state@@@@@A%state@@@@@@@@Q@@@@@^@@@ӱ-Left_variadicR@@]@p@@@@@o@@@@@@  @@S@R@ml@@@@@@uk@@@@@@}j@@@@@ife@@@d@@@@@@@@@@@@@-@6@5@c@@@@@@b@@@@@@%state@@@@J$left@@@@@@@@@@@@@V@0@@+@a}b@``@@@ӱ.Right_variadicT@@@@@@[@@Z@@@Y@@X@{|1@@@@@@@W@@V@@@@U@@T@@@@S@@Rؠ@@@P@@@Q@@@O@@N@@M@@L@-@@@@@@K@@J@@@@I@@H@%state@@@E@r#%right@@@G@@@F@@D@@C@@B@U@@@@7@b@@@@@b9<@c@@@@32Parametric diffing@ _ This module implements diffing over lists of arbitrary content. It is parameterized by).@ = We provide the following guarantee: Given two lists !l% and !r V, if different patches result in different states, we say that the state diverges. 2We always return the optimal patch on prefixes of !l% and !r ' on which state does not diverge.@ Otherwise, we return a correct but non-optimal patch where subpatches with no divergent states are optimal for the given initial state.@@ More precisely, the optimality of Wagner-Fischer depends on the property that the edit-distance between a k-prefix of the left input and a l-prefix of the right input d(k,l) satisfies@ n d(k,l) = min ( del_cost + d(k-1,l), insert_cost + d(k,l-1), change_cost + d(k-1,l-1) )@  Under this hypothesis, it is optimal to choose greedily the state of the minimal patch transforming the left k-prefix into the right l-prefix as a representative of the states of all possible patches transforming the left k-prefix into the right l-prefix.@  If this property is not satisfied, we can still choose greedily a representative state. However, the computed patch is no more guaranteed to be globally optimal. Nevertheless, it is still a correct patch, which is even optimal among all explored patches.@@@@@@@@@@@@A,,Diffing.Defs3 *The core types of a diffing implementation@@@@@@@@@@@@AA8#1Diffing.Defs.left@@@A@@B@@@#2Diffing.Defs.right@@@A@@>=@@#/Diffing.Defs.eq37Detailed equality trace@@@@@@@@@@@@@@A@@BA@@#1Diffing.Defs.diff39Detailed difference trace@@@@@@@@@@@@@@A@@FE@@#2Diffing.Defs.state3>environment of a partial patch@@@@@@@@@@@@@@A@@JI@@@@IH@#3Diffing.change_kind3 YThe kind of changes which is used to share printing and styling across implementation@@@@@@@@@@@@@J@@@D@@@>@@@8@@@@A@@58@@.Diffing.prefix@2@@@@-Diffing.style@@ @@@@#.Diffing.change@YYYY@鑠@@@ᑠ@@@ّؠ֠@@@̠͑ʠ@@@@A@@@@0Diffing.classify@@.@@@@/.Diffing.Define3,Define(Defs) 9 creates the diffing types from the types defined in $Defs X and the functors that need to be instantatied with the diffing algorithm parameters@@@@@@@@@@@@Aܢ'Diffing$Defs$Defs@#5Diffing.Define.change3 (The type of potential changes on a list.@@@@@@@@@@@@@@A@@@#4Diffing.Define.patch3 &A patch is an ordered list of changes.@@@@@@@@@@@@@@A@~}@@9Diffing.Define.Parameters@zA # 'Diffing.Define.Parameters.update_result@@@A@@|{@@ Diffing.Define.Parameters.weight3)weight ch " returns the weight of the change "ch *. Used to find the smallest patch.@@@@@@@@@@@@@@@@@y>Diffing.Define.Parameters.test3-test st xl xr7 tests if the elements "xl% and "xr; are co mpatible ("Ok*) or not (%Error").@@@@@@@@@@@@@@@@@@@b Diffing.Define.Parameters.update3,update ch st = returns the new state after applying a change. The -update_result = type also contains expansions in the variadic case.@@@@@@@@@@@@l@m@b@@@@N@@LK@0Diffing.Define.S@HA5Diffing.Define.S.diff3.diff state l r $ computes the optimal patch between !l% and !r ", using the initial state %state!.@@@@@@@@@@@@c@ d@[@K@@@@3@@10@/5Diffing.Define.Simple-@A!*/ +Parameters with type update_result := state@>@ @@@@@@/