123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475(******************************************************************************)(* _ __ * The Kappa Language *)(* | |/ / * Copyright 2010-2020 CNRS - Harvard Medical School - INRIA - IRIF *)(* | ' / *********************************************************************)(* | . \ * This file is distributed under the terms of the *)(* |_|\_\ * GNU Lesser General Public License Version 3 *)(******************************************************************************)letint_compare(x:int)y=Stdlib.comparexyletint_pair_compare(p,q)(p',q')=leto=int_comparepp'inifo=0thenint_compareqq'elseoletstring_pair_compare(p,q)(p',q')=leto=String.comparepp'inifo=0thenString.compareqq'elseoletpair_equaleqaeqb(xa,xb)(ya,yb)=eqaxaya&&eqbxbybmoduleStringSetMap=SetMap.Make(structtypet=stringletcompare=String.compareletprint=Format.pp_print_stringend)moduleStringSet=StringSetMap.SetmoduleStringMap=StringSetMap.MapmoduleString2SetMap=SetMap.Make(structtypet=string*stringletcompare=string_pair_compareletprintf(a,b)=Format.fprintff"(%s, %s)"abend)moduleString2Map=String2SetMap.MapmoduleIntSetMap=SetMap.Make(structtypet=intletcompare=int_compareletprint=Format.pp_print_intend)moduleIntSet=IntSetMap.SetmoduleIntMap=IntSetMap.MapmoduleInt2SetMap=SetMap.Make(structtypet=int*intletcompare=int_pair_compareletprintf(a,b)=Format.fprintff"(%i, %i)"abend)moduleInt2Set=Int2SetMap.SetmoduleInt2Map=Int2SetMap.MapmoduleCharSetMap=SetMap.Make(structtypet=charletcompare=compareletprint=Format.pp_print_charend)moduleCharSet=CharSetMap.SetmoduleCharMap=CharSetMap.MapmoduleDynArray=DynamicArray.DynArray(LargeArray)