12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)openPpopenNamesopenDeclarationsopenEnvironletmemory_stat=reffalseletprint_memory_stat()=if!memory_statthenbeginFormat.printf"total heap size = %d kbytes\n"(CObj.heap_size_kb());Format.print_newline();Format.print_flush()endletoutput_context=reffalseletpr_impredicative_setenv=ifis_impredicative_setenvthenstr"Theory: Set is impredicative"elsestr"Theory: Set is predicative"letpr_rewrite_rulesenv=ifrewrite_rules_allowedenvthenstr"Theory: Rewrite rules are allowed (consistency, subject reduction, confluence and normalization might be broken)"elsestr"Theory: Rewrite rules are not allowed"letpr_assumptionsassaxs=ifaxs=[]thenstrass++str": <none>"elsehv2(strass++str":"++fnl()++prlist_with_sepfnlstraxs)letpr_axiomsenvopac=letaddccbacc=ifDeclareops.constant_has_bodycbthenaccelsematchCmap.find_optcopacwith|None->Cset.addcacc|Somes->Cset.unionsaccinletcsts=fold_constantsaddenvCset.emptyinletcsts=Cset.fold(funcacc->Constant.to_stringc::acc)csts[]inpr_assumptions"Axioms"cstsletpr_type_in_typeenv=letcsts=fold_constants(funccbacc->ifnotcb.const_typing_flags.check_universesthenConstant.to_stringc::accelseacc)env[]inletcsts=fold_inductives(funccbacc->ifnotcb.mind_typing_flags.check_universesthenMutInd.to_stringc::accelseacc)envcstsinpr_assumptions"Constants/Inductives relying on type-in-type"cstsletpr_unguardedenv=letcsts=fold_constants(funccbacc->ifnotcb.const_typing_flags.check_guardedthenConstant.to_stringc::accelseacc)env[]inletcsts=fold_inductives(funccbacc->ifnotcb.mind_typing_flags.check_guardedthenMutInd.to_stringc::accelseacc)envcstsinpr_assumptions"Constants/Inductives relying on unsafe (co)fixpoints"cstsletpr_nonpositiveenv=letinds=fold_inductives(funccbacc->ifnotcb.mind_typing_flags.check_positivethenMutInd.to_stringc::accelseacc)env[]inpr_assumptions"Inductives whose positivity is assumed"indsletprint_contextenvopac=if!output_contextthenbeginFeedback.msg_notice(hov0(fnl()++str"CONTEXT SUMMARY"++fnl()++str"==============="++fnl()++fnl()++str"* "++hov0(pr_impredicative_setenv++fnl())++fnl()++str"* "++hov0(pr_rewrite_rulesenv++fnl())++fnl()++str"* "++hov0(pr_axiomsenvopac++fnl())++fnl()++str"* "++hov0(pr_type_in_typeenv++fnl())++fnl()++str"* "++hov0(pr_unguardedenv++fnl())++fnl()++str"* "++hov0(pr_nonpositiveenv++fnl())))endletstatsenvopac=print_contextenvopac;print_memory_stat()