12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697(**************************************************************************)(* *)(* 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). *)(* *)(**************************************************************************)openWpo(* -------------------------------------------------------------------------- *)(* --- Verification Conditions Interface --- *)(* -------------------------------------------------------------------------- *)typet=Wpo.tletget_id=Wpo.get_gidletget_model=Wpo.get_modelletget_scope=Wpo.get_scopeletget_context=Wpo.get_contextletget_description=Wpo.get_labelletget_property=Wpo.get_propertyletget_sequentw=snd(Wpo.computew)letget_result=Wpo.get_resultletget_results=Wpo.get_resultsletis_trivial=Wpo.is_trivialletis_valid=Wpo.is_validletis_passed=Wpo.is_passedlethas_unknown=Wpo.has_unknownletget_formulapo=WpContext.on_context(get_contextpo)(Wpo.GOAL.compute_proof~pid:po.po_pid)po.po_formula.goalletclear=Wpo.clearletproof=Wpo.goals_of_propertyletiter_ipon_goalip=Wpo.iter~ip~on_goal()letiter_kfon_goal?bhvkf=matchbhvwith|None->(* iter on all behaviors, see Wpo.iter *)Wpo.iter~index:(Wpo.Function(kf,None))~on_goal()|Somebs->List.iter(funb->Wpo.iter~index:(Wpo.Function(kf,Someb))~on_goal())bsletremove=iter_ipWpo.removelet()=Property_status.register_property_remove_hookremove(* -------------------------------------------------------------------------- *)(* --- Generator Interface --- *)(* -------------------------------------------------------------------------- *)letgeneratormodel=letsetup=matchmodelwith|None->None|Somes->Some(Factory.parse[s])inGenerator.create~dump:false?setup()letgenerate_ip?modelip=(generatormodel)#compute_ipipletgenerate_kf?model?bhv?propkf=letkfs=Kernel_function.Set.singletonkfin(generatormodel)#compute_main~fct:(Fct_listkfs)?bhv?prop()letgenerate_call?modelstmt=(generatormodel)#compute_callstmt(* -------------------------------------------------------------------------- *)(* --- Prover Interface --- *)(* -------------------------------------------------------------------------- *)letprove=Prover.proveletspawn=Prover.spawn~delayed:trueletserver=ProverTask.serverletcommand?provers?tipvcs=Register.do_wp_proofs?provers?tipvcs(* -------------------------------------------------------------------------- *)