[DRAT] DRAT data structure (#2767)
authorAlex Ozdemir <aozdemir@hmc.edu>
Sun, 6 Jan 2019 18:32:42 +0000 (19:32 +0100)
committerGitHub <noreply@github.com>
Sun, 6 Jan 2019 18:32:42 +0000 (19:32 +0100)
commit610952322417e3758f2b62300f618721c269b2b3
tree0680b2770b35cb0f688d853417391aa70c97af85
parent716626f2f41f51cda38834e5c9dc691b0c4fd664
[DRAT] DRAT data structure  (#2767)

* Copied old DRAT data-structure files.

Next step: clean up the code, and adapt them to our current usage plans.

* Polished the DRAT class.

Notably, removed the idea of lazy-parsing, this is now just a DRAT
wrapper class.

More explicit about whether methods handle binary or text.

Better constructor patterns

* Added implementation of textual DRAT output

* reordered the DratInstruction structure.
* removed the public modifier from the above struct
* removed the operator << implementation for DratInstruction

* use emplace_back

* Addressing Yoni's first review

* Extracted "write literal in DIMACS format" idea as a function
* Replaced some spurious Debug streams with `os`. (they were left over
from an earlier refactor)
* Improved some documentation

* Removed aside about std::string

* Addressed Mathias' comments

Specifically
* SCREAMING_SNAKE_CASED enum variants.
* Extracted some common logic from two branches of a conditional.
* Cleaned out some undefined behavior from bit manipulation.

* Unit tests for binary DRAT parsing

* Added text output test

* s/white/black/ derp
src/CMakeLists.txt
src/proof/drat/drat_proof.cpp [new file with mode: 0644]
src/proof/drat/drat_proof.h [new file with mode: 0644]
test/unit/CMakeLists.txt
test/unit/proof/CMakeLists.txt [new file with mode: 0644]
test/unit/proof/drat_proof_black.h [new file with mode: 0644]