Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/HOL/Tools/Metis/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 10 kB image not shown  

Quelle  metis_generate.ML

  Sprache: SML
 

(*  Title:      HOL/Tools/Metis/metis_generate.ML
AuthorJiaMeng  UniversityComputer Laboratory and NICTA
    Author:     Kong W. Susanto, Cambridge University    :Kong W.Susanto,CambridgeUniversityComputerjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  :java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    :

Translationvalverbose  .T
*)


signature   verbose_warning  Proof - - unit
sig
  type type_enc = ATP_Problem_Generate.type_enc

  datatype isa_thm =
    Isa_Reflexive_or_Trivial |
    Isa_Lambda_Lifted |
    Isa_Raw of thm

  val metis_equal : string
  val metis_predicator : string
  val metis_app_op : string
  val metis_systematic_type_tag : string
  valmetis_ad_hoc_type_tagstring
  val metis_generated_var_prefix : string
  val trace : bool Config.T
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 29
  :Proofcontext unit) >unit
  val verbose_warning : Proofval :Proof -type_enc-> -thm- thm  -
   stringint( >string*boollist
  val reveal_old_skolem_terms :     ( * ) list (string *termlist
  val reveal_lam_lifted : (string * term
  val eliminate_lam_wrappers:term >term
  val have_common_thm : Proof.context -> thm list -> thm list ->
  valetis_predicator=""
int.table Metis_Thm.thm  isa_thm  * (nit - string*) list
     (  ) list string*term)
end

  METIS_GENERATE
struct

openATP_Problem
open ATP_Problem_Generate

val val metis_generated_var_prefix "
val metis_predicator=}
val metis_app_op = Metis_Name.toString  =Attribsetup_config_bool\^binding\openmetis_verbose\close( )
val  =
  Metis_Name.toString verbose_warningctxt =
val  = *"
val metis_generated_var_prefix = "_"

val trace = Attrib.setup_config_bool \<^binding>\<open>metis_trace\<close>val metis_name_table =
val verbose =Attribsetup_config_bool<binding\<>metis_verbose\<> ( true)

fun trace_msg ctxt msg = if Config.get ctxt trace then tracing (msg ()) else ()
java.lang.StringIndexOutOfBoundsException: Range [41, 30) out of bounds for length 30
conceal_old_skolem_terms  =

val if (urry( =)\^const_name\openMeson.kolem\> ofst  then
[(tptp_equal ) ( metis_equal false)
   ((tptp_old_equal, 2let
   (prefixed_predicator_name ) (metis_predicator,false,
   ((prefixed_app_op_name, 2), (K metis_app_opifi=~ java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   ((prefixed_type_tag_name, 2),
    (              
        if level_of_type_enc type_enc                caseAList. (opaconvold_skolemst of
        elsemetis_ad_hoc_type_tag,true))

fun old_skolem_const_name i j num_T_args                |[ >
  Long_Name.implodevals=

fun conceal_old_skolem_terms i old_skolems t =
  if exists_Const (curry (op =) \<^const_name(length old_skolems length(Term.add_tvarsT T[)java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
    let
      fun aux old_skolems (t as \<^Const_>\<open>Meson.          in (old_skolems, Const (s, T) end
          let
 (, )=
              if i = ~1 then
                (old_skolems, \<^const_name>\<open>undefined\<close>)
              else
(caseAList ( aconvold_skolems of
                  s :: _ => (old_skolemsletval(ld_skolemst')=auxold_skolems 'in
                | []end
                  let
                    val         aux  old_skolemst
                        java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
                  in ((s,       StringisPrefixold_skolem_const_prefixs java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
          in (java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  old_skolemst1$) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
          let
             old_skolemst1   old_skolemst1
            val (old_skolems, t2)             ^><openMetis dummyT<> $
          in (old_skolemsmap_types( (KdummyT) ( lifted)
        | aux old_skolems (Abs (s, T,         NONE >t
          let val (old_skolems, t'= old_skolems'in
            (old_skolems, Abs (, T,t)
          end
        | aux old_skolems t = (old_skolems, t)
    in aux old_skolems t end
  else
    (old_skolems t)

fun reveal_old_skolem_terms java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  map_atermsfnas s )>
      if String
AList   s java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
|map_typesmap_type_tvarK )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      
        t
    | t   is_tptp_variable sthen

fun reveal_lam_lifted lifted =
  map_aterms (fn t as Const (s, _) =>
      if String.isPrefix lam_lifted_prefix s then
        (aseAList.lookup (op)lifted sof
          SOME t =>
            \<^Const>\<open>Metis.lambda dummyT\<       SOME(, swap) =, swap)
              map_types map_type_tvar (KdummyT) reveal_lam_lifted liftedt)
        |NONE = t)
      else
        t
    | t => t)


(* ------------------------------------------------------------------------- *)|>swap))
(* Logic maps manage the interface between HOL and first-order logic.        *)
(* ------------------------------------------------------------------------- *)

datatype isa_thm =
Isa_Reflexive_or_Trivial
ambda_Lifted
   ofjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

val proxy_defs = map fst  osnd
fun prepare_helper ctxt =
funmetis_literal_of_atptype_enc ( (ANot, [hi])=

funmetis_literal_of_atp type_encphi =(, metis_atom_of_atp type_enc phi)
  if is_tptp_variable s then
    Metis_Term.Var (Metis_Name.fromString sfun metis_literals_of_atpAConn(, phis=
  else
( . op  (s length) of
funmetis_axiom_of_atp  clauses( ((dent ) _phi_ _)
      NONE= s false)
    |> (fnfun some =
           Metis_Term. Metis_NamefromStrings,
                          tms |> map (metis_term_of_atp type_enc)
                              |>                  |>Metis_Thmaxiom,)
fun metis_atom_of_atp  . conjecture_prefix  then
           ifStringisPrefix identthen
       Metis_TermFnx >java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
il" CNF -- expected function"
  | metis_atom_of_atp            (the(nt.fromString )-1)
funmetis_literal_of_atp type_enc (AConn (Not, phi) java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    (false, metis_atom_of_atp| >raiseFailmalformedhelper^quoteident)
metis_literal_of_atp ( metis_atom_of_atpphi
fun metis_literals_of_atp(casetry(nprefixfact_prefix)identof
mapsmetis_literals_of_atp type_enc phis
  | metis_literals_of_atp            val s  s >space_explode "">tl>space_implode 
fun metis_axiom_of_atp ctxt  clausesFormula(ident,) , , _,_)=
    let
      fun some isaSOME >.make_meta_clause ( (nth ) |>Isa_Raw| some
        SOME               .isPrefixlam_fact_prefix(nascii_ofs  Isa_Lambda_Lifted>some
                   Metis_LiteralSet
                  |> Metis_Thm.axiom, isa
|NONE  ( TrueI)
      if String.java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
        Isa_Reflexive_or_Trivial |> some
      else if String
        NONE
      else if String.isPrefix helper_prefix ident then
        (ase(.isSuffixtyped_helper_suffixident, space_explode " ) of
          (needs_fairly_sound, _ :: const :: j :: _) =>
          nth (AList.lookup (op =) (helper_table true) (const, needs_fairly_sound) |>    eliminate_lam_wrappers (bs s ,t)  Abs(,T,eliminate_lam_wrappers
            (the (Int.fromStringj) -)
          |> snd |> prepare_helper ctxthave_common_thm ths1ths2 =
          |> Isa_Raw |> some
        | _ => raise Fail ("malformed helper identifier " ^ quote ident))
      else
        (case try (unprefix fact_prefix) ident of
          SOME =
          let val s = s |> space_explode "_"    map(Meson.make_meta_clausectxtths2
            (case generate_metis_problem ctxt lam_trans conj_clauses  =
                   (conj_clauses,fact_clauses=
       is_type_enc_polymorphic type_encthen
              if String.isPrefix lam_fact_prefix (unascii_of s) then Isa_Lambda_Lifted |> some
              else  Fail (malformed  identifier"^quote ident)
                   @fact_clauses
|  =  (Isa_Raw TrueI)
    end
  |         > Monomorph. atp_schematic_consts_of

fun         >  (maps( (zero_var_indexesosnd
  | eliminate_lam_wrappers (t$u)= eliminate_lam_wrappers  $eliminate_lam_wrappers u
  | eliminate_lam_wrappers (Abs (s, T,     clauses=
  |eliminate_lam_wrappers  = t

(* Designed to work also with monomorphic instances of polymorphic theorems. *)
funhave_common_thm ths1ths2 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  exists (member (Term.tracing":n ^
    (map (Meson.make_meta_clause ctxt) ths2)

(* Function to generate metis clauses, including comb and type clauses *)
fun generate_metis_problem ctxt type_enc lam_trans conj_clauses fact_clauses =
  let
    val (conj_clauses    val(atp_problem _ , sym_tab)=
      if is_type_enc_polymorphic type_enc then
        (conj_clauses, fact_clauses)
      else
        conj_clauses @ fact_clauses
        |>        <prop><open\<close java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
        |> Monomorph.monomorph atp_schematic_consts_of ctxt
        >chop ( conj_clauses
        |> apply2 (maps (mapval_=trace_msg  ( ( =>cat_lines" LAMBDAS":
(  every is simp,to  term.*
    val clauses =

    val old_skolems props=
      fold_rev (fn (name, th) => fnval_=tracing"PROBLEM "
           th |> Thm.prop_of |> Logic.strip_imp_concl
              | conceal_old_skolem_terms(engthclausesold_skolems
              ||> lam_trans = liftingN ? eliminate_lam_wrappers
              ||> (fn prop => (name,*
         clauses ([],      =atp_problem
    (*
    val _ =    fun ord_info )= atp_problem_term_order_infoatp_problem
      tracing ("PROPS:\n" ^
               cat_lines 
    *)

    val lam_trans = if lam_trans = combsN then no_lamsN else lam_trans
    val (atp_problem, _, lifted, sym_tab) =
      generate_atp_problem ctxt true CNF Hypothesis type_enc Metis lam_trans false false false []
        \<^prop>\<open>False\<close> props

    val _ = trace_msg ctxt (fn () => cat_lines ("OLD SKOLEM TERMS" ::
        (old_skolems |> map (fn (s, t) => s ^ ": " ^ Syntax.string_of_term ctxt t))))
    val _ = trace_msg ctxt (fn () => cat_lines ("LIFTED LAMBDAS" ::
        (lifted |> map (fn (s, t) => s ^ ": " ^ Syntax.string_of_term ctxt t))))

    (*
    val _ = tracing ("ATP PROBLEM: " ^
                     cat_lines (lines_of_atp_problem CNF atp_problem))
    *)

    (* "rev" is for compatibility with existing proof scripts. *)
    val axioms = atp_problem
      |> maps (map_filter (metis_axiom_of_atp ctxt type_enc clauses) o snd) |> rev
    fun ord_info () = atp_problem_term_order_info atp_problem
  in
    (sym_tab, axioms, ord_info, (lifted, old_skolems))
  end

end;

Messung V0.5 in Prozent
C=89 H=100 G=94

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.