1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465(****************************************************************************)(* *)(* 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/>. *)(* *)(****************************************************************************)(** Reduction rules for abstract evaluations *)openCore.All(** Manager used by reduction rules *)type'aexec_reduction_man={get_man:'t.'tid->('a,'t)man;}(** Signature of a reduction rule for post-conditions *)moduletypeEXEC_REDUCTION=sigvalname:stringvalreduce:stmt->('a,'b)man->'aexec_reduction_man->'aflow->'aflow->change_map->'apostoptionend(** {2 Registration} *)(** **************** *)(** Registered exec reductions *)letexec_reductions:(moduleEXEC_REDUCTION)listref=ref[](** Register a new exec reduction *)letregister_exec_reductionrule=exec_reductions:=rule::!exec_reductions(** Find an exec reduction by its name *)letfind_exec_reductionname=List.find(funv->letmoduleV=(valv:EXEC_REDUCTION)incompareV.namename=0)!exec_reductionsletexec_reductions()=List.map(funv->letmoduleD=(valv:EXEC_REDUCTION)inD.name)!exec_reductions