Skip to content

Commit

Permalink
fixed assemblies
Browse files Browse the repository at this point in the history
  • Loading branch information
pruemmer committed Jan 8, 2018
1 parent a92645c commit e74d434
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 32 deletions.
40 changes: 16 additions & 24 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val commonSettings = Seq(
organization := "uuverifiers",
version := "2017-07-21-SNAPSHOT",
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8", "2.12.1"),
crossScalaVersions := Seq("2.11.8", "2.12.4"),
publishTo := Some(Resolver.file("file", new File( "/home/wv/public_html/maven/" )) )
)

Expand All @@ -17,9 +17,9 @@ lazy val parserSettings = Seq(
crossPaths := true
)

// Horn parser settings
// Parser generation

lazy val hornParserSettings = Seq(
lazy val parserGen = Seq(
sourceGenerators in Compile += Def.task {
val outputDir = (sourceManaged in Compile).value / "parser"
val base = baseDirectory.value
Expand Down Expand Up @@ -49,8 +49,8 @@ lazy val hornParserSettings = Seq(
val cup = parserDir / "Parser.cup"
val hornCup = hornParserDir / "HornParser.cup"

val jflexLib = "./lib/JFlex.jar"
val cupLib = "./lib/java-cup-11a.jar"
val jflexLib = "./tools/JFlex.jar"
val cupLib = "./tools/java-cup-11a.jar"

val cache = FileFunction.cached(cacheDir,
inStyle = FilesInfo.lastModified,
Expand All @@ -59,14 +59,14 @@ lazy val hornParserSettings = Seq(
"java -jar " + jflexLib + " -d " +
hornParserOutputDir + " --nobak " + hornFlex).!
scala.sys.process.Process(
"java -cp ./lib/ -jar " + cupLib + " -destdir " +
"java -cp ./tools/ -jar " + cupLib + " -destdir " +
hornParserOutputDir + " -parser Parser -symbols Symbols " +
hornCup).!
scala.sys.process.Process(
"java -jar " + jflexLib + " -d " + parserOutputDir +
" --nobak " + flex).!
scala.sys.process.Process(
"java -cp ./lib/ -jar " + cupLib + " -destdir " +
"java -cp ./tools/ -jar " + cupLib + " -destdir " +
parserOutputDir + " -parser Parser -symbols Symbols " + cup).!
Set(lexerFile,
parserFile,
Expand Down Expand Up @@ -103,43 +103,36 @@ lazy val tplspecParser = (project in file("template-parser")).
lazy val root = (project in file(".")).
aggregate(ccParser, tplspecParser).
dependsOn(ccParser, tplspecParser).
settings(hornParserSettings: _*).
settings(parserGen: _*).
settings(commonSettings: _*).
//
settings(
scalaSource in Compile := baseDirectory.value / "src",
//
mainClass in Compile := Some("lazabs.Main"),
//

unmanagedJars in Compile ++= (baseDirectory map { base =>
val baseDirectories = (base / "lib") +++ (base / "flata")
val customJars = (baseDirectories ** "*.jar") // +++ (base / "d" / "my.jar")
val baseDirectories = (base / "flata")
val customJars = (baseDirectories ** "*.jar")
customJars.classpath
}).value,

// exclude any folders
/* excludeFilter in Compile := {
val refine = (baseDirectory.value / "src" / "lazabs" / "refine" ).getCanonicalPath
new SimpleFileFilter(f =>
(f.getCanonicalPath startsWith refine)
)
},
*/
//
scalacOptions in Compile ++=
List("-feature",
"-language:implicitConversions,postfixOps,reflectiveCalls"),
scalacOptions += (scalaVersion map { sv => sv match {
case "2.11.8" => "-optimise"
case "2.12.1" => "-opt:l:classpath"
case "2.12.4" => "-opt:_"
}}).value,
//
libraryDependencies +=
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4",
//
// libraryDependencies +=
// "net.sf.squirrel-sql.thirdparty-non-maven", % "java-cup" % "0.11a",
libraryDependencies +=
"net.sf.squirrel-sql.thirdparty-non-maven" % "java-cup" % "0.11a",
//
libraryDependencies +=
"org.antlr" % "antlr" % "3.3",
//
libraryDependencies +=
"org.scala-lang.modules" % "scala-xml_2.11" % "1.0.5",
Expand All @@ -148,5 +141,4 @@ lazy val root = (project in file(".")).
// libraryDependencies += "uuverifiers" %% "princess" % "2017-07-17"
libraryDependencies += "uuverifiers" %% "princess" % "nightly-SNAPSHOT"
)

//
14 changes: 6 additions & 8 deletions eldEnv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Figures out where Eldarica is installed and runs it with the proper classpath
# (partially copied from the scala dist.)
SOURCE=$0;
Z3_LIB_PATH=/home/philipp/tmp/z3/lib
# Z3_LIB_PATH=/home/philipp/tmp/z3/lib
SCRIPT=`basename "${SOURCE}"`;

# Finds the root folder of the distribution, through the tempest (and the
Expand All @@ -19,7 +19,7 @@ done;

LAZABS_HOME=`dirname "${SOURCE}"`;

export LD_LIBRARY_PATH=${Z3_LIB_PATH}:/usr/local/lib:/usr/local/lib/jni:/usr/lib/jni;
# export LD_LIBRARY_PATH=${Z3_LIB_PATH}:/usr/local/lib:/usr/local/lib/jni:/usr/lib/jni;

export JAVA_OPTS="-Xmx2024m -Xss20000k";

Expand All @@ -30,14 +30,12 @@ if [ -f ${LAZABS_HOME}/dist/lazabs.jar ]; then

else if [ -f ${LAZABS_HOME}/target/scala-2.*/Eldarica-assembly*.jar ]; then

# binary distribution
# binary distribution from sbt
export LAZABS_CMD="java ${JAVA_OPTS} -cp ${LAZABS_HOME}/target/scala-2.*/Eldarica-assembly*.jar"

else

# source distribution
echo "Could not find Eldarica jar" >&2
exit 1

export LAZABS_CP="${LAZABS_HOME}"/dist/lazabs.jar:"${LAZABS_HOME}"/lib/java-cup-11a-runtime.jar:"${LAZABS_HOME}"/lib/z3.jar:"${LAZABS_HOME}"/lib/princess.jar:"${LAZABS_HOME}"/lib/smt-parser.jar:"${LAZABS_HOME}"/lib/tplspec-parser.jar:"${LAZABS_HOME}"/lib/cc-parser.jar:"${LAZABS_HOME}"/flata/flata.jar:"${LAZABS_HOME}"/flata/acceleration.jar:"${LAZABS_HOME}"/flata/glpk-java-4.47.jar:"${LAZABS_HOME}"/lib/antlr-3.3-complete.jar:"${LAZABS_HOME}"/flata/nts.jar:"${LAZABS_HOME}"/bip-lib/*
export LAZABS_CMD="scala -cp $LAZABS_CP"

fi; fi
fi; fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e74d434

Please sign in to comment.