123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566(*******************************************************************************
* electrod - a model finder for relational first-order linear temporal logic
*
* Copyright (C) 2016-2020 ONERA
* Authors: Julien Brunel (ONERA), David Chemouil (ONERA)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
* License-Filename: LICENSE.md
******************************************************************************)(** Provides fresh identifiers for variables (in formulas) at every stage. *)(** type of an identifier *)typet={id:int(** [id] identifies an identifier uniquely *);name:string(** [name] is a base string used to give a
human-friendly display *);sep:string;loc:Location.toption}letfresh=letc=ref0infun?(sep="/")?locs->assert(!c<max_int);letres={id=!c;name=s;sep;loc}inincrc;resletfresh_copyvar=fresh@@var.nameletfresh_of_raw_ident?(sep="/")v=fresh~sep~loc:(Raw_ident.locationv)(Raw_ident.basenamev)letcompareid1id2=CCInt.compareid1.idid2.idletequal{id=id1;_}{id=id2;_}=id1=id2letstyle=`Yellowletppout{id;name;sep;_}=Fmtc.pfout"%a%a%a"Fmtc.(styledstylestring)nameFmtc.(styledstylestring)sepFmtc.(styledstyleint)idmoduleP=Intf.Print.Mixin(structtypenonrect=tletpp=ppend)includeP