private PExp buildMeasureRight(AImplicitFunctionDefinition def, AApplyExp apply) { return buildMeasureRightParams(apply, def.getMeasureName(), def.getActualResult()); }
private PExp buildMeasureLeft(AImplicitFunctionDefinition def, AApplyExp apply) throws AnalysisException { List<PPattern> paramPatterns = new LinkedList<PPattern>(); for (APatternListTypePair pair : def.getParamPatterns()) { paramPatterns.addAll(pair.getPatterns()); } return buildMeasureLeftParams(apply, def.getTypeParams(), def.getActualResult(), def.getMeasureName(), paramPatterns); }
@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 FunctionValue(AImplicitFunctionDefinition def, FunctionValue precondition, FunctionValue postcondition, Context freeVariables) { this.location = def.getLocation(); this.name = def.getName().getName(); this.typeValues = null; this.type = (AFunctionType) def.getType(); this.paramPatternList = new Vector<List<PPattern>>(); PatternListTC plist = Interpreter.getInstance().getAssistantFactory().createPatternList(); for (APatternListTypePair ptp : def.getParamPatterns()) { plist.addAll(ptp.getPatterns()); } this.paramPatternList.add(plist); this.body = def.getBody(); this.result = def.getResult(); this.precondition = precondition; this.postcondition = postcondition; this.freeVariables = freeVariables; this.checkInvariants = true; this.classdef = def.getClassDefinition(); if (Settings.measureChecks && def.getMeasureName() != null) { measureName = def.getMeasureName(); measureValues = Collections.synchronizedMap(new HashMap<Long, Stack<Value>>()); } }
if (def.getMeasureDef() != null && def.getMeasureName().toString().startsWith("measure_")) nvl.add(new NameValuePair(def.getMeasureName(), new FunctionValue(def.getMeasureDef(), null, null, null)));
if(node.getMeasureName() != null ) node.getMeasureName().apply(this);
if(node.getMeasureName() != null ) node.getMeasureName().apply(this, question);
if(node.getMeasureName() != null ) node.getMeasureName().apply(this);
if(node.getMeasureName() != null ) mergeReturns(retVal,node.getMeasureName().apply(this));
if(node.getMeasureName() != null ) mergeReturns(retVal,node.getMeasureName().apply(this, question));
if (node.getMeasureDef() != null && node.getMeasureName() != null && node.getMeasureName().getName().startsWith("measure_")) question.push(new PONameContext(new LexNameList(node.getMeasureName()))); obligations.addAll(node.getMeasureDef().apply(rootVisitor, question)); question.pop();
if (def.getMeasureName() != null)