Search in sources :

Example 6 with IdentityHashSet

use of kodkod.util.collections.IdentityHashSet in project org.alloytools.alloy by AlloyTools.

the class ReductionAndProofTest method reduce.

private Set<Node> reduce(Formula formula, int granularity) {
    solver.options().setCoreGranularity(granularity);
    final Solution sol = solver.solve(formula, bounds);
    assertEquals(Solution.Outcome.TRIVIALLY_UNSATISFIABLE, sol.outcome());
    sol.proof().minimize(null);
    return new IdentityHashSet<Node>(sol.proof().highLevelCore().values());
}
Also used : IdentityHashSet(kodkod.util.collections.IdentityHashSet) Solution(kodkod.engine.Solution)

Aggregations

IdentityHashSet (kodkod.util.collections.IdentityHashSet)6 Node (kodkod.ast.Node)4 Set (java.util.Set)3 Formula (kodkod.ast.Formula)3 AbstractVoidVisitor (kodkod.ast.visitor.AbstractVoidVisitor)3 LinkedHashSet (java.util.LinkedHashSet)2 BinaryFormula (kodkod.ast.BinaryFormula)2 NaryFormula (kodkod.ast.NaryFormula)2 Solution (kodkod.engine.Solution)2 AbstractSet (java.util.AbstractSet)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 Relation (kodkod.ast.Relation)1 AbstractDetector (kodkod.ast.visitor.AbstractDetector)1 VoidVisitor (kodkod.ast.visitor.VoidVisitor)1 RecordFilter (kodkod.engine.fol2sat.RecordFilter)1 TranslationRecord (kodkod.engine.fol2sat.TranslationRecord)1 NCEStrategy (kodkod.engine.ucore.NCEStrategy)1 TupleSet (kodkod.instance.TupleSet)1 IntSet (kodkod.util.ints.IntSet)1