Skip to content
Snippets Groups Projects
Commit 703814a9 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Improve classpath situation, leon lib still missing though

parent 4b7539f1
No related branches found
No related tags found
No related merge requests found
...@@ -7,15 +7,20 @@ object Settings { ...@@ -7,15 +7,20 @@ object Settings {
var showIDs: Boolean = false var showIDs: Boolean = false
var silentlyTolerateNonPureBodies: Boolean = false var silentlyTolerateNonPureBodies: Boolean = false
def defaultClassPath() = {
val env = System.getenv("SCALA_HOME")
if (env != "") {
List(env+"/lib")
} else {
Nil
}
}
} }
case class Settings( case class Settings(
val synthesis: Boolean = false, val synthesis: Boolean = false,
val xlang: Boolean = false, val xlang: Boolean = false,
val verify: Boolean = true, val verify: Boolean = true,
val classPath: String = val classPath: List[String] = Settings.defaultClassPath()
List(
"/home/ekneuss/scala/scala-2.9.2/lib/",
"/home/ekneuss/git/leon-2.0/library/target/scala-2.9.2/"
).mkString(":")
) )
...@@ -13,15 +13,7 @@ object ExtractionPhase extends LeonPhase[List[String], Program] { ...@@ -13,15 +13,7 @@ object ExtractionPhase extends LeonPhase[List[String], Program] {
val settings = new NSCSettings val settings = new NSCSettings
val scalaHome = System.getenv("SCALA_HOME") settings.extdirs.value = ctx.settings.classPath.mkString(":")
val fullClassPath = if (scalaHome != "") {
scalaHome+"/lib:"+ctx.settings.classPath
} else {
ctx.settings.classPath
}
settings.extdirs.value = fullClassPath
val compilerOpts = args.filterNot(_.startsWith("--")) val compilerOpts = args.filterNot(_.startsWith("--"))
......
...@@ -90,7 +90,7 @@ class ConsoleSession extends Actor { ...@@ -90,7 +90,7 @@ class ConsoleSession extends Actor {
log("Welcome to LeonOnline!") log("Welcome to LeonOnline!")
log("Processing request...") log("Processing request...")
val classPath = Play.current.configuration.getString("app.classpath").getOrElse("") val classPath = Play.current.configuration.getString("app.classpath").map(_.split(":").toList).getOrElse(Settings.defaultClassPath())
mode match { mode match {
case "verification" => case "verification" =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment