@Override public IProofObligationList caseANotUnaryExp(ANotUnaryExp node, IPOContextStack question) throws AnalysisException { return node.getExp().apply(mainVisitor, question); }
/** * Called by the {@link ANotUnaryExp} node from {@link ANotUnaryExp#apply(IAnalysis)}. * @param node the calling {@link ANotUnaryExp} node */ public void caseANotUnaryExp(ANotUnaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inANotUnaryExp(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this, question); } outANotUnaryExp(node, question); }
/** * Called by the {@link ANotUnaryExp} node from {@link ANotUnaryExp#apply(IAnalysis)}. * @param node the calling {@link ANotUnaryExp} node */ public void caseANotUnaryExp(ANotUnaryExp node) throws AnalysisException { _visitedNodes.add(node); inANotUnaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outANotUnaryExp(node); }
/** * Called by the {@link ANotUnaryExp} node from {@link ANotUnaryExp#apply(IPOFAnalysis)}. * @param node the calling {@link ANotUnaryExp} node */ public void caseANotUnaryExp(ANotUnaryExp node) throws AnalysisException { _visitedNodes.add(node); inANotUnaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outANotUnaryExp(node); }
/** * Called by the {@link ANotUnaryExp} node from {@link ANotUnaryExp#apply(IAnalysis)}. * @param node the calling {@link ANotUnaryExp} node */ public A caseANotUnaryExp(ANotUnaryExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inANotUnaryExp(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this)); } mergeReturns(retVal,outANotUnaryExp(node)); return retVal; }
/** * Called by the {@link ANotUnaryExp} node from {@link ANotUnaryExp#apply(IAnalysis)}. * @param node the calling {@link ANotUnaryExp} node */ public A caseANotUnaryExp(ANotUnaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inANotUnaryExp(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this, question)); } mergeReturns(retVal,outANotUnaryExp(node, question)); return retVal; }
@Override public Value caseANotUnaryExp(ANotUnaryExp node, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(node.getLocation(), ctxt); try { Value v = node.getExp().apply(VdmRuntime.getExpressionEvaluator(), ctxt); return v.isUndefined() ? v : new BooleanValue(!v.boolValue(ctxt)); } catch (ValueException e) { return VdmRuntimeError.abort(node.getLocation(), e); } }
@Override public PType caseANotUnaryExp(ANotUnaryExp node, TypeCheckInfo question) throws AnalysisException { PExp exp = node.getExp(); question.qualifiers = null; PType t = exp.apply(THIS, question.newConstraint(null)); if (!question.assistantFactory.createPTypeAssistant().isType(t, ABooleanBasicType.class)) { TypeCheckerErrors.report(3137, "Not expression is not a boolean", node.getLocation(), node); } node.setType(AstFactory.newABooleanBasicType(node.getLocation())); return question.assistantFactory.createPTypeAssistant().checkConstraint(question.constraint, node.getType(), node.getLocation()); }