public AND(SemanticContext a, SemanticContext b) {Set<SemanticContext> operands = new HashSet<SemanticContext>();if ( a instanceof AND ) operands.addAll(Arrays.asList(((AND)a).opnds));else operands.add(a);if ( b instanceof AND ) operands.addAll(Arrays.asList(((AND)b).opnds));else operands.add(b);List<PrecedencePredicate> precedencePredicates = filterPrecedencePredicates(operands);if (!precedencePredicates.isEmpty()) {PrecedencePredicate reduced = Collections.min(precedencePredicates);operands.add(reduced);}opnds = operands.toArray(new SemanticContext[operands.size()]);}

public AND(SemanticContext a, SemanticContext b){HashSet<SemanticContext> operands = new HashSet<SemanticContext>();if (a is SemanticContext.AND){operands.UnionWith(((AND)a).opnds);}else{operands.Add(a);}if (b is SemanticContext.AND){operands.UnionWith(((AND)b).opnds);}else{operands.Add(b);}IList<SemanticContext.PrecedencePredicate> precedencePredicates = FilterPrecedencePredicates(operands);if (precedencePredicates.Count > 0){SemanticContext.PrecedencePredicate reduced = precedencePredicates.Min();operands.Add(reduced);}opnds = operands.ToArray();}
