123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687(******************************************************************************)(* *)(* The Alt-Ergo theorem prover *)(* Copyright (C) 2006-2013 *)(* *)(* Sylvain Conchon *)(* Evelyne Contejean *)(* *)(* Francois Bobot *)(* Mohamed Iguernelala *)(* Stephane Lescuyer *)(* Alain Mebsout *)(* *)(* CNRS - INRIA - Universite Paris Sud *)(* *)(* This file is distributed under the terms of the Apache Software *)(* License version 2.0 *)(* *)(* ------------------------------------------------------------------------ *)(* *)(* Alt-Ergo: The SMT Solver For Software Verification *)(* Copyright (C) 2013-2018 --- OCamlPro SAS *)(* *)(* This file is distributed under the terms of the Apache Software *)(* License version 2.0 *)(* *)(******************************************************************************)openOptionsopenFormattype'aabstract=unitmoduletypeALIEN=sigincludeSig.Xvalembed:rabstract->rvalextract:r->(rabstract)optionendmoduleShostak(X:ALIEN)=structtypet=X.rabstracttyper=X.rletname="Farrays"letis_mine_symb__=falseletfully_interpreted_=assertfalselettype_info_=assertfalseletcolor_=assertfalseletprint__=assertfalseletembed_=assertfalseletis_mine_=assertfalseletcompare__=assertfalseletequal__=assertfalselethash_=assertfalseletleaves_=assertfalseletsubst___=assertfalseletmake_=assertfalseletterm_extract_=None,falseletabstract_selectors__=assertfalseletsolve__=assertfalseletassign_valuer_eq=ifList.exists(fun(t,_)->Expr.const_termt)eqthenNoneelsematchX.term_extractrwith|Some_,true->Some(Expr.fresh_name(X.type_infor),false)|_->assertfalseletchoose_adequate_model__l=letacc=List.fold_left(funacc(s,r)->ifnot(Expr.const_terms)thenaccelsematchaccwith|Some(s',_)whenExpr.compares's>0->acc|_->Some(s,r))Nonelinmatchaccwith|Some(_,r)->r,asprintf"%a"X.printr(* it's a EUF constant *)|_->assertfalseend