# HG changeset patch # User Walther Neuper # Date 1545116743 -3600 # Node ID 3ca9690d3e8b3b290583701babd4f271a9dfa95e # Parent 22aabc469ebbd6c6043e3dda9ae15f95d3a7090e ------ connection to new math-engine on Isabelle2018: question 3 to Lars diff -r 22aabc469ebb -r 3ca9690d3e8b isac-java/src/java/isac/bridge/BridgeMain.java --- a/isac-java/src/java/isac/bridge/BridgeMain.java Mon Dec 17 13:02:16 2018 +0100 +++ b/isac-java/src/java/isac/bridge/BridgeMain.java Tue Dec 18 08:05:43 2018 +0100 @@ -117,12 +117,7 @@ */ /*PIDE*/log(1, "-->ISA: try connection with ISABELLE_HOME=\"" + isabelle_home + "\"..."); - JResources res = JResources.dumpIsabelleResources(); - Path path = java.nio.file.Paths.get - ("/home/wneuper/.isabelle/isabisac/heaps/polyml-5.7.1_x86-linux/libisabelle_Isac"); - Configuration config = Configuration.simple("Protocol"); - Environment env = JSetup.makeEnvironment(JSetup.defaultSetup(new Version.Stable("2018")), res); - JSystem sys = JSystem.create(env, config); + JSystem sys = ToKernel.connect(); //does NOT yet work /*PIDE*/connection_to_kernel_ = sys; /*PIDE*/log(1, "<--ISA: connection established"); diff -r 22aabc469ebb -r 3ca9690d3e8b isac-java/src/java/isac/bridge/ToKernel.scala --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/isac-java/src/java/isac/bridge/ToKernel.scala Tue Dec 18 08:05:43 2018 +0100 @@ -0,0 +1,25 @@ +//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