I am using https://github.com/dominique-unruh/scala-isabelle/ to digest Isabelle/HOL formalization of quicksort algorithm https://isabelle.in.tum.de/library/HOL/HOL-Imperative_HOL/Imperative_Quicksort.html. I managed to import Quicksort theory into Context via
val ctxt = Context("HOL.Imperative_HOL.ex.Imperative_Quicksort")
And now I expecting that ctxt containts the AST of Impeartive_Quicksort.thy, so I would like it to convert into JSON object tree. I am using Lift framwork for that. My buil.sbt contains
libraryDependencies ++= {
val liftVersion = "3.4.3"
Seq(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile",
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
}
And the code is
val ctxt = Context("HOL.Imperative_HOL.ex.Imperative_Quicksort")
import net.liftweb.json._
import net.liftweb.json.Serialization.write
implicit val formats = net.liftweb.json.DefaultFormats
val jsonString = write(ctxt)
println("before jsonString")
println(jsonString)
println("after jsonString")
which is giving an output in meagre quantity:
before jsonString
{"mlValue":{"id":{"_fun":{},"_ec":{},"_arg":null,"_xform":2}}}
after jsonString
I guess - this is JSON serialization issue. Ctxt definitely contains the Impeartive_Quicksort theory, but there is some problem with transaltion ot JSON.
How can I output the entire theory as JOSN object tree for the AST of Imperative_Quicksort.thy?