Skip to content

Commit 1c1235d

Browse files
committed
Merge branch 'main' into linter-notes
2 parents dcf2394 + 64f9cda commit 1c1235d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

popper/bkcons.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,7 @@ def deduce_recalls(settings):
755755
solver.add('base', [], bk)
756756
solver.ground([('base', [])])
757757
except Exception as Err:
758-
settings.logger.error(f'ERROR deducing recalls: {Err}')
759-
traceback.print_exc(None, file=sys.stderr)
758+
print('WARNING: cannot deduce recalls', Err)
760759
return None
761760

762761
for pred, arity in settings.body_preds:
@@ -1111,4 +1110,4 @@ def deduce_non_singletons(settings):
11111110
cons.append(con)
11121111

11131112
# exit()
1114-
return cons
1113+
return cons

popper/gen2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def __init__(self, settings, bkcons=[]):
5454
bias_text = re.sub(r'max_body\(\d*\).', '', bias_text)
5555
bias_text = re.sub(r'max_clauses\(\d*\).', '', bias_text)
5656

57-
for p, a in settings.pointless:
58-
bias_text = re.sub(rf'body_pred\({p},{a}\).', '', bias_text)
59-
bias_text = re.sub(rf'constant\({p},.*?\).*', '', bias_text, flags=re.MULTILINE)
57+
# AC: NEED TO COMPLETELY REFACTOR THIS CODE
58+
for p,a in settings.pointless:
59+
bias_text = re.sub(rf'body_pred\({p},\s*{a}\)\.', '', bias_text) bias_text = re.sub(rf'constant\({p},.*?\).*', '', bias_text, flags=re.MULTILINE)
6060

6161
encoding.append(bias_text)
6262
encoding.append(f'max_clauses({settings.max_rules}).')

0 commit comments

Comments
 (0)