Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def solve_problog(model, debug=False):
program = PrologString(model)
decisions, score, statistics = dtproblog(program)
if debug:
print('score: %s' % score)
for name, value in decisions.items():
print('%s: %s' % (name, value))
return (score, decisions)