private static List<PExp> getResults(AlternativeExp alternativeExp) { List<PExp> result = new LinkedList<PExp>(); for (AltItemExp aie : alternativeExp.getAlternatives()) { if (aie.getTest() != null) { result.add(PExp.buildPExp(aie.getAssignment())); } } return result; }
private static PExp getOtherwiseClauseResult(AlternativeExp alternativeExp) { PExp workingOtherwiseClauseResult = null; for (AltItemExp aie : alternativeExp.getAlternatives()) { if (workingOtherwiseClauseResult != null) { throw new IllegalArgumentException( "AlternativeExps with " + "additional alternatives after the 'otherwise' " + "clause are not accepted by the prover. \n\t" + aie.getAssignment() + " appears in such a position."); } if (aie.getTest() == null) { workingOtherwiseClauseResult = PExp.buildPExp(aie.getAssignment()); } } return workingOtherwiseClauseResult; }