/** * Returns a deep clone of this {@link ASeqEnumSeqExp} node. * @return a deep clone of this {@link ASeqEnumSeqExp} node */ public ASeqEnumSeqExp clone() { return new ASeqEnumSeqExp( _type, _location, cloneList(_members), _types ); }
/** * Creates a deep clone of this {@link ASeqEnumSeqExp} 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 ASeqEnumSeqExp} node */ public ASeqEnumSeqExp clone(Map<INode,INode> oldToNewMap) { ASeqEnumSeqExp node = new ASeqEnumSeqExp( _type, _location, cloneList(_members, oldToNewMap), _types ); oldToNewMap.put(this, node); return node; }
public static ASeqEnumSeqExp newASeqEnumSeqExp(ILexLocation start) { ASeqEnumSeqExp result = new ASeqEnumSeqExp(); initExpression(result, start); result.setMembers(new Vector<PExp>()); return result; }
public static ASeqEnumSeqExp newASeqEnumSeqExp(ILexLocation start, List<PExp> members) { ASeqEnumSeqExp result = new ASeqEnumSeqExp(); initExpression(result, start); result.setMembers(members); return result; }
public PExp caseASeqPattern(ASeqPattern node) throws AnalysisException { ASeqEnumSeqExp seq = new ASeqEnumSeqExp(); List<PExp> values = new Vector<PExp>(); for (PPattern p : node.getPlist()) { values.add(p.apply(this).clone()); } seq.setMembers(values); return addPossibleType(seq, node); }
public NonEmptySeqObligation(PExp exp, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(exp, POType.NON_EMPTY_SEQ, ctxt, exp.getLocation(), af); // exp <> [] ASeqEnumSeqExp seqExp = new ASeqEnumSeqExp(); seqExp.setMembers(new LinkedList<PExp>()); // empty list seqExp.setType(AstFactory.newASeqSeqType(null, new AUnknownType())); ANotEqualBinaryExp notEqualsExp = AstExpressionFactory.newANotEqualBinaryExp(exp.clone(), seqExp); stitch = notEqualsExp; valuetree.setPredicate(ctxt.getPredWithContext(notEqualsExp)); } }
ne.setLeft(exp); ne.setOp(new LexKeywordToken(VDMToken.NE, exp.getLocation())); ASeqEnumSeqExp empty = new ASeqEnumSeqExp(); empty.setMembers(new Vector<PExp>()); ne.setRight(empty);