Skip to content

Add to_gcnf transformation and GDIMACS reader/writer#851

Draft
hbierlee wants to merge 17 commits intomasterfrom
feature/add-to-gcnf-transformation-and-writer
Draft

Add to_gcnf transformation and GDIMACS reader/writer#851
hbierlee wants to merge 17 commits intomasterfrom
feature/add-to-gcnf-transformation-and-writer

Conversation

@hbierlee
Copy link
Copy Markdown
Contributor

@hbierlee hbierlee commented Feb 9, 2026

With @OrestisLomis, a GDIMACS reader/writer supported by a to_gcnf function. The writer optionally follows the specification (https://satisfiability.org/competition/2011/rules.pdf) that groups of clauses have to be disjoint. Tested using roundtrips for most cases (i.e. write(read(gdimacs)) == gdimacs), except for missing groups, which could be fixed still. Perhaps interesting for @ThomSerg.

The to_gcnf is regarded the same as the make_assump_model, but also returns the hard clauses separately. This does make it a lot easier for some cases, but now it's a bit inconsistent, so I'm not sure what to do with that yet.

Also includes a fix for the solution generator in to_cnf tests.

@hbierlee hbierlee requested a review from ThomSerg February 9, 2026 12:36
@hbierlee hbierlee changed the title Add to_gcnf transformation and writer Add to_gcnf transformation and to_gdimacs reader/writer Feb 9, 2026
@hbierlee hbierlee marked this pull request as ready for review February 9, 2026 13:03
@hbierlee hbierlee changed the title Add to_gcnf transformation and to_gdimacs reader/writer Add to_gcnf transformation and GDIMACS reader/writer Feb 9, 2026
@tias tias marked this pull request as draft February 22, 2026 21:50
@tias
Copy link
Copy Markdown
Collaborator

tias commented Feb 22, 2026

Lets wait with this till #840 .. #842 is in

@hbierlee hbierlee self-assigned this Mar 2, 2026
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.

3 participants