Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial work to get STP to use the latest ABC from Git (current ABC rev: 5c8ee4a2) #376

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aytey
Copy link
Member

@aytey aytey commented Jul 31, 2020

(the minute I open this PR, I am marking it as a draft)

This is PR to do the initial work to move from the version of ABC that STP includes in the repo to the latest version from https://github.com/berkeley-abc/abc (I did this with berkeley-abc/abc@5c8ee4a).

There's some hard-coded stuff in here that needs to be fixed, but I thought it was useful to open-up the PR w.r.t. #375.

If you want to reproduce this, you need to ensure that ABC is compiled with -fPIC.

Very importantly, this passes ctest successfully!!!

Signed-off-by: Andrew V. Jones andrew.jones@vector.com

…ev: 5c8ee4a2)

Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
@aytey aytey marked this pull request as draft July 31, 2020 09:23
@rgov
Copy link
Member

rgov commented Jul 31, 2020

I'm surprised it's so easy after 12 years.

@rgov
Copy link
Member

rgov commented Jul 31, 2020

And how do the warnings look from #339 ?

@aytey
Copy link
Member Author

aytey commented Jul 31, 2020

I'm surprised it's so easy after 12 years.

Well, this hasn't run through CI, so I don't know if Mate's fuzzing stuff will unearth anything extra. All I can say is that for me, locally, this builds and works.

My guess is that, although it is 12 years of difference, there hasn't been "lots and lots" of change in ABC. Some of the APIs got renamed and arguments added, but nothing "substantial" was removed, so it made the mapping quite easy.

I'm also reassured that the three times this has been tried (by me, my Trevor, by Mate), we've nearly always made the same changes!

And how do the warnings look from #339 ?

A very rough check (building master vs. this branch vs. this branch with 'warnings2' merged) appears significantly worse. Basically, it seems that the "minimal core" of ABC that STP uses was cleaned-up vs. what's in upstream that seems to generate quite a lot of warnings.

To do the builds:

$ export CXX=clang++ && export CC=clang && for i in master latest_abc latest_abc_warnings2; do cd $i; rm -rf build; mkdir build; cd build; cmake -DMINISAT_INCLUDE_DIRS:PATH=$(readlink -f ../deps/minisat) -DMINISAT_LIBDIR:PATH=$(readlink -f ../deps/minisat/build) -DNOCRYPTOMINISAT:BOOL=OFF -DENABLE_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -G Ninja ..; ninja |& cat > output.txt; cd ..; cd ..; done

To check the warnings:

$ grep -c "warning:" master/build/output.txt latest_abc/build/output.txt latest_abc_warnings2/build/output.txt
master/build/output.txt:280
latest_abc/build/output.txt:322
latest_abc_warnings2/build/output.txt:314

So warnings2 does improve things, but it is still worse than when we didn't have an external ABC 🤦

@msoos
Copy link
Member

msoos commented Jul 31, 2020

Wow, I'd love to have this work succeed! I wanted to do this at one point, but it got hairy and I didn't pull through. Thanks so much for taking a peek! I would love to use libabc as a library, copy-pasting it into our source code is not very beautiful :) Thanks again for picking this up, I'm super-excited about this, good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants