123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657(**************************************************************************)(* *)(* This file is part of WP plug-in of Frama-C. *)(* *)(* Copyright (C) 2007-2023 *)(* CEA (Commissariat a l'energie atomique et aux energies *)(* alternatives) *)(* *)(* you can redistribute it and/or modify it under the terms of the GNU *)(* Lesser General Public License as published by the Free Software *)(* Foundation, version 2.1. *)(* *)(* It is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Lesser General Public License for more details. *)(* *)(* See the GNU Lesser General Public License version 2.1 *)(* for more details (enclosed in the file licenses/LGPLv2.1). *)(* *)(**************************************************************************)(* ---------------------------------------------------------------------- *)(* --- Patricia Sets By L. Correnson & P. Baudin --- *)(* ---------------------------------------------------------------------- *)typet=unitIntmap.tletempty=Intmap.emptyletsingletonx=Intmap.singletonx()letaddx=Intmap.addx()letremovex=Intmap.removexletis_empty=Intmap.is_emptyletmem=Intmap.memletcardinal=Intmap.sizeletcompare=Intmap.compare(fun()()->0)letequal=Intmap.equal(fun()()->true)let_keep___=()let_keepq___=Some()let_same_()()=trueletunion=Intmap.union_keepletinter=Intmap.interq_keepqletdiff=Intmap.diffq_keepqletsubset=Intmap.subset_sameletintersect=Intmap.intersectf_sameletiterf=Intmap.iteri(funi()->fi)letfoldf=Intmap.foldi(funi()e->fie)letfilterf=Intmap.filter(funi()->fi)letpartitionf=Intmap.partition(funi()->fi)letfor_allf=Intmap.for_all(funi()->fi)letexistsf=Intmap.exists(funi()->fi)letelements=Intmap.mapl(funi()->i)