123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657(****************************************************************************)(* *)(* This file is part of MOPSA, a Modular Open Platform for Static Analysis. *)(* *)(* Copyright (C) 2017-2019 The MOPSA Project. *)(* *)(* This program is free software: 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, either version 3 of the License, or *)(* (at your option) any later version. *)(* *)(* This program 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. *)(* *)(* You should have received a copy of the GNU Lesser General Public License *)(* along with this program. If not, see <http://www.gnu.org/licenses/>. *)(* *)(****************************************************************************)(** Types *)openMopsa_utilstypetyp=..typetyp+=T_any(** Generic unknown type. *)|T_addr(** Heap addresses *)|T_bool(** Boolean type *)lettyp_compare_chain=TypeExt.mk_compare_chain(funt1t2->matcht1,t2with|T_any,T_any->0|T_addr,T_addr->0|T_bool,T_bool->0|_->comparet1t2)lettyp_pp_chain=TypeExt.mk_print_chain(funfmttyp->matchtypwith|T_any->Format.pp_print_stringfmt"?"|T_addr->Format.pp_print_stringfmt"addr"|T_bool->Format.pp_print_stringfmt"bool"|_->Exceptions.panic"typ_pp_chain: unknown type")letregister_typ(info:typTypeExt.info):unit=TypeExt.registerinfotyp_compare_chaintyp_pp_chainletregister_typ_comparecmp=TypeExt.register_comparecmptyp_compare_chainletregister_typ_pppp=TypeExt.register_printpptyp_pp_chainletcompare_typt1t2=TypeExt.comparetyp_compare_chaint1t2letpp_typfmttyp=TypeExt.printtyp_pp_chainfmttyp