src/HOL/Tools/ATP/system_on_tptp.scala
changeset 73440 3696bb4085ed
parent 73434 00b77365552e
child 73441 f2167948157e
equal deleted inserted replaced
73439:cb127ce2c092 73440:3696bb4085ed
    39     post_request(url, List("SubmitButton" -> "ListSystems", "ListStatus" -> "READY"))
    39     post_request(url, List("SubmitButton" -> "ListSystems", "ListStatus" -> "READY"))
    40 
    40 
    41   object List_Systems extends Scala.Fun("SystemOnTPTP.list_systems", thread = true)
    41   object List_Systems extends Scala.Fun("SystemOnTPTP.list_systems", thread = true)
    42   {
    42   {
    43     val here = Scala_Project.here
    43     val here = Scala_Project.here
    44     def apply(url: String): String = list_systems(Url(url)).string
    44     def apply(url: String): String = list_systems(Url(url)).text
    45   }
    45   }
    46 
    46 
    47 
    47 
    48   /* run system */
    48   /* run system */
    49 
    49 
    74     {
    74     {
    75       val List(url, system, problem_path, extra, Value.Int(timeout)) = Library.split_strings0(arg)
    75       val List(url, system, problem_path, extra, Value.Int(timeout)) = Library.split_strings0(arg)
    76       val problem = File.read(Path.explode(problem_path))
    76       val problem = File.read(Path.explode(problem_path))
    77       val res = run_system(Url(url), system, problem, extra = extra, timeout = Time.ms(timeout))
    77       val res = run_system(Url(url), system, problem, extra = extra, timeout = Time.ms(timeout))
    78 
    78 
       
    79       val text = res.text
       
    80       val timing = res.elapsed_time.ms
       
    81 
    79       val bad_prover = "WARNING: " + system + " does not exist"
    82       val bad_prover = "WARNING: " + system + " does not exist"
    80       if (res.trim_split_lines.exists(_.startsWith(bad_prover))) {
    83       if (split_lines(text).exists(_.startsWith(bad_prover))) {
    81         error("The ATP " + quote(system) + " is not available at SystemOnTPTP")
    84         error("The ATP " + quote(system) + " is not available at SystemOnTPTP")
    82       }
    85       }
    83       else Library.cat_strings0(List(res.string, res.elapsed_time.ms.toString))
    86       else Library.cat_strings0(List(text, timing.toString))
    84     }
    87     }
    85   }
    88   }
    86 }
    89 }