logic-and-learning-lab/Popper

janus.PrologError: '$c_call_prolog'/0: Arguments are not sufficiently instantiated

Timisorean opened this issue · 2 comments

When adding a rule like the following to my bk.pl file (in my case, to the files as in #81):

arg(X, [X]).

I get following error:

Traceback (most recent call last):
  File "/bin/popper-ilp", line 8, in <module>
    prog, score, stats = learn_solution(settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/loop.py", line 1711, in learn_solution
    timeout(settings, popper, (settings, tester, bkcons), timeout_duration=int(settings.timeout-time_so_far),)
  File "/lib/python3.12/site-packages/popper/util.py", line 81, in timeout
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/loop.py", line 1640, in popper
    Popper(settings, tester, bkcons).run()
  File "/lib/python3.12/site-packages/popper/loop.py", line 314, in run
    cons_ = tuple(self.explain_incomplete(prog))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/loop.py", line 858, in explain_incomplete
    unsat_cores = self.explain_totally_incomplete(prog)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/loop.py", line 1298, in explain_totally_incomplete
    return list(self.explain_totally_incomplete_aux2(prog, set(), set()))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/loop.py", line 1451, in explain_totally_incomplete_aux2
    xs = self.explain_totally_incomplete_aux2(subprog, sat, unsat)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/loop.py", line 1477, in explain_totally_incomplete_aux2
    if self.tester.is_body_sat(body):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/tester.py", line 222, in is_body_sat
    return bool_query(query)
           ^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/popper/tester.py", line 22, in bool_query
    return query_once(query)['truth']
           ^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/janus_swi/janus.py", line 243, in query_once
    return _swipl.call(query, inputs, keep)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janus.PrologError: '$c_call_prolog'/0: Arguments are not sufficiently instantiated

Thanks again for the fast response! Works perfectly now with directions.