kodkod.util.ints.TreeSequence Java Examples
The following examples show how to use
kodkod.util.ints.TreeSequence.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DynamicRCEStrategy.java From org.alloytools.alloy with Apache License 2.0 | 6 votes |
/** * Constructs an ARCE strategy that will use the given translation log to relate * the cnf clauses back to the logic constraints from which they were generated. * * @ensures this.hardnessCutOff' = hardnessCutOff and this.recycleLimit' = * recycleLimit and this.noRecycleRatio' = noRecycleRatio */ public DynamicRCEStrategy(final TranslationLog log, double noRecycleRatio, double hardnessCutOff, double recycleLimit) { if (noRecycleRatio < 0 || noRecycleRatio > 1) throw new IllegalArgumentException("noRecycleRatio must be in [0..1]: " + noRecycleRatio); if (hardnessCutOff < 1) throw new IllegalArgumentException("hardnessCutOff must be >=1: " + hardnessCutOff); if (recycleLimit < 1) throw new IllegalArgumentException("recycleLimit must be >=1: " + recycleLimit); this.noRecycleRatio = noRecycleRatio; this.hardnessCutOff = hardnessCutOff; this.recycleLimit = recycleLimit; this.hits = new TreeSequence<IntSet>(); for (IntIterator itr = StrategyUtils.rootVars(log).iterator(); itr.hasNext();) { hits.put(itr.next(), null); } }
Example #2
Source File: DynamicRCEStrategy.java From kodkod with MIT License | 6 votes |
/** * Constructs an ARCE strategy that will use the given translation * log to relate the cnf clauses back to the logic constraints from * which they were generated. * @ensures this.hardnessCutOff' = hardnessCutOff and this.recycleLimit' = recycleLimit and * this.noRecycleRatio' = noRecycleRatio */ public DynamicRCEStrategy(final TranslationLog log, double noRecycleRatio, double hardnessCutOff, double recycleLimit) { if (noRecycleRatio<0 || noRecycleRatio>1) throw new IllegalArgumentException("noRecycleRatio must be in [0..1]: " + noRecycleRatio); if (hardnessCutOff < 1) throw new IllegalArgumentException("hardnessCutOff must be >=1: " + hardnessCutOff); if (recycleLimit < 1) throw new IllegalArgumentException("recycleLimit must be >=1: " + recycleLimit); this.noRecycleRatio = noRecycleRatio; this.hardnessCutOff = hardnessCutOff; this.recycleLimit = recycleLimit; this.hits = new TreeSequence<IntSet>(); for(IntIterator itr = StrategyUtils.rootVars(log).iterator(); itr.hasNext(); ) { hits.put(itr.next(), null); } }
Example #3
Source File: Bounds.java From org.alloytools.alloy with Apache License 2.0 | 5 votes |
/** * Constructs new Bounds over the given universe. * * @ensures this.universe' = universe && no this.relations' && no this.intBound' * @throws NullPointerException universe = null */ public Bounds(Universe universe) { this.factory = universe.factory(); this.lowers = new LinkedHashMap<Relation,TupleSet>(); this.uppers = new LinkedHashMap<Relation,TupleSet>(); this.intbounds = new TreeSequence<TupleSet>(); this.relations = relations(lowers, uppers); this.atom2rel = new HashMap<Object,Relation>(); }
Example #4
Source File: Bounds.java From kodkod with MIT License | 5 votes |
/** * Constructs new Bounds over the given universe. * @ensures this.universe' = universe && no this.relations' && no this.intBound' * @throws NullPointerException universe = null */ public Bounds(Universe universe) { this.factory = universe.factory(); this.lowers = new LinkedHashMap<Relation, TupleSet>(); this.uppers = new LinkedHashMap<Relation, TupleSet>(); this.intbounds = new TreeSequence<TupleSet>(); this.relations = relations(lowers, uppers); }
Example #5
Source File: Instance.java From kodkod with MIT License | 5 votes |
/** * Constructs an empty instance over the given universe * * @ensures this.universe' = universe && no this.tuples' * @throws NullPointerException universe = null */ public Instance(final Universe universe) { if (universe==null) throw new NullPointerException("universe=null"); this.universe = universe; this.tuples = new LinkedHashMap<Relation, TupleSet>(); this.ints = new TreeSequence<TupleSet>(); }
Example #6
Source File: SparseSequenceTest.java From org.alloytools.alloy with Apache License 2.0 | 4 votes |
@Override protected void setUp() throws Exception { s0 = new TreeSequence<Integer>(); }
Example #7
Source File: SparseSequenceTest.java From kodkod with MIT License | 4 votes |
@Before public void setUp() throws Exception { s0 = new TreeSequence<Integer>(); }
Example #8
Source File: Simplifier.java From quetzal with Eclipse Public License 2.0 | 4 votes |
/** * Constructs a new simplifier with the empties sequence initializes with * Expression.NONE and Nodes.NONE2. */ Simplifier() { this(new TreeSequence<Expression>(), new TreeSequence<IntConstant>()); empties.put(1, Expression.NONE); empties.put(2, Nodes.NONE2); }
Example #9
Source File: Instance.java From org.alloytools.alloy with Apache License 2.0 | 2 votes |
/** * Constructs an empty instance over the given universe * * @ensures this.universe' = universe && no this.tuples' * @throws NullPointerException universe = null */ public Instance(final Universe universe) { this(universe, new LinkedHashMap<Relation,TupleSet>(), new TreeSequence<TupleSet>()); }
Example #10
Source File: BooleanAccumulator.java From org.alloytools.alloy with Apache License 2.0 | 2 votes |
/** * Constructs a new accumulator with the given operator. * * @requires op != null * @ensures this.op' = op && this.label' = label */ private BooleanAccumulator(Operator.Nary op) { this.op = op; inputs = new TreeSequence<BooleanValue>(); // inputs = new ArrayList<BooleanValue>(); }
Example #11
Source File: BooleanAccumulator.java From kodkod with MIT License | 2 votes |
/** * Constructs a new accumulator with the given * operator. * @requires op != null * @ensures this.op' = op && this.label' = label */ private BooleanAccumulator(Operator.Nary op) { this.op = op; inputs = new TreeSequence<BooleanValue>(); // inputs = new ArrayList<BooleanValue>(); }