From d7ef2fd7cf9e73e093d22be06833bab4cb4ce460 Mon Sep 17 00:00:00 2001 From: Roberto Rosmaninho Date: Thu, 10 Oct 2024 18:43:42 -0300 Subject: [PATCH] Only emitting side_conditions if all occurrences of the same variable are equal --- .../scala/org/kframework/backend/llvm/matching/Matrix.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matching/src/main/scala/org/kframework/backend/llvm/matching/Matrix.scala b/matching/src/main/scala/org/kframework/backend/llvm/matching/Matrix.scala index 39fee871b..4c063cbc5 100644 --- a/matching/src/main/scala/org/kframework/backend/llvm/matching/Matrix.scala +++ b/matching/src/main/scala/org/kframework/backend/llvm/matching/Matrix.scala @@ -773,6 +773,10 @@ class Matrix private ( // if there is no side condition, continue case None => nonlinearLeaf case Some(cond) => + // print nonLinearLeaf to stderr + System.err.println(nonlinearLeaf) + // if there is a side condition but not all occurrences of the same variable are equal, continue + //if (nonlinear.nonEmpty) return nonlinearLeaf val condVars = cond.map(v => (grouped(v).head._2, grouped(v).head._1.hookAtt)) val newO = SC(row.clause.action.ordinal) // evaluate the side condition and if it is true, continue, otherwise go to the next row