diff --git a/pom.xml b/pom.xml
index d54d1be..c8473ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,6 +35,12 @@
0.5.0
+
+ com.google.guava
+ guava
+ 21.0
+
+
1.8
diff --git a/src/main/java/edu/rpi/rair/DepthFirstPlanner.java b/src/main/java/edu/rpi/rair/DepthFirstPlanner.java
index 605345e..5054f24 100644
--- a/src/main/java/edu/rpi/rair/DepthFirstPlanner.java
+++ b/src/main/java/edu/rpi/rair/DepthFirstPlanner.java
@@ -13,7 +13,7 @@ import java.util.stream.Collectors;
public class DepthFirstPlanner implements Planner {
- private static int MAX_DEPTH = 3;
+ private static int MAX_DEPTH = 4;
private static boolean EXHAUSTIVE_TILL_MAX_DEPTH = false;
public static int getMaxDepth() {
diff --git a/src/main/java/edu/rpi/rair/GoalTracker.java b/src/main/java/edu/rpi/rair/GoalTracker.java
index 5b2bccd..3972294 100644
--- a/src/main/java/edu/rpi/rair/GoalTracker.java
+++ b/src/main/java/edu/rpi/rair/GoalTracker.java
@@ -31,6 +31,8 @@ public class GoalTracker {
this.currentGoals = CollectionUtils.newEmptySet();
this.planner = new DepthFirstPlanner();
this.actions = actions;
+
+ Operations.reset();
}
diff --git a/src/main/java/edu/rpi/rair/Operations.java b/src/main/java/edu/rpi/rair/Operations.java
index c1a1bdf..90aa7bd 100644
--- a/src/main/java/edu/rpi/rair/Operations.java
+++ b/src/main/java/edu/rpi/rair/Operations.java
@@ -2,7 +2,7 @@ package edu.rpi.rair;
import com.naveensundarg.shadow.prover.core.Prover;
import com.naveensundarg.shadow.prover.core.SnarkWrapper;
-import com.naveensundarg.shadow.prover.representations.formula.And;
+import com.naveensundarg.shadow.prover.core.proof.Justification;
import com.naveensundarg.shadow.prover.representations.formula.BiConditional;
import com.naveensundarg.shadow.prover.representations.formula.Formula;
import com.naveensundarg.shadow.prover.representations.value.Value;
@@ -11,6 +11,7 @@ import com.naveensundarg.shadow.prover.utils.CollectionUtils;
import com.naveensundarg.shadow.prover.utils.ImmutablePair;
import com.naveensundarg.shadow.prover.utils.Pair;
import com.naveensundarg.shadow.prover.utils.Sets;
+import org.apache.commons.lang3.tuple.Triple;
import java.util.List;
import java.util.Map;
@@ -31,34 +32,101 @@ public class Operations {
private static Prover prover;
- static{
+ private static final Map, Formula>, Optional> proverCache = CollectionUtils.newMap();
+ private static final Map, Formula, List>, Optional>>> proverBindingsCache = CollectionUtils.newMap();
+ private static final Map, Action, State>, Optional>> > applyCache = CollectionUtils.newMap();
+
+
+ public static void reset(){
+
+ proverCache.clear();
+ proverBindingsCache.clear();
+ applyCache.clear();
+ }
+ static {
prover = new SnarkWrapper();
+
}
- public static synchronized Optional