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

How to convert DRAT/DRUP to LRAT? #29

Open
DennisYurichev opened this issue Feb 7, 2022 · 8 comments
Open

How to convert DRAT/DRUP to LRAT? #29

DennisYurichev opened this issue Feb 7, 2022 · 8 comments

Comments

@DennisYurichev
Copy link

DennisYurichev commented Feb 7, 2022

I'm trying to convert DRAT proof produced by Kissat to LRAT to see if it can be verified in ACL2.
Am I doing this right?

unsat1.cnf:

p cnf 1 2
1 0
-1 0

Running:

% kissat unsat1.cnf unsat1.drat

% xxd -g 1 unsat1.drat
00000000: 61 00 61 00 64 03 00                             a.a.d..

Attempting to generate LRAT proof from DRAT proof.
Am I doing this right?

% ./drat-trim unsat1.cnf unsat1.drat -l unsat1.lrat
c turning on binary mode checking
c parsing input formula with 1 variables and 2 clauses
c WARNING: backward mode ignores deletion of (pseudo) unit clause [0] -1 0
c finished parsing, read 7 bytes from proof file
c found complementary unit clauses: -1
s VERIFIED
c verification time: 0.143 seconds

unsat1.lrat:

0

Running:

% ./lrat-check unsat1.cnf unsat1.lrat
c parsed a formula with 1 variables and 2 clauses
c Added clauses = 2.  Deleted clauses = 0.  Max live clauses = 2
c verification time = 0.00 secs

Trying to verify LRAT proof in ACL2:

% cd /home/i/Downloads/acl2/books/projects/sat/lrat/stobj-based

% ./run.sh ~/Downloads/drat-trim/unsat1.cnf ~/Downloads/drat-trim/unsat1.lrat

Stdout:

s FAILED
  (see /home/i/Downloads/drat-trim/unsat1.out)

unsat1.out:

HARD ACL2 ERROR in VALID-PROOFP$-TOP:  Invalid proof!
@krobelus
Copy link

krobelus commented Feb 7, 2022 via email

@DennisYurichev
Copy link
Author

Thanks a lot. But still can't run ACL2...

unsat1.cnf:

p cnf 1 2
1 0
-1 0

unsat1.lrat:

3 0 1 2 0

/home/i/Downloads/acl2/books/projects/sat/lrat/stobj-based

 % ./run.sh ~/Downloads/drat-trim/unsat1.cnf ~/Downloads/drat-trim/unsat1.lrat
s FAILED
  (see /home/i/Downloads/drat-trim/unsat1.out)

unsat1.out:

"HARD ACL2 ERROR in VALID-PROOFP$-TOP:  Invalid proof!"

( https://bpa.st/5E2A )

@krobelus
Copy link

krobelus commented Feb 7, 2022 via email

@DennisYurichev
Copy link
Author

Something utterly wrong. I did like you wrote.
SBCL 2.0.1.debian.
ACL2 from github.
zsh. Do you use bash?

I even made unsat1.cnf/lrat files using command line, as you did.

Weird, but at the same moment, tests that comes with acl2, passed:

 % ./run.sh ../tests/uuf-100-1.cnf ../tests/uuf-100-1.lrat
s VERIFIED
  (see ../tests/uuf-100-1.out)

 % ./run.sh ../tests/uuf-100-2.cnf ../tests/uuf-100-2.lrat
s VERIFIED
  (see ../tests/uuf-100-2.out)

 % ./run.sh ../tests/uuf-100-3.cnf ../tests/uuf-100-3.lrat
s VERIFIED
  (see ../tests/uuf-100-3.out)

@DennisYurichev
Copy link
Author

DennisYurichev commented Feb 7, 2022

Ohhhhh!
You wouldn't believe!
But a bug-report should be opened...

*.cnf and *.lrat files MUST NOT contain trailing empty line.
Like these in test files.

Probably, this ACL2 module author's should be notified...

Thanks for your help.

@DennisYurichev
Copy link
Author

Follow-up: probably another bug? acl2/acl2#1355

@DennisYurichev
Copy link
Author

Filed an issue: acl2/acl2#1359

@DennisYurichev
Copy link
Author

DennisYurichev commented Feb 8, 2022

@krobelus Know something about that?
acl2/acl2#1360
TIA!

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

No branches or pull requests

2 participants