/** * Constructor that generates an iterator pointing to the first * APElement. * @param ap_set the underlying APSet * @param m the APMonom over which we iterate */ public APMonom2APElements(APSet ap_set, APMonom m) { _ap_set = ap_set; _m = m; _cur_e = new APElement(m.getValueBits()); _end_marker = false; if (m.isFalse()) { _end_marker = true; } }
/** * Performs an intersection check. * @param m1 the first APMonom * @param m2 the second APMonom * @return <b>true</b> if the intersection of <i>m1</i> and <i>m2</i> is empty. */ public static bool isIntersectionEmpty(APMonom m1, APMonom m2) { // check if there are contradicting values int set_in_both = m1.getSetBits().bitset & m2.getSetBits().bitset; if ((m1.getValueBits().bitset & set_in_both) != (m2.getValueBits().bitset & set_in_both)) { // contradiction return(true); } else { return(false); } }
/** * Performs an intersection check. * @param m1 the first APMonom * @param m2 the second APMonom * @return <b>true</b> if the intersection of <i>m1</i> and <i>m2</i> is empty. */ public static bool isIntersectionEmpty(APMonom m1, APMonom m2) { // check if there are contradicting values int set_in_both = m1.getSetBits().bitset & m2.getSetBits().bitset; if ((m1.getValueBits().bitset & set_in_both) != (m2.getValueBits().bitset & set_in_both)) { // contradiction return true; } else { return false; } }