Commit 72413d87 authored by Arthur Bit-Monnot's avatar Arthur Bit-Monnot

[pddl] Move parser into subproject

parent 09ad28b8
...@@ -57,7 +57,7 @@ lazy val utestSettings = Seq( ...@@ -57,7 +57,7 @@ lazy val utestSettings = Seq(
lazy val root = project lazy val root = project
.in(file(".")) .in(file("."))
.aggregate(utils, recursion, model, solvers, benchmarks, anml) .aggregate(utils, recursion, model, solvers, benchmarks, anmlParser)
.settings( .settings(
scalaVersion := "2.12.4", scalaVersion := "2.12.4",
publish := {}, publish := {},
...@@ -73,8 +73,8 @@ lazy val planningModel = project ...@@ -73,8 +73,8 @@ lazy val planningModel = project
"org.typelevel" %% "spire" % "0.14.1" "org.typelevel" %% "spire" % "0.14.1"
)) ))
lazy val anml = project lazy val anmlParser = project
.in(file("planning/anml")) .in(file("planning/anml/parser"))
.settings(name := "dahu-anml") .settings(name := "dahu-anml")
.dependsOn(planningModel) .dependsOn(planningModel)
.settings(commonSettings: _*) .settings(commonSettings: _*)
...@@ -85,8 +85,8 @@ lazy val anml = project ...@@ -85,8 +85,8 @@ lazy val anml = project
"org.scalatest" %% "scalatest" % "3.0.5" % "test" "org.scalatest" %% "scalatest" % "3.0.5" % "test"
)) ))
lazy val pddl = project lazy val pddlParser = project
.in(file("planning/pddl")) .in(file("planning/pddl/parser"))
.settings(name := "dahu-pddl") .settings(name := "dahu-pddl")
.dependsOn(planningModel, utils) .dependsOn(planningModel, utils)
.settings(commonSettings: _*) .settings(commonSettings: _*)
...@@ -148,7 +148,7 @@ lazy val benchmarks = project ...@@ -148,7 +148,7 @@ lazy val benchmarks = project
lazy val planner = project lazy val planner = project
.in(file("planner")) .in(file("planner"))
.dependsOn(anml, solvers, z3) .dependsOn(anmlParser, solvers, z3)
.settings(commonSettings ++ utestSettings: _*) .settings(commonSettings ++ utestSettings: _*)
.settings( .settings(
mainClass in assembly := Some("dahu.planner.Main"), mainClass in assembly := Some("dahu.planner.Main"),
......
package dahu.planning.pddl package dahu.planning.pddl.parser
import dahu.planning.model.common.{operators, Arg, LocalVar} import dahu.planning.model.common.{operators, Arg, LocalVar}
import dahu.planning.model.full._ import dahu.planning.model.full._
import dahu.planning.pddl.Utils._ import Utils._
import dahu.utils.errors._ import dahu.utils.errors._
import fr.uga.pddl4j.parser.{Exp, Op} import fr.uga.pddl4j.parser.{Exp, Op}
......
package dahu.planning.pddl package dahu.planning.pddl.parser
import fr.uga.pddl4j.parser._ import fr.uga.pddl4j.parser._
import dahu.planning.model.common._ import dahu.planning.model.common._
import dahu.planning.model.{common, full} import dahu.planning.model.{common, full}
import dahu.planning.model.full._ import dahu.planning.model.full._
import dahu.utils.errors._ import dahu.utils.errors._
import dahu.planning.pddl.Utils._ import Utils._
import dahu.planning.pddl.Resolver._
import scala.collection.JavaConverters._ import scala.collection.JavaConverters._
import scala.collection.mutable import scala.collection.mutable
...@@ -87,7 +86,7 @@ class ModelFactory(val predef: PddlPredef) extends Factory { ...@@ -87,7 +86,7 @@ class ModelFactory(val predef: PddlPredef) extends Factory {
} }
private def recordInstance(name: String, tpe: String): Unit = { private def recordInstance(name: String, tpe: String): Unit = {
rec(InstanceDeclaration(Instance(id(name), typeOf(tpe)))) rec(InstanceDeclaration(Instance(id(name), resolver.typeOf(tpe))))
} }
private def recordInitialState(e: Exp): Unit = { private def recordInitialState(e: Exp): Unit = {
......
package dahu.planning.pddl package dahu.planning.pddl.parser
import dahu.planning.model.common import dahu.planning.model.common
import dahu.planning.model.common._ import dahu.planning.model.common._
import dahu.planning.model.full._ import dahu.planning.model.full._
import dahu.planning.pddl.Utils._ import Utils._
import dahu.planning.pddl.Resolver._
import dahu.utils.errors._ import dahu.utils.errors._
import fr.uga.pddl4j.parser._ import fr.uga.pddl4j.parser._
......
package dahu.planning.pddl package dahu.planning.pddl.parser
import java.io.File import java.io.File
......
package dahu.planning.pddl package dahu.planning.pddl.parser
case class Options(discretization: Int = 1) case class Options(discretization: Int = 1)
package dahu.planning.pddl package dahu.planning.pddl.parser
import java.io.File import java.io.File
......
package dahu.planning.pddl package dahu.planning.pddl.parser
import dahu.planning.model.common._
import dahu.planning.model.common.Type._ import dahu.planning.model.common.Type._
import dahu.planning.model.common._
import dahu.planning.model.full._ import dahu.planning.model.full._
case class PddlPredef(discretization: Int) extends Predef { case class PddlPredef(discretization: Int) extends Predef {
......
package dahu.planning.pddl package dahu.planning.pddl.parser
import dahu.planning.model.common.{Id, Scope, Type} import dahu.planning.model.common.{Id, Scope, Type}
import dahu.planning.model.full.{Ctx, StaticExpr} import dahu.planning.model.full.{Ctx, StaticExpr}
......
package dahu.planning.pddl package dahu.planning.pddl.parser
import dahu.planning.model.common.{Predef, Term} import dahu.planning.model.common.Term
import dahu.planning.model.full.CommonTerm import dahu.planning.model.full.CommonTerm
import scala.language.implicitConversions import scala.language.implicitConversions
......
package dahu.planning.pddl.ast package dahu.planning.pddl.parser.ast
import dahu.planning.model.common.{Cst, IntLiteral} import dahu.planning.model.common.{Cst, IntLiteral}
import dahu.planning.pddl.PddlPredef import dahu.planning.pddl.parser.PddlPredef
import fr.uga.pddl4j.parser._ import fr.uga.pddl4j.parser._
import dahu.utils.errors._ import dahu.utils.errors._
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment