@Override public ValueList caseASetEnumSetExp(ASetEnumSetExp exp, ObjectContext ctxt) throws AnalysisException { return af.createPExpAssistant().getValues(exp.getMembers(), ctxt); }
@Override public LexNameList caseASetEnumSetExp(ASetEnumSetExp expression) throws AnalysisException { return af.createPExpAssistant().getOldNames(expression.getMembers()); }
@Override public LexNameSet caseASetEnumSetExp(ASetEnumSetExp node, FreeVarInfo info) throws AnalysisException { LexNameSet names = new LexNameSet(); for (PExp exp: node.getMembers()) { names.addAll(exp.apply(this, info)); } return names; }
@Override public PExp caseASetEnumSetExp(ASetEnumSetExp exp, Integer lineno) throws AnalysisException { PExp found = findExpressionBaseCase(exp, lineno); if (found != null) { return found; } return af.createPExpAssistant().findExpression(exp.getMembers(), lineno); }
@Override public IProofObligationList caseASetEnumSetExp(ASetEnumSetExp node, IPOContextStack question) throws AnalysisException { IProofObligationList obligations = new ProofObligationList(); for (PExp e : node.getMembers()) { obligations.addAll(e.apply(mainVisitor, question)); } return obligations; }
@Override public SExpIR caseASetEnumSetExp(ASetEnumSetExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); if (!(type instanceof SSetType)) { log.error("Unexpected set type for set enumeration expression: " + type.getClass().getName() + " at " + node.getLocation()); } LinkedList<PExp> members = node.getMembers(); AEnumSetExpIR enumSet = new AEnumSetExpIR(); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); enumSet.setType(typeCg); LinkedList<SExpIR> membersCg = enumSet.getMembers(); for (PExp member : members) { SExpIR memberCg = member.apply(question.getExpVisitor(), question); if (memberCg != null) { membersCg.add(memberCg); } else { return null; } } return enumSet; }
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 Value caseASetEnumSetExp(ASetEnumSetExp node, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(node.getLocation(), ctxt); ValueSet values = new ValueSet(); for (PExp e : node.getMembers()) { values.add(e.apply(VdmRuntime.getExpressionEvaluator(), ctxt)); } return new SetValue(values); }
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 PType caseASetEnumSetExp(ASetEnumSetExp 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().isSet(question.constraint)) { PType setType = question.assistantFactory.createPTypeAssistant().getSet(question.constraint).getSetof(); elemConstraint = question.newConstraint(setType); } 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.newASetSetType(node.getLocation()) : AstFactory.newASet1SetType(node.getLocation(), ts.getType(node.getLocation()))); return question.assistantFactory.createPTypeAssistant().possibleConstraint(question.constraint, node.getType(), node.getLocation()); }
Iterator<PType> it = set.getTypes().iterator(); for (PExp m : set.getMembers())