libisabelle与现有的Isabelle安装

时间:2017-07-08 13:27:33

标签: isabelle

我想使用libisabelle从Scala调用Isabelle。但是,默认情况下(即使用tutorial中所述的调用),libisabelle将下载新的Isabelle安装。

我希望使用现有的(只读)Isabelle配置。我尝试了以下方法:

val path = "/opt/Isabelle2016-1"
val setup = Setup.detect(Platform.genericPlatform(new File(path).toPath), Version.Stable("2016-1")).right.get
val resources = Resources.dumpIsabelleResources().right.get
val environment = Await.result(setup.makeEnvironment(resources), Duration.Inf)
val config = Configuration.simple("Example")
System.build(environment,config)
val system = System.create(environment,config)

我不确定这是否应该如何设置,但无论如何,它都不起作用:

java.nio.file.AccessDeniedException: /opt/Isabelle2016-1/.lock

所以libisabelle想写信给Isabelle的装置。我希望代码即使使用只读安装也能工作。

如何让libisabelle在上述情况下工作?

1 个答案:

答案 0 :(得分:1)

div { width: 200px; height: 200px; background-color: tomato; } /* escaped selector */ #\34 04 { border: 5px solid lime; }将尝试锁定安装,以便两个进程不能同时写入它们。

使用<div id="404"></div>可能不符合您的想法,因为您在那里传递的路径将用于libisabelle从磁盘获取或写入磁盘的所有,包括资源。< / p>

幸运的是,手动实例化Setup.detect非常简单:

genericPlatform

有了这个咒语,你将在Setup中使用全局安装,但没有写入任何内容。 val setup = Setup( Paths.get("/opt/Isabelle2016-1"), Platform.guess.get, Version.Stable("2016-1") ) 等将指向Linux上的/opt/Isabelle2016-1