# HG changeset patch # User Walther Neuper # Date 1545220311 -3600 # Node ID bdd3733fa7dbe37d5d074326eebff5fca5948b7a # Parent 3ca9690d3e8b3b290583701babd4f271a9dfa95e ------ connection to new math-engine on Isabelle2018: question 4 to Lars diff -r 3ca9690d3e8b -r bdd3733fa7db isac-java/src/java/isac/bridge/BridgeMain.java --- a/isac-java/src/java/isac/bridge/BridgeMain.java Tue Dec 18 08:05:43 2018 +0100 +++ b/isac-java/src/java/isac/bridge/BridgeMain.java Wed Dec 19 12:51:51 2018 +0100 @@ -117,7 +117,16 @@ */ /*PIDE*/log(1, "-->ISA: try connection with ISABELLE_HOME=\"" + isabelle_home + "\"..."); - JSystem sys = ToKernel.connect(); //does NOT yet work + //these two values shall come from BridgeMail.properties + Path path = java.nio.file.Paths.get // + ("/home/wneuper/.isabelle/isabisac/heaps/polyml-5.7.1_x86-linux/libisabelle_Isac"); + String vers = "2018"; + + JResources res = JResources.dumpIsabelleResources(); + Setup setup = new Setup(path, JPlatform.guess(), new Version.Stable("2018")); + Environment env = JSetup.makeEnvironment(setup, res); + //Configuration config = Configuration.fromBuiltin("libisabelle_Isac"); //fromBuiltin is undefined + JSystem sys = JSystem.create(env, config); /*PIDE*/connection_to_kernel_ = sys; /*PIDE*/log(1, "<--ISA: connection established"); diff -r 3ca9690d3e8b -r bdd3733fa7db isac-java/src/java/isac/bridge/ToKernel.scala --- a/isac-java/src/java/isac/bridge/ToKernel.scala Tue Dec 18 08:05:43 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -//cp from Hello_PIDE.scala, two unresolved problems - -import info.hupel.isabelle.Platform -import info.hupel.isabelle.api._ -import info.hupel.isabelle.japi._ -import info.hupel.isabelle.setup._ -import java.nio.file.Path; - -class ToKernel { - - //these two will go into a property file: - val path_str = "/home/wneuper/.isabelle/isabisac/heaps/polyml-5.7.1_x86-linux/libisabelle_Isac" - val version_str = "2018" - - val path = java.nio.file.Paths.get(path_str) - val platform = Platform.guess.getOrElse(sys.error(Setup.UnknownPlatform.explain)) - val version = Version.Stable(version_str) - - val setup = Setup(path, platform, version) - val res = Resources.dumpIsabelleResources().right.get - val config = Configuration.simple("Protocol") - val env = setup.makeEnvironment(res, Nil) //problem with scheduler - - def connect : JSystem = System.create(env, config) //problem with types -} \ No newline at end of file