sahands / simple-sat

Simple recursive and iterative SAT solver written in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

import paths are not set up correctly for python3

keithbriggs opened this issue · comments

kbriggs:~/Downloads/simple-sat-master/src> python2 sat.py -v --input tests/simple/02.in
Trying 1 = 0
Trying 2 = 0
Trying 3 = 0
Current watchlist:
1:
~1: ~1 ~3
2:
~2: 1 ~2
3: 1 2 3
~3:
Current assignment: ~1 ~2 ~3
Clause 1 2 3 contradicted.
Trying 3 = 1
Found satisfying assignment #0:
~1 ~2 3

kbriggs:~/Downloads/simple-sat-master/src> python3 sat.py -v --input tests/simple/02.in
Traceback (most recent call last):
File "sat.py", line 18, in
from solvers import recursive_sat
File "/home/kbriggs/Downloads/simple-sat-master/src/solvers/recursive_sat.py", line 6, in
from watchlist import update_watchlist
ImportError: No module named 'watchlist'

It should be
from .watchlist import update_watchlist
, then it works in py2 and py3

Thanks for reporting this as well. Fixed.