up previous next
SAT.FixBits

Allows to fix chosen bits in advance within a SAT input file. The new input file is sat_fixed.cnf.
Syntax
          
SAT.FixBits(BitList:LIST, File:STRING)

          

Description


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.FixBits([[1,0],[2,1]],"sat.cnf"); -- fixes x[1]=0 and x[2]=1
SAT.LaunchMiniSat("sat_fixed.cnf");
SAT.GetResult();
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);