From cca354da36425faed69adb29e431bf7b48b230d4 Mon Sep 17 00:00:00 2001 From: naweedkhan Date: Thu, 30 Nov 2023 16:16:43 +0200 Subject: [PATCH] MAINT: class rename Signed-off-by: naweedkhan --- lnn/__init__.py | 8 ++++---- lnn/symbolic/logic/formula.py | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lnn/__init__.py b/lnn/__init__.py index ffa2fc6..8f4e106 100644 --- a/lnn/__init__.py +++ b/lnn/__init__.py @@ -17,7 +17,7 @@ from . import symbolic from .symbolic.logic import ( And, - Congruent, + Equal, Iff, Exists, Forall, @@ -32,7 +32,7 @@ Predicates, Variable, Variables, - XOr, + Xor, ) from .model import Model from .constants import Fact, World, Direction, Loss @@ -47,7 +47,7 @@ "truth_table", "truth_table_dict", "And", - "Congruent", + "Equal", "Direction", "Iff", "Exists", @@ -67,5 +67,5 @@ "Fact", "World", "Loss", - "XOr", + "Xor", ] diff --git a/lnn/symbolic/logic/formula.py b/lnn/symbolic/logic/formula.py index 4b631d5..ea4fc4a 100644 --- a/lnn/symbolic/logic/formula.py +++ b/lnn/symbolic/logic/formula.py @@ -314,10 +314,8 @@ def is_equal(self, other: "Formula") -> bool: return True result = list() for f in self.congruent_nodes: - if _isinstance(f, "Congruent"): - result += [ - other.structure == operand.structure for operand in f.operands - ] + if _isinstance(f, "Equal"): + result += [other.syntax == operand.syntax for operand in f.operands] return any(result) def is_unweighted(self) -> bool: