internal void Refine(IBooleanAlgebra <S> solver, S newSet) { var set_cap_newSet = solver.MkAnd(set, newSet); if (!solver.IsSatisfiable(set_cap_newSet)) { return; //set is disjoint from newSet } if (solver.AreEquivalent(set, set_cap_newSet)) { return; //set is a subset of newSet } var set_minus_newSet = solver.MkAnd(set, solver.MkNot(newSet)); if (left == null) //leaf { left = new PartTree(set_cap_newSet, null, null); right = new PartTree(set_minus_newSet, null, null); } else { left.Refine(solver, newSet); right.Refine(solver, newSet); } }
/// <summary> /// Returns true iff the first components are equivalent and the second components are equivalent. /// </summary> public bool AreEquivalent(Pair <S, T> predicate1, Pair <S, T> predicate2) { return(first.AreEquivalent(predicate1.First, predicate2.First) && second.AreEquivalent(predicate1.Second, predicate2.Second)); }
/// <summary> /// Returns true iff the first components are equivalent and the second components are equivalent. /// </summary> public bool AreEquivalent(Tuple <S, T> predicate1, Tuple <S, T> predicate2) { return(first.AreEquivalent(predicate1.Item1, predicate2.Item1) && second.AreEquivalent(predicate1.Item2, predicate2.Item2)); }