Skip to content

Commit

Permalink
Handle negation_failure
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-eschwartz committed Nov 16, 2022
1 parent de55ef0 commit 4012c9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion share/prolog/oorules/util.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:- use_module(library(lists), [append/3, nth1/4, list_to_set/2]).

:- dynamic negation_queue/1.
:- dynamic negation_fail/1 as incremental.
:- dynamic negation_fail/1.
:- dynamic negation_commit/1 as incremental.

:- table negation_helper/1 as opaque.
Expand All @@ -20,6 +20,10 @@
logtraceln('Already committed ~Q', G),
!.

% G results in a sanit yfailure
negation_helper(G) :-
negation_fail(G), !, fail.

% G isn't true right now.
negation_helper(G) :-
not(G), !, fail.
Expand Down

0 comments on commit 4012c9d

Please sign in to comment.