Closed XVilka closed 4 years ago
The Python 'str' type is mapped to the Prolog 'atom' type.
The expression "x86"
is not a valid atom, you should use 'x86'
instead.
As far as I remember Prolog strings (i.e. double quoted) are not supported in ProbLog (yet).
Changed the syntax to 'x86'
, but now get a different error:
raise ValueError("Function has keyword-only parameters or annotations)
It seems problog_export expect positional arguments on the exported Python function. Adding type annotations apparently changes them to keyword parameters.
Thanks! Now it works. Created two separate issues:
I have a code like this:
But if I ran
instruction_string("x86", 32, 0, [142, 142, 142], A).
it fails miserably: