Skip to content

Commit

Permalink
I probably just realized where the problem lies
Browse files Browse the repository at this point in the history
  • Loading branch information
hoechp committed May 19, 2017
1 parent c044a62 commit fe40a13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/fujaba/graphengine/PatternEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ public static boolean evaluate(Evaluator evaluator, String expression) {
}
toParse = toParse.substring(toParse.indexOf(searchFor) + searchFor.length());
toParse = toParse.substring(0, toParse.length() - 2);
evaluator.putVariable(toParse, "0.0");
evaluator.putVariable(toParse, "0");
}
} while (catched == true);
return matched;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ public void testTransformingTTCStateCaseData() {
}
System.out.println("after joining multiple labels with the same sources and same targets:\n" + g + "\n");




/**
* TODO: really just randomly find a 'k' and then find all matching 'p's and 'q's for it, to work with them in a 'batch'
*/


// gtr for state elimination itself (the q->k->p to q->p case)
PatternGraph gtrEliminate = new PatternGraph("eliminate state");
PatternNode p = new PatternNode();
Expand All @@ -151,7 +159,6 @@ public void testTransformingTTCStateCaseData() {
gtrEliminate.addPatternNode(p, k, q);
p.addPatternEdge("==", (String)null, k);
k.addPatternEdge("==", (String)null, q);
k.addPatternEdge("!=", "this_is_no_real_edge", q);

do {
matches = PatternEngine.matchPattern(g, gtrEliminate, true);
Expand All @@ -169,7 +176,7 @@ public void testTransformingTTCStateCaseData() {
}
}
Boolean pqb = false;
if (pqLabel != null && pqLabel != "" && pqLabel != "this_is_no_real_edge") {
if (pqLabel != null && pqLabel != "") {
pqb = true;
}
// System.out.println(" pqLabel: " + pqLabel);
Expand All @@ -187,7 +194,7 @@ public void testTransformingTTCStateCaseData() {
}
}
Boolean kkb = false;
if (kkLabel != null && kkLabel != "" && kkLabel != "this_is_no_real_edge") {
if (kkLabel != null && kkLabel != "") {
kkb = true;
}
// System.out.println(" kkLabel: " + kkLabel);
Expand Down

0 comments on commit fe40a13

Please sign in to comment.