meelgroup / manthan

Manthan for Boolean function synthesis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hitting a number of issues while attempting to use the sytem

msoos opened this issue · comments

Hi,

Unfortunately, following the README instructions, I'm getting:

$ python manthan.py  benchmarks/test.qdimacs                    
Traceback (most recent call last):
  File "/home/soos/development/sat_solvers/manthan/manthan.py", line 41, in <module>
    from src.DefinabilityChecker import DefinabilityChecker
  File "/home/soos/development/sat_solvers/manthan/src/DefinabilityChecker.py", line 11, in <module>
    import src.InterpolatingSolver as InterpolatingSolver
  File "/home/soos/development/sat_solvers/manthan/src/InterpolatingSolver.py", line 9, in <module>
    import itp
ImportError: Python version mismatch: module was compiled for Python 3.10, but the interpreter version is incompatible: 3.11.3 (main, Apr  5 2023, 15:52:25) [GCC 12.2.1 20230201].

Notice that the system seems to include this module pre-compiled, which I believe is incorrect? Such modules should be compiled on the machine of the user so it can be used. Pre-compiled modules for python may break on every minor (3.X) version change, as it did here I believe.

Furthermore, even if the above if fixed, I believe there may be other issues. When I look at requirements.txt, it misses pysat, for example, which I believe the system needs?

I don't see it helpful to submit 10+ bug reports, one by one. It would take too much time for everyone and would likely lead to a lot of noise :( I would suggest creating a modern Ubuntu VM, and trying to follow the README. Latest Ubuntu, Lunar (23.04) has python 3.11 and should reproduce above bug. Also, the numpy in requirements.txt will likely not compile on that Ubuntu, as a modern compiler will error out on such an old version of numpy as set by requirements.txt (as it does on my modern system).

My suggestion is to create an Ubuntu 23.04 VM, snapshot it after creation, then follow the instructions of the README one-by-one. Once the issues seem to be fixed, the fix can be validated by going back to the snapshot and doing the README one-by-one.

Another suggestion is to ask users in the README to use a venv, which likely will lead to a higher chance of success for people to be able to run the tool.

Please let me know when the bugs have been fixed so I can run it! Thanks a lot in advance,

Mate

Hi Mate,

Thank you so much for your time and efforts.

I've updated the system and tested it on the Ubuntu 23.04 VM. Based on your suggestions, here's what I changed:

  1. Created a single script that compiles and builds everything we need.
  2. Added python-sat and pybind11[global] to requirement.txt.
  3. Updated the version of numpy.
  4. Changed the README to use venv.

Moreover, it seems we can't install using pip directly on Ubuntu 23.04 and Python 3.11 without a virtual environment. When I did python3 -m pip install -r requirements.txt without virtual environment on Ubuntu 23.04 VM, I got the following message:

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.

Therefore, I have added creating venv instructions in the README.

Thanks again!

Priyanka

Hi,

Glad to hear of all the updates. Unfortunately, I am very busy working right now. Perhaps in 3-6 months I'll have some time to spare. I'll leave this issue open in the meanwhile. I'll close it when I had time to validate. I have tried to fix and use this tool multiple times in the past 8 months, with zero help from the authors. In the end, I think this tool likely will need to be re-written from scratch. My feeling so far is that it will likely take less time than attempting to fix it up to make it usable.

Just my 2 cents,

Mate