123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899(****************************************************************************)(* *)(* 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/>. *)(* *)(****************************************************************************)(** Signature of stacked combiner domains *)openCore.AllopenAbstraction.StackedmoduletypeSTACKED_COMBINER=sigincludeSTACKEDvaldomains:DomainSet.tvalsemantics:SemanticSet.tvalrouting_table:routing_tablevalmerge:path->t->t*change_map->t*change_map->tvalexec:DomainSet.toption->stmt->('a,t)man->'aflow->'apostoptionvaleval:DomainSet.toption->expr->('a,t)man->'aflow->'aevaloptionvalask:DomainSet.toption->('a,'r)query->('a,t)man->'aflow->('a,'r)casesoptionvalprint_state:DomainSet.toption->printer->t->unitvalprint_expr:DomainSet.toption->('a,t)man->'aflow->printer->expr->unitendmoduleEmptyDomain:STACKED_COMBINER=structtypet=unitletname="empty"includeGenDomainId(structtypenonrect=tletname=nameend)letdomains=DomainSet.singletonnameletsemantics=SemanticSet.emptyletrouting_table=empty_routing_tableletchecks=[]letbottom=()lettop=()letis_bottom_=falseletprint_state___=()letprint_expr_____=()letsubset__((),s)((),s')=true,s,s'letjoin__((),s)((),s')=(),s,s'letmeet__((),s)((),s')=(),s,s'letwiden__((),s)((),s')=(),s,s',trueletmerge____=()letinit__flow=Noneletexec___flow=Noneleteval___flow=Noneletask____=NoneendmoduleStackedToCombiner(D:STACKED):STACKED_COMBINERwithtypet=D.t=structincludeDletdomains=DomainSet.singletonD.nameletsemantics=SemanticSet.emptyletrouting_table=empty_routing_tableletmergepathpre(a1,m1)(a2,m2)=lete1=get_changepathm1inlete2=get_changepathm2inifcompare_changee1e2=0thena1elseifis_empty_changee1thena2elseifis_empty_changee2thena1elseD.mergepre(a1,e1)(a2,e2)letexectargets=D.execletevaltargets=D.evalletasktargets=D.askletprint_statetargets=D.print_stateletprint_exprtargets=D.print_exprendmoduleCombinerToStacked(T:STACKED_COMBINER):STACKEDwithtypet=T.t=structincludeTletmergepre(a1,e1)(a2,e2)=lette1=singleton_change_mapempty_pathe1inlette2=singleton_change_mapempty_pathe2inT.mergeempty_pathpre(a1,te1)(a2,te2)letexecstmtmanflow=T.execNonestmtmanflowletevalexpmanflow=T.evalNoneexpmanflowletaskquerymanflow=T.askNonequerymanflowletprint_stateprintera=T.print_stateNoneprinteraletprint_exprmanflowprintere=T.print_exprNonemanflowprintereend