From b7e7290d8c9ae6368c60db61efd23194f2608f89 Mon Sep 17 00:00:00 2001 From: Robby Date: Fri, 22 Mar 2024 09:40:30 -0500 Subject: [PATCH] Rewriting system. --- .../main/scala/org/sireum/logika/RewritingSystem.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/shared/src/main/scala/org/sireum/logika/RewritingSystem.scala b/shared/src/main/scala/org/sireum/logika/RewritingSystem.scala index d61e1196..6892de1b 100644 --- a/shared/src/main/scala/org/sireum/logika/RewritingSystem.scala +++ b/shared/src/main/scala/org/sireum/logika/RewritingSystem.scala @@ -1911,11 +1911,9 @@ object RewritingSystem { rOpt match { case Some(_: AST.CoreExp.Lit) => done = T case Some(r) => - val rOpt2 = evalBaseH(r) - if (rOpt2.isEmpty) { - done = T - } else { - rOpt = rOpt2 + evalBaseH(r) match { + case rOpt2@Some(r2) if r != r2 => rOpt = rOpt2 + case _ => done = T } case _ => done = T }