protected List<PMultipleBind> cloneListMultipleBind( List<PMultipleBind> binds) { List<PMultipleBind> r = new LinkedList<PMultipleBind>(); for (PMultipleBind bind : binds) { r.add(bind.clone()); } return r; }
private List<PMultipleBind> cloneBinds(List<PMultipleBind> multipleBindList) { List<PMultipleBind> r = new LinkedList<PMultipleBind>(); for (PMultipleBind pmb : multipleBindList) { r.add(pmb.clone()); } return r; }
public LetBeExistsObligation(ALetBeStStm stmt, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(stmt, POType.LET_BE_EXISTS, ctxt, stmt.getBind().getLocation(), af); AExistsExp exists = new AExistsExp(); List<PMultipleBind> bindList = new Vector<PMultipleBind>(); bindList.add(stmt.getBind().clone()); exists.setBindList(bindList); if (stmt.getSuchThat() != null) { exists.setPredicate(stmt.getSuchThat().clone()); } else { // we just use true since we cannot have // exists by itself ABooleanConstExp replacementNothing_exp = new ABooleanConstExp(); replacementNothing_exp.setValue(new LexBooleanToken(true, null)); exists.setPredicate(replacementNothing_exp); } stitch = exists; valuetree.setPredicate(ctxt.getPredWithContext(exists)); } }
public LetBeExistsObligation(ALetBeStExp exp, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(exp, POType.LET_BE_EXISTS, ctxt, exp.getBind().getLocation(), af); /** * let <binds> be st <predicate> in <exp> produces exists <binds> & <predicate> */ AExistsExp exists = new AExistsExp(); List<PMultipleBind> bindList = new Vector<PMultipleBind>(); bindList.add(exp.getBind().clone()); exists.setBindList(bindList); if (exp.getSuchThat() != null) { exists.setPredicate(exp.getSuchThat().clone()); } else { // we just use true since we cannot have // exists by itself ABooleanConstExp replacementNothing_exp = new ABooleanConstExp(); replacementNothing_exp.setValue(new LexBooleanToken(true, null)); exists.setPredicate(replacementNothing_exp); } stitch = exists; valuetree.setPredicate(ctxt.getPredWithContext(exists)); }