up previous next
SAT.ConvertToCNF

Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to CNF. Writes the CNF to the file sat.cnf
Syntax
          
SAT.ConvertToCNF(SPE:LIST, CuttingNumber:INT, QStrategy:INT, CStrategy:INT)

          

Description
This function starts the conversion algorithm.

Example
-- quadratic system:
Use R::=ZZ/(2)[x[1..3]];
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];
F2:= x[2] + 1;
F3:= x[1]x[2] + x[3];
SPE:=[F1,F2,F3]; 
SAT.ConvertToCNF(SPE,4,0,0);
SAT.LaunchMiniSat("sat.cnf");
SAT.GetResult();
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);


Example
-- cubic system:
Use ZZ/(2)[x[1..3]];
F1:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1;
F2:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2];
F3:=x[1]x[2] + x[2]x[3] + x[2];
SPE:=[F1,F2,F3];
SAT.ConvertToCNF(SPE,4,0,0);
SAT.LaunchMiniSat("sat.cnf");
SAT.GetResult();
--Result: [0,0,1] Test with: Eval(SPE,[0,0,1]);