Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 836 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 836 Bytes

Tseitin transformation

DNF DIMACS to CNF DIMACS converter

Tseitin transformation takes input file in DNF DIMACS format and produces output file in CNF DIMACS format.

Usage examples:

DNFFile.DNFFileBuilder dnfFileBuilder = new DNFFile.DNFFileBuilder();
DNFFile input = dnfFileBuilder.filepath("source filename").build();
TseitinTransformation tseitinTransformation = new TseitinTransformation(input);
CNFFile output = tseitinTransformation.convertDNFToCNF();
output.save("target filename");
DNFFile.DNFFileBuilder dnfFileBuilder = new DNFFile.DNFFileBuilder();
DNFFile input = dnfFileBuilder.name("name").text("content").build();
TseitinTransformation tseitinTransformation = new TseitinTransformation(input);
CNFFile output = tseitinTransformation.convertDNFToCNF();
String text = output.getText();