public DomainRestoreInfo reduceDomains(CSP csp){
  DomainRestoreInfo result=new DomainRestoreInfo();
  Queue<Variable> queue=QueueFactory.<Variable>createLifoQueue();
  for (  Variable var : csp.getVariables())   queue.add(var);
  reduceDomains(queue,csp,result);
  return result.compactify();
}

public DomainRestoreInfo reduceDomains ( CSP csp ) { DomainRestoreInfo result = new DomainRestoreInfo ( ) ; Queue < Variable > queue = QueueFactory . < Variable > createLifoQueue ( ) ; for ( Variable var : csp . getVariables ( ) ) queue . add ( var ) ; reduceDomains ( queue , csp , result ) ; return result . compactify ( ) ; }
makes a csp consisting of binary constraints arc - consistent .
