Examples of IntBitSet


Examples of kodkod.util.ints.IntBitSet

    }
   
    posVars.retainAll(negVars);
   
    assert !posVars.isEmpty();
    final IntSet ret = new IntBitSet(posVars.max()+1);
    ret.addAll(posVars);
   
    return ret;
  }
View Full Code Here

Examples of kodkod.util.ints.IntBitSet

   */
  static IntSet clausesFor(ResolutionTrace trace, IntSet relevantVars) {
//    System.out.println("relevant: " + relevantVars);
    final IntSet axioms = trace.axioms();

    final IntSet reachableVars = new IntBitSet(relevantVars.max()+1);
    reachableVars.addAll(relevantVars);

    final IntSet relevantAxioms = new IntBitSet(axioms.size());
   
    final Iterator<Clause> itr = trace.reverseIterator(axioms);
    for(int i = axioms.max(); i >= 0; i--) {
      Clause clause = itr.next();
      int maxVar = clause.maxVariable();
      if (reachableVars.contains(maxVar)) {
        for(IntIterator lits = clause.literals(); lits.hasNext(); ) {
          reachableVars.add(StrictMath.abs(lits.next()));
        }
        relevantAxioms.add(i);
      }
    }
   
    return  relevantAxioms;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.