Skip to content

Commit

Permalink
Merge branch 'integration' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Hector committed Sep 24, 2018
2 parents fcc752b + 9d3c366 commit dab6f15
Show file tree
Hide file tree
Showing 154 changed files with 13,191 additions and 4,437 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: scala
scala:
- 2.11.8
- 2.12.4
script: "./build.sh"
deploy:
- provider: bintray
Expand Down
2 changes: 1 addition & 1 deletion bintray-release.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"released": "2017-11-23"
},
"files": [{
"includePattern": "scala/target/scala-2.11/Quantomatic.jar",
"includePattern": "scala/target/scala-(.*)/Quantomatic.jar",
"uploadPattern": "release-0.6.1/Quantomatic.jar",
"matrixParams": {"override": 1}
}],
Expand Down
4 changes: 2 additions & 2 deletions bintray.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"package": {
"name": "Quantomatic",
"name": "quantomatic",
"repo": "quantomatic",
"subject": "quantomatic"
},
"version": {
"name": "bleeding-edge"
},
"files": [{
"includePattern": "scala/target/scala-2.11/Quantomatic.jar",
"includePattern": "scala/target/scala-2.12/Quantomatic.jar",
"uploadPattern": "bleeding-edge/Quantomatic.jar",
"matrixParams": {"override": 1}
}],
Expand Down
38 changes: 38 additions & 0 deletions docs/json_formats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ VTYPE_DESC ::=
"style": {
"shape": "circle" | "rectangle" | "custom",
"custom_shape_path": JSON_STRING,
"stroke_width": JSON_INT,
"stroke_color": COLOR,
"fill_color": COLOR,
"label" : {
Expand Down Expand Up @@ -209,3 +210,40 @@ STEP ::=
}



========================
Simproc Batch Run
========================

File extension: .qsbr

A simproc batch run takes a collection of simprocs and applies them to a list of graphs. The resulting derivations are then recorded and timestamped.
Notes are optional notes added to the file by the job creator.
"python" contains all the python source code of the simprocs in memory.
"selected_simprocs" contains the names of just those simprocs used in this job.

SIMPROC_BATCH_RUN ::=
{
"python": {SIMPROC_NAME: PYTHON_STRING (, SIMPROC_NAME: PYTHON_STRING)*},
"selected_simprocs": Array[String],
"results": {DERIVATION_WITH_TIMINGS (, DERIVATION_WITH_TIMINGS)*},
"notes": String
}

DERIVATION_WITH_TIMINGS ::=
{
"simproc" : STRING,
"derivation": DERIVATION,
"timings": {STEP_TIME(, STEP_TIME)*}
}

STEP_TIME ::=
{
"step": STEP_NAME,
"time": TIMESTAMP
}

TIMESTAMP : NUMBER = time in seconds since process began



22 changes: 13 additions & 9 deletions scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name := "quanto"

version := "1.0"

scalaVersion := "2.11.8"
scalaVersion := "2.12.6"

scalacOptions ++= Seq("-feature", "-language:implicitConversions")

Expand All @@ -14,19 +14,23 @@ fork := true

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.4.10" withSources() withJavadoc()
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.5.12" withSources() withJavadoc()

libraryDependencies += "com.fasterxml.jackson.core" % "jackson-core" % "2.1.2"
libraryDependencies += "com.fasterxml.jackson.core" % "jackson-core" % "2.9.5"

libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala" % "2.1.2"
libraryDependencies += "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.5"

libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
//libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"

libraryDependencies += "org.scala-lang.modules" % "scala-swing_2.11" % "1.0.1"
//libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.4"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % "test"

libraryDependencies += "org.scala-lang.modules" %% "scala-swing" % "2.0.3"

//libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value

libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.5"
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0"

//EclipseKeys.withSource := true

Expand All @@ -36,7 +40,7 @@ seq(appbundle.settings: _*)

appbundle.mainClass := Some("quanto.gui.QuantoDerive")

appbundle.javaVersion := "1.7+"
appbundle.javaVersion := "1.8+"

appbundle.screenMenu := true

Expand All @@ -46,7 +50,7 @@ appbundle.normalizedName := "quantoderiveapp"

appbundle.organization := "org.quantomatic"

appbundle.version := "0.2.0"
appbundle.version := "0.3.0"

appbundle.icon := Some(file("../docs/graphics/quantoderive.icns"))

Expand Down
12 changes: 10 additions & 2 deletions scala/dist/mk-linux-generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@

BUNDLE=target/QuantoDerive

# Pre-build cleanup, so we know we're building in a consistent environment.
sbt clean
rm -r ../core/heaps/*
rm -r $BUNDLE/*

# Rebuild the core heap
echo Rebuilding the core heap...
mkdir -p ../core/heaps
(cd ../core; ../scala/dist/linux-dist/poly --use build_heap.ML)


Expand All @@ -22,7 +28,8 @@ sbt package

echo Including binaries...
cp -f dist/linux-dist/quanto-derive.sh $BUNDLE/
cp -f dist/linux-dist/polybin dist/linux-dist/poly $BUNDLE/bin
cp -f dist/linux-dist/polybin $BUNDLE/bin
cp -f dist/linux-dist/poly $BUNDLE/bin
cp -f dist/linux-dist/libpolyml.so.4 $BUNDLE/bin

echo Including heap...
Expand All @@ -36,7 +43,8 @@ echo Including jars...
cp -f lib_managed/jars/*/*/akka-actor*.jar $BUNDLE/jars
cp -f lib_managed/jars/*/*/scala-library*.jar $BUNDLE/jars
cp -f lib_managed/jars/*/*/scala-swing*.jar $BUNDLE/jars
cp -f lib_managed/jars/*/*/jackson-core*.jar $BUNDLE/jars
cp -f lib_managed/bundles/*/*/scala-parser-combinators*.jar $BUNDLE/jars
cp -f lib_managed/bundles/*/*/jackson-core*.jar $BUNDLE/jars
cp -f lib_managed/bundles/*/*/config*.jar $BUNDLE/jars

# grab local dependences
Expand Down
Binary file modified scala/lib/jedit-textArea.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions scala/src/main/java/quanto/core/data/TexConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ private static void initialize() {
c.put("Phi", "\u03a6");
c.put("Psi", "\u03a8");
c.put("Omega", "\u03a9");
c.put("True", "\u22A4");
c.put("False", "\u22A5");

constants = c;
}
Expand Down
2 changes: 1 addition & 1 deletion scala/src/main/java/quanto/util/json/Json.scala
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ object Json {

def this(out: java.io.OutputStream) = this(factory.createJsonGenerator(out, JsonEncoding.UTF8))
def this(out: java.io.Writer) = this(factory.createJsonGenerator(out))
def this(f: java.io.File) = this(factory.createJsonGenerator(f, JsonEncoding.UTF8))
def this(f: java.io.File) = this(factory.createJsonGenerator(new java.io.FileOutputStream(f), JsonEncoding.UTF8))

private var _pp = false
def prettyPrint_=(b: Boolean) {
Expand Down
74 changes: 74 additions & 0 deletions scala/src/main/resources/quanto/data/ZW.qtheory
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name" : "ZW",
"core_name" : "zw",
"vertex_types" : {
"Z" : {
"value" : {
"type" : "string",
"latex_constants" : true,
"validate_with_core" : true
},
"style" : {
"label" : {
"position" : "inside",
"fg_color" : [ 0.0, 0.0, 0.0 ]
},
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"fill_color" : [ 1.0, 1.0, 1.0 ],
"shape" : "circle"
},
"default_data" : {
"type" : "Z",
"label" : "",
"value" : {
"pretty" : ""
}
}
},
"W" : {
"value" : {
"type" : "string",
"latex_constants" : true,
"validate_with_core" : true
},
"style" : {
"label" : {
"position" : "inside",
"fg_color" : [ 0.0, 0.0, 0.0 ]
},
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"fill_color" : [ 0.0, 0.0, 0.0 ],
"shape" : "circle"
},
"default_data" : {
"type" : "W",
"label" : "",
"value" : {
"pretty" : ""
}
}
}
},
"default_vertex_type" : "Z",
"default_edge_type" : "plain",
"edge_types" : {
"plain" : {
"value" : {
"type" : "empty",
"latex_constants" : false,
"validate_with_core" : false
},
"style" : {
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"stroke_width" : 1,
"label" : {
"position" : "auto",
"fg_color" : [ 0.0, 0.0, 0.0 ]
}
},
"default_data" : {
"type" : "plain"
}
}
}
}
110 changes: 110 additions & 0 deletions scala/src/main/resources/quanto/data/ZX.qtheory
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"name" : "Red/green theory",
"core_name" : "red_green",
"vertex_types" : {
"X" : {
"value" : {
"path" : "$.value",
"latex_constants" : true,
"type" : "angle_expr"
},
"style" : {
"label" : {
"position" : "inside",
"fg_color" : [ 1.0, 1.0, 1.0 ]
},
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"fill_color" : [ 1.0, 0.0, 0.0 ],
"shape" : "circle"
},
"default_data" : {
"type" : "X",
"value" : ""
}
},
"Z" : {
"value" : {
"path" : "$.value",
"latex_constants" : true,
"type" : "angle_expr"
},
"style" : {
"label" : {
"position" : "inside",
"fg_color" : [ 0.0, 0.0, 0.0 ]
},
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"fill_color" : [ 0.0, 0.8, 0.0 ],
"shape" : "circle"
},
"default_data" : {
"type" : "Z",
"value" : ""
}
},
"hadamard" : {
"value" : {
"path" : "$.value",
"latex_constants" : false,
"type" : "string"
},
"style" : {
"label" : {
"position" : "inside",
"fg_color" : [ 0.0, 0.2, 0.0 ]
},
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"fill_color" : [ 1.0, 1.0, 0.0 ],
"shape" : "rectangle"
},
"default_data" : {
"type" : "hadamard",
"value" : ""
}
},
"var" : {
"value" : {
"path" : "$.value",
"latex_constants" : false,
"type" : "string"
},
"style" : {
"label" : {
"position" : "inside",
"fg_color" : [ 0.0, 0.0, 0.0 ]
},
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"fill_color" : [ 0.6, 1.0, 0.8 ],
"shape" : "rectangle"
},
"default_data" : {
"type" : "var",
"value" : ""
}
}
},
"edge_types" : {
"string" : {
"value" : {
"path" : "$.value",
"latex_constants" : false,
"type" : "string"
},
"style" : {
"stroke_color" : [ 0.0, 0.0, 0.0 ],
"stroke_width" : 1,
"label" : {
"position" : "center",
"fg_color" : [ 0.0, 0.0, 1.0 ],
"bg_color" : [ 0.8, 0.8, 1.0, 0.7 ]
}
},
"default_data" : {
"type" : "string",
"value" : ""
}
}
},
"default_vertex_type" : "Z",
"default_edge_type" : "string"
}
Loading

0 comments on commit dab6f15

Please sign in to comment.