123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129(******************************************************************************)(* *)(* Alt-Ergo: The SMT Solver For Software Verification *)(* Copyright (C) 2013-2018 --- OCamlPro SAS *)(* *)(* This file is distributed under the terms of the license indicated *)(* in the file 'License.OCamlPro'. If 'License.OCamlPro' is not *)(* present, please contact us to clarify licensing. *)(* *)(******************************************************************************)exceptionTimeoutexceptionUnsolvableexceptionCmpofintmoduleMI=Map.Make(structtypet=intletcompareab=a-bend)moduleSS=Set.Make(String)(** Different values for -case-split-policy option:
-after-theory-assume (default value): after assuming facts in
theory by the SAT
-before-matching: just before performing a matching round
-after-matching: just after performing a matching round **)typecase_split_policy=|AfterTheoryAssume(* default *)|BeforeMatching|AfterMatchingtypeinst_kind=Normal|Forward|Backwardtypesat_solver=|Tableaux|Tableaux_CDCL|CDCL|CDCL_Tableauxtypetheories_extensions=|Sum|Adt|Arrays|Records|Bitv|LIA|LRA|NRA|NIA|FPAtypeaxiom_kind=Default|Propagatorletth_ext_of_stringext=matchextwith|"Sum"->SomeSum|"Adt"->SomeAdt|"Arrays"->SomeArrays|"Records"->SomeRecords|"Bitv"->SomeBitv|"LIA"->SomeLIA|"LRA"->SomeLRA|"NRA"->SomeNRA|"NIA"->SomeNIA|"FPA"->SomeFPA|_->Noneletstring_of_th_extext=matchextwith|Sum->"Sum"|Adt->"Adt"|Arrays->"Arrays"|Records->"Records"|Bitv->"Bitv"|LIA->"LIA"|LRA->"LRA"|NRA->"NRA"|NIA->"NIA"|FPA->"FPA"let[@inlinealways]compare_algebraics1s2f_same_constrs_with_args=letr1=Obj.reprs1inletr2=Obj.reprs2inmatchObj.is_intr1,Obj.is_intr2with|true,true->Stdlib.compares1s2(* both constructors without args *)|true,false->-1|false,true->1|false,false->letcmp_tags=Obj.tagr1-Obj.tagr2inifcmp_tags<>0thencmp_tagselsef_same_constrs_with_args(s1,s2)let[@inlinealways]cmp_listsl1l2cmp_elts=tryList.iter2(funab->letc=cmp_eltsabinifc<>0thenraise(Cmpc))l1l2;0with|Cmpn->n|Invalid_argument_->List.lengthl1-List.lengthl2typematching_env={nb_triggers:int;triggers_var:bool;no_ematching:bool;greedy:bool;use_cs:bool;backward:inst_kind}letprint_list~sep~ppfmtl=matchlwith[]->()|e::l->Format.fprintffmt"%a"ppe;List.iter(fune->Format.fprintffmt"%s %a"sepppe)lletrecprint_list_pp~sep~ppfmt=function|[]->()|[x]->ppfmtx|x::l->Format.fprintffmt"%a %a"ppxsep();print_list_pp~sep~ppfmtl