@Override public List<PDefinition> caseAImplicitFunctionDefinition( AImplicitFunctionDefinition node) throws AnalysisException { List<PDefinition> defs = new Vector<PDefinition>(); defs.add(node); if (node.getPredef() != null) { defs.add(node.getPredef()); } if (node.getPostdef() != null) { defs.add(node.getPostdef()); } if (node.getMeasureDef() != null && node.getMeasureName().getName().startsWith("measure_")) { defs.add(node.getMeasureDef()); } return defs; }
public RecursiveObligation(AImplicitFunctionDefinition def, AApplyExp apply, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(def, POType.RECURSIVE, ctxt, apply.getLocation(), af); PExp measureLeft_exp = buildMeasureLeft(def, apply); PExp measureRight_exp = buildMeasureRight(def, apply); PExp lt_exp = buildStructuralComparison(measureLeft_exp, measureRight_exp, getLex(def.getMeasureDef())); stitch = lt_exp; valuetree.setPredicate(ctxt.getPredWithContext(lt_exp)); }
@Override public PDefinition caseAImplicitFunctionDefinition( AImplicitFunctionDefinition node, Newquestion question) throws AnalysisException { if (af.createPDefinitionAssistant().findNameBaseCase(node, question.sought, question.scope) != null) { return node; } PDefinition predef = node.getPredef(); if (predef != null && predef.apply(this, question) != null)// PDefinitionAssistantTC.findName(predef, sought, // scope) != null) { return predef; } PDefinition postdef = node.getPostdef(); if (postdef != null && postdef.apply(this, question) != null) // PDefinitionAssistantTC.findName(postdef, // sought, scope) != null) { return postdef; } PDefinition measureDef = node.getMeasureDef(); if (measureDef != null && measureDef.apply(this, question) != null) { return measureDef; } return null; }
if(node.getMeasureDef() != null && !_visitedNodes.contains(node.getMeasureDef())) node.getMeasureDef().apply(this, question);
if(node.getMeasureDef() != null && !_visitedNodes.contains(node.getMeasureDef())) node.getMeasureDef().apply(this);
if(node.getMeasureDef() != null && !_visitedNodes.contains(node.getMeasureDef())) node.getMeasureDef().apply(this);
if (def.getMeasureDef() != null && def.getMeasureName().toString().startsWith("measure_")) nvl.add(new NameValuePair(def.getMeasureName(), new FunctionValue(def.getMeasureDef(), null, null, null)));
if(node.getMeasureDef() != null && !_visitedNodes.contains(node.getMeasureDef())) mergeReturns(retVal,node.getMeasureDef().apply(this));
if(node.getMeasureDef() != null && !_visitedNodes.contains(node.getMeasureDef())) mergeReturns(retVal,node.getMeasureDef().apply(this, question));
if (node.getMeasureDef() != null && node.getMeasureName() != null && node.getMeasureName().getName().startsWith("measure_")) obligations.addAll(node.getMeasureDef().apply(rootVisitor, question)); question.pop();