Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

SSL TPTP_Parser_Example.thy

  Interaktion und
PortierbarkeitIsabelle
 

(*  Title:      HOL/TPTP/TPTP_Parser_Example.thy
    Author:     Nik Sultana, Cambridge University Computer Laboratory

Example of importing a TPTP problem and trying to prove it in Isabelle/HOL.
*)


theoryTPTP_Parser_Example
imports TPTP_Interpret
beginAuthor     Nik Sultana CambridgeUniversityComputerLaboratory

import_tptp "$TPTP/Problems/LCL/LCL414+1.p"

ML 
  an_fmlas =
 TPTP_Interpret.get_manifests @{theory}
  |> hd (*FIXME use named lookup*)

  |> #2 (*get problem contents*)
  |> #3 (*get formulas*)


(*Display nicely.*)
ML 
List.app (fn (n, role, fmla, _) =>
  writeln
    (Pretty.block [Pretty.str ("\"" ^ n ^ "\"" ^ "(" ^
      TPTP_Syntax.role_to_string role  ^ "): "), Syntax.pretty_term @{context} fmla])
  ) (rev an_fmlas)
\<close>

ML \<open>
(*Extract the (name, term) pairs of formulas having roles belonging to a
 user-supplied set*)

fun extract_terms roles : TPTP_Interpret.tptp_formula_meaning list ->
 (string * term) list =
   let
     fun role_predicate (_, role, _, _) =
       fold (fn r1 => fn b => role = r1 orelse b) roles false
   in filter role_predicate #> map (fn (n, _, t, _) => (n, t)) end


ML 
(*Use a given tactic on a goal*)

fun prove_conjectures tactic ctxt an_fmlas =
  let
    val assumptions =
      extract_terms
       [TPTP_Syntax.Role_Definition, TPTP_Syntax.Role_Axiom]
       an_fmlas
      |> map snd
    val goals = extract_terms [TPTP_Syntax.Role_Conjecture] an_fmlas
    fun driver (n, goal) =
      (n, Goal.prove ctxt [] assumptions goal (fn _ => tactic ctxt))
  in map driver goals end

val auto_prove = prove_conjectures auto_tac
val sh_prove = prove_conjectures (fn ctxt =>
  Sledgehammer_Tactics.sledgehammer_with_metis_tac ctxt []
  (*FIXME use relevance_override*)
  {add = [], del = [], only = false} 1)


ML 
@{assert} (is_some (try (auto_prove @{context}) an_fmlas) = false)
\<close>

sledgehammer_params [provers = z3, debug]
ML \<open>
@{assert} (is_some (try (sh_prove @{context}) an_fmlas) = true)
\<close>

end

Messung V0.5 in Prozent
C=88 H=95 G=91

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.7Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002