public ValueBindingObligation(PPattern pattern, PType type, PExp exp, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(pattern, POType.VALUE_BINDING, ctxt, pattern.getLocation(), af); AExistsExp existsExp = new AExistsExp(); List<PPattern> patternList = new Vector<PPattern>(); patternList.add(pattern.clone()); ATypeMultipleBind typeBind = new ATypeMultipleBind(); typeBind.setPlist(patternList); typeBind.setType(type.clone()); List<PMultipleBind> bindList = new Vector<PMultipleBind>(); bindList.add(typeBind); existsExp.setBindList(bindList); AEqualsBinaryExp equals = AstExpressionFactory.newAEqualsBinaryExp(patternToExp(pattern.clone()), exp.clone()); existsExp.setPredicate(equals); stitch = existsExp; valuetree.setPredicate(ctxt.getPredWithContext(existsExp)); // valuetree.setContext(ctxt.getContextNodeList()); } }
private AVarDeclIR consLocalVarDecl(AEqualsDefinition equalsDef, IRInfo question) throws AnalysisException { STypeIR type = equalsDef.getExpType().apply(question.getTypeVisitor(), question); SPatternIR pattern = equalsDef.getPattern().apply(question.getPatternVisitor(), question); SExpIR exp = equalsDef.getTest().apply(question.getExpVisitor(), question); return consLocalVarDecl(equalsDef, type, pattern, exp); }
if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) node.getPattern().apply(this);
if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) node.getPattern().apply(this);
if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) node.getPattern().apply(this, question);
if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) mergeReturns(retVal,node.getPattern().apply(this));
if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) mergeReturns(retVal,node.getPattern().apply(this, question));
if (def.getPattern() != null) nvpl = af.createPPatternAssistant().getNamedValues(def.getPattern(), v, initialContext); } catch (PatternMatchException e)
PPattern pattern = node.getPattern(); if (pattern != null)
PPattern pattern = node.getPattern();