From 896942cadeff3812243253520816f04a926cc491 Mon Sep 17 00:00:00 2001 From: Robin Manhaeve Date: Tue, 29 Oct 2024 11:09:38 +0100 Subject: [PATCH] Add name to negation node if label_all is defined. --- problog/eval_nodes.py | 6 +++++- problog/version.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/problog/eval_nodes.py b/problog/eval_nodes.py index e7aa1714..d70998ca 100644 --- a/problog/eval_nodes.py +++ b/problog/eval_nodes.py @@ -727,7 +727,11 @@ def new_result(self, result, node=NODE_TRUE, source=None, is_last=False): def complete(self, source=None): actions = [] if self.nodes: - or_node = self.target.add_not(self.target.add_or(self.nodes, name=None)) + if self.engine.label_all: + name = Term('aux_{}'.format(self.identifier)) + else: + name = None + or_node = self.target.add_not(self.target.add_or(self.nodes, name=name)) if or_node != NODE_FALSE: actions += self.notifyResult(self.context, or_node) else: diff --git a/problog/version.py b/problog/version.py index 48f45a22..9bb8918c 100644 --- a/problog/version.py +++ b/problog/version.py @@ -1 +1 @@ -version = '2.2.4' +version = '2.2.5'