@Override public List<PDefinition> caseAThreadDefinition(AThreadDefinition node) throws AnalysisException { List<PDefinition> result = new Vector<PDefinition>(); result.add(node.getOperationDef()); return result; }
@Override public PDefinition caseAThreadDefinition(AThreadDefinition node, Newquestion question) throws AnalysisException { return node.getOperationDef().apply(this, question); // PDefinitionAssistantTC.findName(definition.getOperationDef(), // sought, scope); }
@Override public NameValuePairList caseAThreadDefinition(AThreadDefinition def, Context initialContext) throws AnalysisException { return def.getOperationDef().apply(THIS, initialContext); }
@Override public LexNameList caseAThreadDefinition(AThreadDefinition node) throws AnalysisException { return node.getOperationDef() == null ? null : new LexNameList(node.getOperationDef().getName()); }
@Override public SDeclIR caseAThreadDefinition(AThreadDefinition node, IRInfo question) throws AnalysisException { PStm stm = node.getOperationDef().getBody(); SStmIR stmIR = stm.apply(question.getStmVisitor(), question); AThreadDeclIR threaddcl = new AThreadDeclIR(); threaddcl.setStm(stmIR); return threaddcl; }
if(node.getOperationDef() != null && !_visitedNodes.contains(node.getOperationDef())) node.getOperationDef().apply(this, question);
if(node.getOperationDef() != null && !_visitedNodes.contains(node.getOperationDef())) node.getOperationDef().apply(this);
if(node.getOperationDef() != null && !_visitedNodes.contains(node.getOperationDef())) node.getOperationDef().apply(this);
if(node.getOperationDef() != null && !_visitedNodes.contains(node.getOperationDef())) mergeReturns(retVal,node.getOperationDef().apply(this));
if(node.getOperationDef() != null && !_visitedNodes.contains(node.getOperationDef())) mergeReturns(retVal,node.getOperationDef().apply(this, question));
@Override public PType caseAThreadDefinition(AThreadDefinition node, TypeCheckInfo question) throws AnalysisException { question.scope = NameScope.NAMESANDSTATE; FlatEnvironment local = new FlatEnvironment(question.assistantFactory, question.assistantFactory.createPDefinitionAssistant().getSelfDefinition(node), question.env); PType rt = node.getStatement().apply(THIS, new TypeCheckInfo(question.assistantFactory, local, question.scope)); if (!(rt instanceof AVoidType) && !(rt instanceof AUnknownType)) { TypeCheckerErrors.report(3049, "Thread statement/operation must not return a value", node.getLocation(), node); } node.setType(rt); node.getOperationDef().setBody(node.getStatement().clone());// This // operation // is a // wrapper // for the // thread return rt; }
if (((AThreadDefinition) d).getOperationDef() != null)// Differnt from VDMJ return new LexNameList(((AThreadDefinition) d).getOperationDef().getName()); } else