Skip to content

Commit 32a592e

Browse files
committed
small fix when learning from only positive examples
1 parent 64f9cda commit 32a592e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

popper/loop.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ def run(self, bkcons):
395395
print('\t', 'REDUCIBLE_1:', '\t', ','.join(format_literal(literal) for literal in x))
396396
new_cons.append((Constraint.UNSAT, x))
397397

398-
if not add_spec and not pruned_more_general and settings.datalog and not settings.recursion_enabled:
398+
# CHECK WHETHER THE PROGRAM DOES NOT DISCRIMINATE AGAINST NEGATIVE EXAMPLES
399+
# this paper outlines the idea: # https://arxiv.org/pdf/2502.01232
400+
if not add_spec and not pruned_more_general and settings.datalog and not settings.recursion_enabled and num_neg > 0:
399401
with settings.stats.duration('check_reducible2'):
400402
bad_prog = self.check_neg_reducible(prog)
401403
if bad_prog:

0 commit comments

Comments
 (0)