@Override public LexNameList caseASeqEnumSeqExp(ASeqEnumSeqExp expression) throws AnalysisException { return af.createPExpAssistant().getOldNames(expression.getMembers()); }
@Override public ValueList caseASeqEnumSeqExp(ASeqEnumSeqExp exp, ObjectContext ctxt) throws AnalysisException { return af.createPExpAssistant().getValues(exp.getMembers(), ctxt); }
@Override public IProofObligationList caseASeqEnumSeqExp(ASeqEnumSeqExp node, IPOContextStack question) throws AnalysisException { IProofObligationList obligations = new ProofObligationList(); for (PExp e : node.getMembers()) { obligations.addAll(e.apply(mainVisitor, question)); } return obligations; }
@Override public PExp caseASeqEnumSeqExp(ASeqEnumSeqExp exp, Integer lineno) throws AnalysisException { PExp found = findExpressionBaseCase(exp, lineno); if (found != null) { return found; } return af.createPExpAssistant().findExpression(exp.getMembers(), lineno); }
@Override public LexNameSet caseASeqEnumSeqExp(ASeqEnumSeqExp node, FreeVarInfo info) throws AnalysisException { LexNameSet names = new LexNameSet(); for (PExp exp: node.getMembers()) { names.addAll(exp.apply(this, info)); } return names; }
List<PExp> copy = new ArrayList<PExp>(node.getMembers()); for( PExp e : copy)
List<PExp> copy = new ArrayList<PExp>(node.getMembers()); for( PExp e : copy)
List<PExp> copy = new ArrayList<PExp>(node.getMembers()); for( PExp e : copy)
@Override public SExpIR caseASeqEnumSeqExp(ASeqEnumSeqExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); AEnumSeqExpIR enumSeq = new AEnumSeqExpIR(); if (type instanceof SSeqType) { STypeIR typeCg = type.apply(question.getTypeVisitor(), question); enumSeq.setType(typeCg); } else { question.addUnsupportedNode(node, "Unexpected sequence type for sequence enumeration expression: " + type.getClass().getName()); return null; } LinkedList<PExp> members = node.getMembers(); for (PExp member : members) { SExpIR memberCg = member.apply(question.getExpVisitor(), question); if (memberCg != null) { enumSeq.getMembers().add(memberCg); } else { return null; } } return enumSeq; }
List<PExp> copy = new ArrayList<PExp>(node.getMembers()); for( PExp e : copy)
List<PExp> copy = new ArrayList<PExp>(node.getMembers()); for( PExp e : copy)
@Override public Value caseASeqEnumSeqExp(ASeqEnumSeqExp node, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(node.getLocation(), ctxt); ValueList values = new ValueList(); for (PExp e : node.getMembers()) { values.add(e.apply(VdmRuntime.getExpressionEvaluator(), ctxt)); } return new SeqValue(values); }
@Override public PType caseASeqEnumSeqExp(ASeqEnumSeqExp node, TypeCheckInfo question) throws AnalysisException { PTypeSet ts = new PTypeSet(question.assistantFactory); node.setTypes(new LinkedList<PType>()); List<PType> types = node.getTypes(); TypeCheckInfo elemConstraint = question; if (question.constraint != null && question.assistantFactory.createPTypeAssistant().isSeq(question.constraint)) { PType stype = question.assistantFactory.createPTypeAssistant().getSeq(question.constraint).getSeqof(); elemConstraint = question.newConstraint(stype); } for (PExp ex : node.getMembers()) { question.qualifiers = null; PType mt = ex.apply(THIS, elemConstraint); ts.add(mt); types.add(mt); } node.setType(ts.isEmpty() ? AstFactory.newASeqSeqType(node.getLocation()) : AstFactory.newASeq1SeqType(node.getLocation(), ts.getType(node.getLocation()))); return question.assistantFactory.createPTypeAssistant().possibleConstraint(question.constraint, node.getType(), node.getLocation()); }
Iterator<PType> it = seq.getTypes().iterator(); for (PExp m : seq.getMembers())