Skip to content

Commit d7ef2fd

Browse files
Only emitting side_conditions if all occurrences of the same variable are equal
1 parent db7ebd0 commit d7ef2fd

File tree

1 file changed

+4
-0
lines changed
  • matching/src/main/scala/org/kframework/backend/llvm/matching

1 file changed

+4
-0
lines changed

matching/src/main/scala/org/kframework/backend/llvm/matching/Matrix.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,10 @@ class Matrix private (
773773
// if there is no side condition, continue
774774
case None => nonlinearLeaf
775775
case Some(cond) =>
776+
// print nonLinearLeaf to stderr
777+
System.err.println(nonlinearLeaf)
778+
// if there is a side condition but not all occurrences of the same variable are equal, continue
779+
//if (nonlinear.nonEmpty) return nonlinearLeaf
776780
val condVars = cond.map(v => (grouped(v).head._2, grouped(v).head._1.hookAtt))
777781
val newO = SC(row.clause.action.ordinal)
778782
// evaluate the side condition and if it is true, continue, otherwise go to the next row

0 commit comments

Comments
 (0)