/** * Creates a deep clone of this {@link AWhileStm} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AWhileStm} node */ public AWhileStm clone(Map<INode,INode> oldToNewMap) { AWhileStm node = new AWhileStm( _location, _type, cloneNode(_exp, oldToNewMap), cloneNode(_statement, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AWhileStm} node. * @return a deep clone of this {@link AWhileStm} node */ public AWhileStm clone() { return new AWhileStm( _location, _type, cloneNode(_exp), cloneNode(_statement) ); }
public static AWhileStm newAWhileStm(ILexLocation token, PExp exp, PStm body) { AWhileStm result = new AWhileStm(); initStatement(result, token); result.setExp(exp); result.setStatement(body); return result; }
public WhileLoopObligation(AWhileStm stmt, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(stmt, POType.WHILE_LOOP, ctxt, stmt.getLocation(), af); AWhileStm whileStmt = new AWhileStm(); whileStmt.setExp(stmt.getExp().clone()); whileStmt.setStatement(new ASkipStm()); AVariableExp nyexp = getVarExp(new LexNameToken("", "...", null)); valuetree.setPredicate(nyexp); // valuetree.setPredicate(whileStmt); // valuetree.setContext(ctxt.getContextNodeList()); } }