isac-java/src/java/isac/bridge/ToKernel.scala
changeset 5235 3ca9690d3e8b
equal deleted inserted replaced
5234:22aabc469ebb 5235:3ca9690d3e8b
       
     1 //cp from Hello_PIDE.scala, two unresolved problems
       
     2 
       
     3 import info.hupel.isabelle.Platform
       
     4 import info.hupel.isabelle.api._
       
     5 import info.hupel.isabelle.japi._
       
     6 import info.hupel.isabelle.setup._
       
     7 import java.nio.file.Path;
       
     8 
       
     9 class ToKernel {
       
    10 
       
    11   //these two will go into a property file:
       
    12   val path_str = "/home/wneuper/.isabelle/isabisac/heaps/polyml-5.7.1_x86-linux/libisabelle_Isac"
       
    13   val version_str = "2018"
       
    14   
       
    15   val path = java.nio.file.Paths.get(path_str)	
       
    16   val platform = Platform.guess.getOrElse(sys.error(Setup.UnknownPlatform.explain))
       
    17   val version = Version.Stable(version_str)
       
    18     
       
    19   val setup = Setup(path, platform, version)
       
    20   val res = Resources.dumpIsabelleResources().right.get
       
    21   val config = Configuration.simple("Protocol")
       
    22   val env = setup.makeEnvironment(res, Nil)           //problem with scheduler
       
    23   
       
    24   def connect : JSystem = System.create(env, config)  //problem with types
       
    25 }