Program: 51268
Project: 51268
Buggy source:
protected void defineFunctions(){
  defineReserved("String_Node_Str");
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Empty,Category.Empty,new int[0]){
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(HierarchyDimensionFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      Dimension dimension=((DimensionExpr)call.getArg(0)).getDimension();
      return new ConstantCalc(DimensionType.forDimension(dimension),dimension);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{levelCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          Level level=levelCalc.evaluateLevel(evaluator);
          return level.getDimension();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{memberCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return member.getDimension();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      return DimensionType.Unknown;
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final IntegerCalc integerCalc=compiler.compileInteger(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{integerCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          int n=integerCalc.evaluateInteger(evaluator);
          return nthDimension(evaluator,n);
        }
      }
;
    }
    Dimension nthDimension(    Evaluator evaluator,    int n){
      Cube cube=evaluator.getCube();
      Dimension[] dimensions=cube.getDimensions();
      if (n >= dimensions.length || n < 0) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return dimensions[n];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      return DimensionType.Unknown;
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{stringCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          String dimensionName=stringCalc.evaluateString(evaluator);
          return findDimension(dimensionName,evaluator);
        }
      }
;
    }
    Dimension findDimension(    String s,    Evaluator evaluator){
      if (s.indexOf("String_Node_Str") == -1) {
        s=Util.quoteMdxIdentifier(s);
      }
      OlapElement o=evaluator.getSchemaReader().lookupCompound(evaluator.getCube(),parseIdentifier(s),false,Category.Dimension);
      if (o instanceof Dimension) {
        return (Dimension)o;
      }
 else       if (o == null) {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str");
      }
 else {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str"+ o);
      }
    }
  }
);
  define(LevelHierarchyFunDef.instance);
  define(MemberHierarchyFunDef.instance);
  define(MemberLevelFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      final Type argType=args[0].getType();
      return LevelType.forType(argType);
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      final IntegerCalc ordinalCalc=compiler.compileInteger(call.getArg(1));
      return new AbstractLevelCalc(call,new Calc[]{hierarchyCalc,ordinalCalc}){
        public Level evaluateLevel(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          int ordinal=ordinalCalc.evaluateInteger(evaluator);
          return nthLevel(hierarchy,ordinal);
        }
      }
;
    }
    Level nthLevel(    Hierarchy hierarchy,    int n){
      Level[] levels=hierarchy.getLevels();
      if (n >= levels.length || n < 0) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return levels[n];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      final Type argType=args[0].getType();
      return LevelType.forType(argType);
    }
    public Calc compileCall(    final ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      final StringCalc nameCalc=compiler.compileString(call.getArg(1));
      return new AbstractLevelCalc(call,new Calc[]{hierarchyCalc,nameCalc}){
        public Level evaluateLevel(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          String name=nameCalc.evaluateString(evaluator);
          for (          Level level : hierarchy.getLevels()) {
            if (level.getName().equals(name)) {
              return level;
            }
          }
          throw newEvalException(call.getFunDef(),"String_Node_Str" + name + "String_Node_Str"+ hierarchy+ "String_Node_Str");
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      final Type argType=args[0].getType();
      return LevelType.forType(argType);
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractLevelCalc(call,new Calc[]{stringCalc}){
        public Level evaluateLevel(        Evaluator evaluator){
          String levelName=stringCalc.evaluateString(evaluator);
          return findLevel(evaluator,levelName);
        }
      }
;
    }
    Level findLevel(    Evaluator evaluator,    String s){
      Cube cube=evaluator.getCube();
      OlapElement o=(s.startsWith("String_Node_Str")) ? evaluator.getSchemaReader().lookupCompound(cube,parseIdentifier(s),false,Category.Level) : null;
      if (o instanceof Level) {
        return (Level)o;
      }
 else       if (o == null) {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str");
      }
 else {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str"+ o);
      }
    }
  }
);
  define(IsEmptyFunDef.FunctionResolver);
  define(IsEmptyFunDef.PostfixResolver);
  define(IsNullFunDef.Resolver);
  define(IsFunDef.Resolver);
  define(AncestorFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      final MemberCalc ancestorMemberCalc=compiler.compileMember(call.getArg(1));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc,ancestorMemberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          Member ancestorMember=ancestorMemberCalc.evaluateMember(evaluator);
          return cousin(evaluator.getSchemaReader(),member,ancestorMember);
        }
      }
;
    }
  }
);
  define(DimensionCurrentMemberFunDef.instance);
  define(HierarchyCurrentMemberFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return member.getDataMember();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{dimensionCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return evaluator.getSchemaReader().getHierarchyDefaultMember(dimension.getHierarchies()[0]);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{hierarchyCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return evaluator.getSchemaReader().getHierarchyDefaultMember(hierarchy);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return firstChild(evaluator,member);
        }
      }
;
    }
    Member firstChild(    Evaluator evaluator,    Member member){
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      return (children.length == 0) ? member.getHierarchy().getNullMember() : children[0];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return firstSibling(member,evaluator);
        }
      }
;
    }
    Member firstSibling(    Member member,    Evaluator evaluator){
      Member parent=member.getParentMember();
      Member[] children;
      final SchemaReader schemaReader=evaluator.getSchemaReader();
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=schemaReader.getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=schemaReader.getMemberChildren(parent);
      }
      return children[0];
    }
  }
);
  define(LeadLagFunDef.LagResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return lastChild(evaluator,member);
        }
      }
;
    }
    Member lastChild(    Evaluator evaluator,    Member member){
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      return (children.length == 0) ? member.getHierarchy().getNullMember() : children[children.length - 1];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return firstSibling(member,evaluator);
        }
      }
;
    }
    Member firstSibling(    Member member,    Evaluator evaluator){
      Member parent=member.getParentMember();
      Member[] children;
      final SchemaReader schemaReader=evaluator.getSchemaReader();
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=schemaReader.getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=schemaReader.getMemberChildren(parent);
      }
      return children[children.length - 1];
    }
  }
);
  define(LeadLagFunDef.LeadResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return evaluator.getSchemaReader().getLeadMember(member,+1);
        }
      }
;
    }
  }
);
  define(OpeningClosingPeriodFunDef.OpeningPeriodResolver);
  define(OpeningClosingPeriodFunDef.ClosingPeriodResolver);
  define(ParallelPeriodFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return memberParent(evaluator,member);
        }
      }
;
    }
    Member memberParent(    Evaluator evaluator,    Member member){
      Member parent=evaluator.getSchemaReader().getMemberParent(member);
      if (parent == null) {
        parent=member.getHierarchy().getNullMember();
      }
      return parent;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return evaluator.getSchemaReader().getLeadMember(member,-1);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc memberNameCalc=compiler.compileString(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberNameCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          String memberName=memberNameCalc.evaluateString(evaluator);
          return strToMember(evaluator,memberName);
        }
      }
;
    }
    Member strToMember(    Evaluator evaluator,    String memberName){
      Cube cube=evaluator.getCube();
      SchemaReader schemaReader=evaluator.getSchemaReader();
      List<Id.Segment> uniqueNameParts=Util.parseIdentifier(memberName);
      return (Member)schemaReader.lookupCompound(cube,uniqueNameParts,true,Category.Member);
    }
  }
);
  define(ValidMeasureFunDef.instance);
  define(AggregateFunDef.resolver);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      return new FunDefBase(dummyFunDef){
        public void unparse(        Exp[] args,        PrintWriter pw){
          pw.print(getName());
          pw.print("String_Node_Str");
          args[0].unparse(pw);
          pw.print("String_Node_Str");
        }
        public Calc compileCall(        ResolvedFunCall call,        ExpCompiler compiler){
          final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
          final Calc valueCalc=new ValueCalc(call);
          return new GenericCalc(call){
            public Object evaluate(            Evaluator evaluator){
              Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
              return aggregateChildren(evaluator,hierarchy,valueCalc);
            }
            public Calc[] getCalcs(){
              return new Calc[]{hierarchyCalc,valueCalc};
            }
          }
;
        }
        Object aggregateChildren(        Evaluator evaluator,        Hierarchy hierarchy,        final Calc valueFunCall){
          Member member=evaluator.getParent().getContext(hierarchy.getDimension());
          List members=(List)member.getPropertyValue(Property.CONTRIBUTING_CHILDREN.name);
          Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.AGGREGATION_TYPE.name,null);
          if (aggregator == null) {
            throw FunUtil.newEvalException(null,"String_Node_Str");
          }
          Aggregator rollup=aggregator.getRollup();
          if (rollup == null) {
            throw FunUtil.newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
          }
          return rollup.aggregate(evaluator.push(),members,valueFunCall);
        }
      }
;
    }
  }
);
  define(AvgFunDef.Resolver);
  define(CorrelationFunDef.Resolver);
  define(CountFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final ListCalc memberListCalc=compiler.compileList(call.getArg(0));
      return new AbstractIntegerCalc(call,new Calc[]{memberListCalc}){
        public int evaluateInteger(        Evaluator evaluator){
          List memberList=memberListCalc.evaluateList(evaluator);
          return count(evaluator,memberList,true);
        }
      }
;
    }
  }
);
  define(CovarianceFunDef.CovarianceResolver);
  define(CovarianceFunDef.CovarianceNResolver);
  define(IifFunDef.STRING_INSTANCE);
  define(IifFunDef.NUMERIC_INSTANCE);
  define(IifFunDef.BOOLEAN_INSTANCE);
  define(IifFunDef.MEMBER_INSTANCE);
  define(IifFunDef.LEVEL_INSTANCE);
  define(IifFunDef.HIERARCHY_INSTANCE);
  define(IifFunDef.DIMENSION_INSTANCE);
  define(IifFunDef.SET_INSTANCE);
  define(new FunDefBase("String_Node_Str","String_Node_Str" + "String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc1=compiler.compileString(call.getArg(0));
      final StringCalc stringCalc2=compiler.compileString(call.getArg(1));
      return new AbstractIntegerCalc(call,new Calc[]{stringCalc1,stringCalc2}){
        public int evaluateInteger(        Evaluator evaluator){
          String value=stringCalc1.evaluateString(evaluator);
          String pattern=stringCalc2.evaluateString(evaluator);
          return value.indexOf(pattern) + 1;
        }
      }
;
    }
  }
);
  define(LinReg.InterceptResolver);
  define(LinReg.PointResolver);
  define(LinReg.R2Resolver);
  define(LinReg.SlopeResolver);
  define(LinReg.VarianceResolver);
  define(MinMaxFunDef.MaxResolver);
  define(MinMaxFunDef.MinResolver);
  define(MedianFunDef.Resolver);
  define(PercentileFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractIntegerCalc(call,new Calc[]{levelCalc}){
        public int evaluateInteger(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getDepth();
        }
      }
;
    }
  }
);
  define(RankFunDef.Resolver);
  define(CacheFunDef.Resolver);
  define(StdevFunDef.StdevResolver);
  define(StdevFunDef.StddevResolver);
  define(StdevPFunDef.StdevpResolver);
  define(StdevPFunDef.StddevpResolver);
  define(SumFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new GenericCalc(call){
        public Object evaluate(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          Member old=evaluator.setContext(member);
          Object value=evaluator.evaluateCurrent();
          evaluator.setContext(old);
          return value;
        }
        public boolean dependsOn(        Dimension dimension){
          if (super.dependsOn(dimension)) {
            return true;
          }
          if (memberCalc.getType().usesDimension(dimension,true)) {
            return false;
          }
          return true;
        }
        public Calc[] getCalcs(){
          return new Calc[]{memberCalc};
        }
      }
;
    }
  }
);
  define(VarFunDef.VarResolver);
  define(VarFunDef.VarianceResolver);
  define(VarPFunDef.VariancePResolver);
  define(VarPFunDef.VarPResolver);
  define(AddCalculatedMembersFunDef.resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{memberCalc}){
        public List evaluateList(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return ascendants(member);
        }
      }
;
    }
    List<Member> ascendants(    Member member){
      if (member.isNull()) {
        return Collections.emptyList();
      }
      Member[] members=member.getAncestorMembers();
      final List<Member> result=new ArrayList<Member>(members.length + 1);
      result.add(member);
      XOMUtil.addAll(result,members);
      return result;
    }
  }
);
  define(TopBottomCountFunDef.BottomCountResolver);
  define(TopBottomPercentSumFunDef.BottomPercentResolver);
  define(TopBottomPercentSumFunDef.BottomSumResolver);
  define(TopBottomCountFunDef.TopCountResolver);
  define(TopBottomPercentSumFunDef.TopPercentResolver);
  define(TopBottomPercentSumFunDef.TopSumResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{memberCalc},false){
        public List evaluateList(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          Member[] children=getNonEmptyMemberChildren(evaluator,member);
          return Arrays.asList(children);
        }
      }
;
    }
  }
);
  define(CrossJoinFunDef.Resolver);
  define(NonEmptyCrossJoinFunDef.Resolver);
  define(CrossJoinFunDef.StarResolver);
  define(DescendantsFunDef.Resolver);
  define(DistinctFunDef.instance);
  define(DrilldownLevelFunDef.Resolver);
  define(DrilldownLevelTopBottomFunDef.DrilldownLevelTopResolver);
  define(DrilldownLevelTopBottomFunDef.DrilldownLevelBottomResolver);
  define(DrilldownMemberFunDef.Resolver);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(ExceptFunDef.Resolver);
  define(ExtractFunDef.Resolver);
  define(FilterFunDef.instance);
  define(GenerateFunDef.ListResolver);
  define(GenerateFunDef.StringResolver);
  define(HeadTailFunDef.HeadResolver);
  define(HierarchizeFunDef.Resolver);
  define(IntersectFunDef.resolver);
  define(LastPeriodsFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{dimensionCalc}){
        public List evaluateList(        Evaluator evaluator){
          Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimensionMembers(dimension,evaluator,false);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{dimensionCalc}){
        public List evaluateList(        Evaluator evaluator){
          Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimensionMembers(dimension,evaluator,true);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{hierarchyCalc}){
        public List evaluateList(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchyMembers(hierarchy,evaluator,false);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{hierarchyCalc}){
        public List evaluateList(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchyMembers(hierarchy,evaluator,true);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{levelCalc}){
        public List evaluateList(        Evaluator evaluator){
          Level level=levelCalc.evaluateLevel(evaluator);
          return levelMembers(level,evaluator,false);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{levelCalc}){
        public List evaluateList(        Evaluator evaluator){
          Level level=levelCalc.evaluateLevel(evaluator);
          return levelMembers(level,evaluator,true);
        }
      }
;
    }
  }
);
  define(XtdFunDef.MtdResolver);
  define(OrderFunDef.Resolver);
  define(PeriodsToDateFunDef.Resolver);
  define(XtdFunDef.QtdResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final ListCalc listCalc=compiler.compileList(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{listCalc}){
        public List evaluateList(        Evaluator evaluator){
          final List<Member> list=listCalc.evaluateList(evaluator);
          removeCalculatedMembers(list);
          return list;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{memberCalc}){
        public List evaluateList(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return memberSiblings(member,evaluator);
        }
      }
;
    }
    List memberSiblings(    Member member,    Evaluator evaluator){
      if (member.isNull()) {
        return Collections.EMPTY_LIST;
      }
      Member parent=member.getParentMember();
      final SchemaReader schemaReader=evaluator.getSchemaReader();
      Member[] siblings;
      if (parent == null) {
        siblings=schemaReader.getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        siblings=schemaReader.getMemberChildren(parent);
      }
      return Arrays.asList(siblings);
    }
  }
);
  define(StrToSetFunDef.Resolver);
  define(SubsetFunDef.Resolver);
  define(HeadTailFunDef.TailResolver);
  define(ToggleDrillStateFunDef.Resolver);
  define(UnionFunDef.Resolver);
  define(VisualTotalsFunDef.Resolver);
  define(XtdFunDef.WtdResolver);
  define(XtdFunDef.YtdResolver);
  define(RangeFunDef.instance);
  define(SetFunDef.Resolver);
  define(FormatFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{dimensionCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimension.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{hierarchyCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchy.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{levelCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{memberCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return member.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{dimensionCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimension.getName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{hierarchyCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchy.getName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{levelCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{memberCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return member.getName();
        }
      }
;
    }
  }
);
  define(SetToStrFunDef.instance);
  define(TupleToStrFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{dimensionCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimension.getUniqueName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{hierarchyCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchy.getUniqueName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{levelCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getUniqueName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{memberCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return member.getUniqueName();
        }
      }
;
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(SetItemFunDef.intResolver);
  define(SetItemFunDef.stringResolver);
  define(TupleItemFunDef.instance);
  define(StrToTupleFunDef.Resolver);
  define(TupleFunDef.Resolver);
  define(CoalesceEmptyFunDef.Resolver);
  define(CaseTestFunDef.Resolver);
  define(CaseMatchFunDef.Resolver);
  define(PropertiesFunDef.Resolver);
  define(new ParameterFunDef.ParameterResolver());
  define(new ParameterFunDef.ParamRefResolver());
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (v0 == DoubleNull) {
            if (v1 == DoubleNull) {
              return DoubleNull;
            }
 else {
              return v1;
            }
          }
 else {
            if (v1 == DoubleNull) {
              return v0;
            }
 else {
              return v0 + v1;
            }
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (v0 == DoubleNull) {
            if (v1 == DoubleNull) {
              return DoubleNull;
            }
 else {
              return -v1;
            }
          }
 else {
            if (v1 == DoubleNull) {
              return v0;
            }
 else {
              return v0 - v1;
            }
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (v0 == DoubleNull || v1 == DoubleNull) {
            return DoubleNull;
          }
 else {
            return v0 * v1;
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      final boolean isNullDenominatorProducesNull=MondrianProperties.instance().NullDenominatorProducesNull.get();
      if (isNullDenominatorProducesNull != true) {
        return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
          public double evaluateDouble(          Evaluator evaluator){
            final double v0=calc0.evaluateDouble(evaluator);
            final double v1=calc1.evaluateDouble(evaluator);
            if (v0 == DoubleNull) {
              return DoubleNull;
            }
 else             if (v1 == DoubleNull) {
              return Double.POSITIVE_INFINITY;
            }
 else {
              return v0 / v1;
            }
          }
        }
;
      }
 else {
        return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
          public double evaluateDouble(          Evaluator evaluator){
            final double v0=calc0.evaluateDouble(evaluator);
            final double v1=calc1.evaluateDouble(evaluator);
            if (v0 == DoubleNull || v1 == DoubleNull) {
              return DoubleNull;
            }
 else {
              return v0 / v1;
            }
          }
        }
;
      }
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc=compiler.compileDouble(call.getArg(0));
      return new AbstractDoubleCalc(call,new Calc[]{calc}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v=calc.evaluateDouble(evaluator);
          if (v == DoubleNull) {
            return DoubleNull;
          }
 else {
            return -v;
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractStringCalc(call,new Calc[]{calc0,calc1}){
        public String evaluateString(        Evaluator evaluator){
          final String s0=calc0.evaluateString(evaluator);
          final String s1=calc1.evaluateString(evaluator);
          return s0 + s1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc0=compiler.compileBoolean(call.getArg(0));
      final BooleanCalc calc1=compiler.compileBoolean(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          boolean b0=calc0.evaluateBoolean(evaluator);
          if (!evaluator.isEvalAxes() && !b0) {
            return false;
          }
          boolean b1=calc1.evaluateBoolean(evaluator);
          return b0 && b1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc0=compiler.compileBoolean(call.getArg(0));
      final BooleanCalc calc1=compiler.compileBoolean(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          boolean b0=calc0.evaluateBoolean(evaluator);
          if (!evaluator.isEvalAxes() && b0) {
            return true;
          }
          boolean b1=calc1.evaluateBoolean(evaluator);
          return b0 || b1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc0=compiler.compileBoolean(call.getArg(0));
      final BooleanCalc calc1=compiler.compileBoolean(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final boolean b0=calc0.evaluateBoolean(evaluator);
          final boolean b1=calc1.evaluateBoolean(evaluator);
          return b0 != b1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc=compiler.compileBoolean(call.getArg(0));
      return new AbstractBooleanCalc(call,new Calc[]{calc}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          return !calc.evaluateBoolean(evaluator);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.equals(b1);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 == v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return !b0.equals(b1);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 != v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 < v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) < 0;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 <= v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) <= 0;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 > v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) > 0;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 >= v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) >= 0;
        }
      }
;
    }
  }
);
  define(NthQuartileFunDef.FirstQResolver);
  define(NthQuartileFunDef.ThirdQResolver);
  define(CalculatedChildFunDef.instance);
  define(CastFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final Locale locale=compiler.getEvaluator().getConnectionLocale();
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{stringCalc}){
        public String evaluateString(        Evaluator evaluator){
          String value=stringCalc.evaluateString(evaluator);
          return value.toUpperCase(locale);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractIntegerCalc(call,new Calc[]{stringCalc}){
        public int evaluateInteger(        Evaluator evaluator){
          String value=stringCalc.evaluateString(evaluator);
          return value.length();
        }
      }
;
    }
  }
);
  for (  FunDef funDef : JavaFunDef.scan(Vba.class)) {
    define(funDef);
  }
  for (  FunDef funDef : JavaFunDef.scan(Excel.class)) {
    define(funDef);
  }
}

Fixed version (ground truth):
protected void defineFunctions(){
  defineReserved("String_Node_Str");
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Empty,Category.Empty,new int[0]){
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(HierarchyDimensionFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      Dimension dimension=((DimensionExpr)call.getArg(0)).getDimension();
      return new ConstantCalc(DimensionType.forDimension(dimension),dimension);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{levelCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          Level level=levelCalc.evaluateLevel(evaluator);
          return level.getDimension();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{memberCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return member.getDimension();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      return DimensionType.Unknown;
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final IntegerCalc integerCalc=compiler.compileInteger(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{integerCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          int n=integerCalc.evaluateInteger(evaluator);
          return nthDimension(evaluator,n);
        }
      }
;
    }
    Dimension nthDimension(    Evaluator evaluator,    int n){
      Cube cube=evaluator.getCube();
      Dimension[] dimensions=cube.getDimensions();
      if (n >= dimensions.length || n < 0) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return dimensions[n];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      return DimensionType.Unknown;
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractDimensionCalc(call,new Calc[]{stringCalc}){
        public Dimension evaluateDimension(        Evaluator evaluator){
          String dimensionName=stringCalc.evaluateString(evaluator);
          return findDimension(dimensionName,evaluator);
        }
      }
;
    }
    Dimension findDimension(    String s,    Evaluator evaluator){
      if (s.indexOf("String_Node_Str") == -1) {
        s=Util.quoteMdxIdentifier(s);
      }
      OlapElement o=evaluator.getSchemaReader().lookupCompound(evaluator.getCube(),parseIdentifier(s),false,Category.Dimension);
      if (o instanceof Dimension) {
        return (Dimension)o;
      }
 else       if (o == null) {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str");
      }
 else {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str"+ o);
      }
    }
  }
);
  define(LevelHierarchyFunDef.instance);
  define(MemberHierarchyFunDef.instance);
  define(MemberLevelFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      final Type argType=args[0].getType();
      return LevelType.forType(argType);
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      final IntegerCalc ordinalCalc=compiler.compileInteger(call.getArg(1));
      return new AbstractLevelCalc(call,new Calc[]{hierarchyCalc,ordinalCalc}){
        public Level evaluateLevel(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          int ordinal=ordinalCalc.evaluateInteger(evaluator);
          return nthLevel(hierarchy,ordinal);
        }
      }
;
    }
    Level nthLevel(    Hierarchy hierarchy,    int n){
      Level[] levels=hierarchy.getLevels();
      if (n >= levels.length || n < 0) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return levels[n];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      final Type argType=args[0].getType();
      return LevelType.forType(argType);
    }
    public Calc compileCall(    final ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      final StringCalc nameCalc=compiler.compileString(call.getArg(1));
      return new AbstractLevelCalc(call,new Calc[]{hierarchyCalc,nameCalc}){
        public Level evaluateLevel(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          String name=nameCalc.evaluateString(evaluator);
          for (          Level level : hierarchy.getLevels()) {
            if (level.getName().equals(name)) {
              return level;
            }
          }
          throw newEvalException(call.getFunDef(),"String_Node_Str" + name + "String_Node_Str"+ hierarchy+ "String_Node_Str");
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Type getResultType(    Validator validator,    Exp[] args){
      final Type argType=args[0].getType();
      return LevelType.forType(argType);
    }
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractLevelCalc(call,new Calc[]{stringCalc}){
        public Level evaluateLevel(        Evaluator evaluator){
          String levelName=stringCalc.evaluateString(evaluator);
          return findLevel(evaluator,levelName);
        }
      }
;
    }
    Level findLevel(    Evaluator evaluator,    String s){
      Cube cube=evaluator.getCube();
      OlapElement o=(s.startsWith("String_Node_Str")) ? evaluator.getSchemaReader().lookupCompound(cube,parseIdentifier(s),false,Category.Level) : null;
      if (o instanceof Level) {
        return (Level)o;
      }
 else       if (o == null) {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str");
      }
 else {
        throw newEvalException(this,"String_Node_Str" + s + "String_Node_Str"+ o);
      }
    }
  }
);
  define(IsEmptyFunDef.FunctionResolver);
  define(IsEmptyFunDef.PostfixResolver);
  define(IsNullFunDef.Resolver);
  define(IsFunDef.Resolver);
  define(AncestorFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      final MemberCalc ancestorMemberCalc=compiler.compileMember(call.getArg(1));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc,ancestorMemberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          Member ancestorMember=ancestorMemberCalc.evaluateMember(evaluator);
          return cousin(evaluator.getSchemaReader(),member,ancestorMember);
        }
      }
;
    }
  }
);
  define(DimensionCurrentMemberFunDef.instance);
  define(HierarchyCurrentMemberFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return member.getDataMember();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{dimensionCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return evaluator.getSchemaReader().getHierarchyDefaultMember(dimension.getHierarchies()[0]);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{hierarchyCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return evaluator.getSchemaReader().getHierarchyDefaultMember(hierarchy);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return firstChild(evaluator,member);
        }
      }
;
    }
    Member firstChild(    Evaluator evaluator,    Member member){
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      return (children.length == 0) ? member.getHierarchy().getNullMember() : children[0];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return firstSibling(member,evaluator);
        }
      }
;
    }
    Member firstSibling(    Member member,    Evaluator evaluator){
      Member parent=member.getParentMember();
      Member[] children;
      final SchemaReader schemaReader=evaluator.getSchemaReader();
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=schemaReader.getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=schemaReader.getMemberChildren(parent);
      }
      return children[0];
    }
  }
);
  define(LeadLagFunDef.LagResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return lastChild(evaluator,member);
        }
      }
;
    }
    Member lastChild(    Evaluator evaluator,    Member member){
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      return (children.length == 0) ? member.getHierarchy().getNullMember() : children[children.length - 1];
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return firstSibling(member,evaluator);
        }
      }
;
    }
    Member firstSibling(    Member member,    Evaluator evaluator){
      Member parent=member.getParentMember();
      Member[] children;
      final SchemaReader schemaReader=evaluator.getSchemaReader();
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=schemaReader.getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=schemaReader.getMemberChildren(parent);
      }
      return children[children.length - 1];
    }
  }
);
  define(LeadLagFunDef.LeadResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return evaluator.getSchemaReader().getLeadMember(member,+1);
        }
      }
;
    }
  }
);
  define(OpeningClosingPeriodFunDef.OpeningPeriodResolver);
  define(OpeningClosingPeriodFunDef.ClosingPeriodResolver);
  define(ParallelPeriodFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return memberParent(evaluator,member);
        }
      }
;
    }
    Member memberParent(    Evaluator evaluator,    Member member){
      Member parent=evaluator.getSchemaReader().getMemberParent(member);
      if (parent == null) {
        parent=member.getHierarchy().getNullMember();
      }
      return parent;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return evaluator.getSchemaReader().getLeadMember(member,-1);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc memberNameCalc=compiler.compileString(call.getArg(0));
      return new AbstractMemberCalc(call,new Calc[]{memberNameCalc}){
        public Member evaluateMember(        Evaluator evaluator){
          String memberName=memberNameCalc.evaluateString(evaluator);
          return strToMember(evaluator,memberName);
        }
      }
;
    }
    Member strToMember(    Evaluator evaluator,    String memberName){
      Cube cube=evaluator.getCube();
      SchemaReader schemaReader=evaluator.getSchemaReader();
      List<Id.Segment> uniqueNameParts=Util.parseIdentifier(memberName);
      return (Member)schemaReader.lookupCompound(cube,uniqueNameParts,true,Category.Member);
    }
  }
);
  define(ValidMeasureFunDef.instance);
  define(AggregateFunDef.resolver);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      return new FunDefBase(dummyFunDef){
        public void unparse(        Exp[] args,        PrintWriter pw){
          pw.print(getName());
          pw.print("String_Node_Str");
          args[0].unparse(pw);
          pw.print("String_Node_Str");
        }
        public Calc compileCall(        ResolvedFunCall call,        ExpCompiler compiler){
          final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
          final Calc valueCalc=new ValueCalc(call);
          return new GenericCalc(call){
            public Object evaluate(            Evaluator evaluator){
              Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
              return aggregateChildren(evaluator,hierarchy,valueCalc);
            }
            public Calc[] getCalcs(){
              return new Calc[]{hierarchyCalc,valueCalc};
            }
          }
;
        }
        Object aggregateChildren(        Evaluator evaluator,        Hierarchy hierarchy,        final Calc valueFunCall){
          Member member=evaluator.getParent().getContext(hierarchy.getDimension());
          List members=(List)member.getPropertyValue(Property.CONTRIBUTING_CHILDREN.name);
          Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.AGGREGATION_TYPE.name,null);
          if (aggregator == null) {
            throw FunUtil.newEvalException(null,"String_Node_Str");
          }
          Aggregator rollup=aggregator.getRollup();
          if (rollup == null) {
            throw FunUtil.newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
          }
          return rollup.aggregate(evaluator.push(),members,valueFunCall);
        }
      }
;
    }
  }
);
  define(AvgFunDef.Resolver);
  define(CorrelationFunDef.Resolver);
  define(CountFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final ListCalc memberListCalc=compiler.compileList(call.getArg(0));
      return new AbstractIntegerCalc(call,new Calc[]{memberListCalc}){
        public int evaluateInteger(        Evaluator evaluator){
          List memberList=memberListCalc.evaluateList(evaluator);
          return count(evaluator,memberList,true);
        }
      }
;
    }
  }
);
  define(CovarianceFunDef.CovarianceResolver);
  define(CovarianceFunDef.CovarianceNResolver);
  define(IifFunDef.STRING_INSTANCE);
  define(IifFunDef.NUMERIC_INSTANCE);
  define(IifFunDef.TUPLE_INSTANCE);
  define(IifFunDef.BOOLEAN_INSTANCE);
  define(IifFunDef.MEMBER_INSTANCE);
  define(IifFunDef.LEVEL_INSTANCE);
  define(IifFunDef.HIERARCHY_INSTANCE);
  define(IifFunDef.DIMENSION_INSTANCE);
  define(IifFunDef.SET_INSTANCE);
  define(new FunDefBase("String_Node_Str","String_Node_Str" + "String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc1=compiler.compileString(call.getArg(0));
      final StringCalc stringCalc2=compiler.compileString(call.getArg(1));
      return new AbstractIntegerCalc(call,new Calc[]{stringCalc1,stringCalc2}){
        public int evaluateInteger(        Evaluator evaluator){
          String value=stringCalc1.evaluateString(evaluator);
          String pattern=stringCalc2.evaluateString(evaluator);
          return value.indexOf(pattern) + 1;
        }
      }
;
    }
  }
);
  define(LinReg.InterceptResolver);
  define(LinReg.PointResolver);
  define(LinReg.R2Resolver);
  define(LinReg.SlopeResolver);
  define(LinReg.VarianceResolver);
  define(MinMaxFunDef.MaxResolver);
  define(MinMaxFunDef.MinResolver);
  define(MedianFunDef.Resolver);
  define(PercentileFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractIntegerCalc(call,new Calc[]{levelCalc}){
        public int evaluateInteger(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getDepth();
        }
      }
;
    }
  }
);
  define(RankFunDef.Resolver);
  define(CacheFunDef.Resolver);
  define(StdevFunDef.StdevResolver);
  define(StdevFunDef.StddevResolver);
  define(StdevPFunDef.StdevpResolver);
  define(StdevPFunDef.StddevpResolver);
  define(SumFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new GenericCalc(call){
        public Object evaluate(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          Member old=evaluator.setContext(member);
          Object value=evaluator.evaluateCurrent();
          evaluator.setContext(old);
          return value;
        }
        public boolean dependsOn(        Dimension dimension){
          if (super.dependsOn(dimension)) {
            return true;
          }
          if (memberCalc.getType().usesDimension(dimension,true)) {
            return false;
          }
          return true;
        }
        public Calc[] getCalcs(){
          return new Calc[]{memberCalc};
        }
      }
;
    }
  }
);
  define(VarFunDef.VarResolver);
  define(VarFunDef.VarianceResolver);
  define(VarPFunDef.VariancePResolver);
  define(VarPFunDef.VarPResolver);
  define(AddCalculatedMembersFunDef.resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{memberCalc}){
        public List evaluateList(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          return ascendants(member);
        }
      }
;
    }
    List<Member> ascendants(    Member member){
      if (member.isNull()) {
        return Collections.emptyList();
      }
      Member[] members=member.getAncestorMembers();
      final List<Member> result=new ArrayList<Member>(members.length + 1);
      result.add(member);
      XOMUtil.addAll(result,members);
      return result;
    }
  }
);
  define(TopBottomCountFunDef.BottomCountResolver);
  define(TopBottomPercentSumFunDef.BottomPercentResolver);
  define(TopBottomPercentSumFunDef.BottomSumResolver);
  define(TopBottomCountFunDef.TopCountResolver);
  define(TopBottomPercentSumFunDef.TopPercentResolver);
  define(TopBottomPercentSumFunDef.TopSumResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{memberCalc},false){
        public List evaluateList(        Evaluator evaluator){
          Member member=memberCalc.evaluateMember(evaluator);
          Member[] children=getNonEmptyMemberChildren(evaluator,member);
          return Arrays.asList(children);
        }
      }
;
    }
  }
);
  define(CrossJoinFunDef.Resolver);
  define(NonEmptyCrossJoinFunDef.Resolver);
  define(CrossJoinFunDef.StarResolver);
  define(DescendantsFunDef.Resolver);
  define(DistinctFunDef.instance);
  define(DrilldownLevelFunDef.Resolver);
  define(DrilldownLevelTopBottomFunDef.DrilldownLevelTopResolver);
  define(DrilldownLevelTopBottomFunDef.DrilldownLevelBottomResolver);
  define(DrilldownMemberFunDef.Resolver);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(ExceptFunDef.Resolver);
  define(ExtractFunDef.Resolver);
  define(FilterFunDef.instance);
  define(GenerateFunDef.ListResolver);
  define(GenerateFunDef.StringResolver);
  define(HeadTailFunDef.HeadResolver);
  define(HierarchizeFunDef.Resolver);
  define(IntersectFunDef.resolver);
  define(LastPeriodsFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{dimensionCalc}){
        public List evaluateList(        Evaluator evaluator){
          Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimensionMembers(dimension,evaluator,false);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{dimensionCalc}){
        public List evaluateList(        Evaluator evaluator){
          Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimensionMembers(dimension,evaluator,true);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{hierarchyCalc}){
        public List evaluateList(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchyMembers(hierarchy,evaluator,false);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{hierarchyCalc}){
        public List evaluateList(        Evaluator evaluator){
          Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchyMembers(hierarchy,evaluator,true);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{levelCalc}){
        public List evaluateList(        Evaluator evaluator){
          Level level=levelCalc.evaluateLevel(evaluator);
          return levelMembers(level,evaluator,false);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{levelCalc}){
        public List evaluateList(        Evaluator evaluator){
          Level level=levelCalc.evaluateLevel(evaluator);
          return levelMembers(level,evaluator,true);
        }
      }
;
    }
  }
);
  define(XtdFunDef.MtdResolver);
  define(OrderFunDef.Resolver);
  define(PeriodsToDateFunDef.Resolver);
  define(XtdFunDef.QtdResolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final ListCalc listCalc=compiler.compileList(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{listCalc}){
        public List evaluateList(        Evaluator evaluator){
          final List<Member> list=listCalc.evaluateList(evaluator);
          removeCalculatedMembers(list);
          return list;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractListCalc(call,new Calc[]{memberCalc}){
        public List evaluateList(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return memberSiblings(member,evaluator);
        }
      }
;
    }
    List memberSiblings(    Member member,    Evaluator evaluator){
      if (member.isNull()) {
        return Collections.EMPTY_LIST;
      }
      Member parent=member.getParentMember();
      final SchemaReader schemaReader=evaluator.getSchemaReader();
      Member[] siblings;
      if (parent == null) {
        siblings=schemaReader.getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        siblings=schemaReader.getMemberChildren(parent);
      }
      return Arrays.asList(siblings);
    }
  }
);
  define(StrToSetFunDef.Resolver);
  define(SubsetFunDef.Resolver);
  define(HeadTailFunDef.TailResolver);
  define(ToggleDrillStateFunDef.Resolver);
  define(UnionFunDef.Resolver);
  define(VisualTotalsFunDef.Resolver);
  define(XtdFunDef.WtdResolver);
  define(XtdFunDef.YtdResolver);
  define(RangeFunDef.instance);
  define(SetFunDef.Resolver);
  define(FormatFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{dimensionCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimension.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{hierarchyCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchy.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{levelCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{memberCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return member.getCaption();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{dimensionCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimension.getName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{hierarchyCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchy.getName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{levelCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{memberCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return member.getName();
        }
      }
;
    }
  }
);
  define(SetToStrFunDef.instance);
  define(TupleToStrFunDef.instance);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DimensionCalc dimensionCalc=compiler.compileDimension(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{dimensionCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Dimension dimension=dimensionCalc.evaluateDimension(evaluator);
          return dimension.getUniqueName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final HierarchyCalc hierarchyCalc=compiler.compileHierarchy(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{hierarchyCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Hierarchy hierarchy=hierarchyCalc.evaluateHierarchy(evaluator);
          return hierarchy.getUniqueName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final LevelCalc levelCalc=compiler.compileLevel(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{levelCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Level level=levelCalc.evaluateLevel(evaluator);
          return level.getUniqueName();
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final MemberCalc memberCalc=compiler.compileMember(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{memberCalc}){
        public String evaluateString(        Evaluator evaluator){
          final Member member=memberCalc.evaluateMember(evaluator);
          return member.getUniqueName();
        }
      }
;
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      throw new UnsupportedOperationException();
    }
  }
);
  define(SetItemFunDef.intResolver);
  define(SetItemFunDef.stringResolver);
  define(TupleItemFunDef.instance);
  define(StrToTupleFunDef.Resolver);
  define(TupleFunDef.Resolver);
  define(CoalesceEmptyFunDef.Resolver);
  define(CaseTestFunDef.Resolver);
  define(CaseMatchFunDef.Resolver);
  define(PropertiesFunDef.Resolver);
  define(new ParameterFunDef.ParameterResolver());
  define(new ParameterFunDef.ParamRefResolver());
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (v0 == DoubleNull) {
            if (v1 == DoubleNull) {
              return DoubleNull;
            }
 else {
              return v1;
            }
          }
 else {
            if (v1 == DoubleNull) {
              return v0;
            }
 else {
              return v0 + v1;
            }
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (v0 == DoubleNull) {
            if (v1 == DoubleNull) {
              return DoubleNull;
            }
 else {
              return -v1;
            }
          }
 else {
            if (v1 == DoubleNull) {
              return v0;
            }
 else {
              return v0 - v1;
            }
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (v0 == DoubleNull || v1 == DoubleNull) {
            return DoubleNull;
          }
 else {
            return v0 * v1;
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      final boolean isNullDenominatorProducesNull=MondrianProperties.instance().NullDenominatorProducesNull.get();
      if (isNullDenominatorProducesNull != true) {
        return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
          public double evaluateDouble(          Evaluator evaluator){
            final double v0=calc0.evaluateDouble(evaluator);
            final double v1=calc1.evaluateDouble(evaluator);
            if (v0 == DoubleNull) {
              return DoubleNull;
            }
 else             if (v1 == DoubleNull) {
              return Double.POSITIVE_INFINITY;
            }
 else {
              return v0 / v1;
            }
          }
        }
;
      }
 else {
        return new AbstractDoubleCalc(call,new Calc[]{calc0,calc1}){
          public double evaluateDouble(          Evaluator evaluator){
            final double v0=calc0.evaluateDouble(evaluator);
            final double v1=calc1.evaluateDouble(evaluator);
            if (v0 == DoubleNull || v1 == DoubleNull) {
              return DoubleNull;
            }
 else {
              return v0 / v1;
            }
          }
        }
;
      }
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc=compiler.compileDouble(call.getArg(0));
      return new AbstractDoubleCalc(call,new Calc[]{calc}){
        public double evaluateDouble(        Evaluator evaluator){
          final double v=calc.evaluateDouble(evaluator);
          if (v == DoubleNull) {
            return DoubleNull;
          }
 else {
            return -v;
          }
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractStringCalc(call,new Calc[]{calc0,calc1}){
        public String evaluateString(        Evaluator evaluator){
          final String s0=calc0.evaluateString(evaluator);
          final String s1=calc1.evaluateString(evaluator);
          return s0 + s1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc0=compiler.compileBoolean(call.getArg(0));
      final BooleanCalc calc1=compiler.compileBoolean(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          boolean b0=calc0.evaluateBoolean(evaluator);
          if (!evaluator.isEvalAxes() && !b0) {
            return false;
          }
          boolean b1=calc1.evaluateBoolean(evaluator);
          return b0 && b1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc0=compiler.compileBoolean(call.getArg(0));
      final BooleanCalc calc1=compiler.compileBoolean(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          boolean b0=calc0.evaluateBoolean(evaluator);
          if (!evaluator.isEvalAxes() && b0) {
            return true;
          }
          boolean b1=calc1.evaluateBoolean(evaluator);
          return b0 || b1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc0=compiler.compileBoolean(call.getArg(0));
      final BooleanCalc calc1=compiler.compileBoolean(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final boolean b0=calc0.evaluateBoolean(evaluator);
          final boolean b1=calc1.evaluateBoolean(evaluator);
          return b0 != b1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final BooleanCalc calc=compiler.compileBoolean(call.getArg(0));
      return new AbstractBooleanCalc(call,new Calc[]{calc}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          return !calc.evaluateBoolean(evaluator);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.equals(b1);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 == v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return !b0.equals(b1);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 != v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 < v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) < 0;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 <= v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) <= 0;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 > v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) > 0;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final DoubleCalc calc0=compiler.compileDouble(call.getArg(0));
      final DoubleCalc calc1=compiler.compileDouble(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final double v0=calc0.evaluateDouble(evaluator);
          final double v1=calc1.evaluateDouble(evaluator);
          if (Double.isNaN(v0) || Double.isNaN(v1) || v0 == DoubleNull || v1 == DoubleNull) {
            return BooleanNull;
          }
          return v0 >= v1;
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc calc0=compiler.compileString(call.getArg(0));
      final StringCalc calc1=compiler.compileString(call.getArg(1));
      return new AbstractBooleanCalc(call,new Calc[]{calc0,calc1}){
        public boolean evaluateBoolean(        Evaluator evaluator){
          final String b0=calc0.evaluateString(evaluator);
          final String b1=calc1.evaluateString(evaluator);
          if (b0 == null || b1 == null) {
            return BooleanNull;
          }
          return b0.compareTo(b1) >= 0;
        }
      }
;
    }
  }
);
  define(NthQuartileFunDef.FirstQResolver);
  define(NthQuartileFunDef.ThirdQResolver);
  define(CalculatedChildFunDef.instance);
  define(CastFunDef.Resolver);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final Locale locale=compiler.getEvaluator().getConnectionLocale();
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractStringCalc(call,new Calc[]{stringCalc}){
        public String evaluateString(        Evaluator evaluator){
          String value=stringCalc.evaluateString(evaluator);
          return value.toUpperCase(locale);
        }
      }
;
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str"){
    public Calc compileCall(    ResolvedFunCall call,    ExpCompiler compiler){
      final StringCalc stringCalc=compiler.compileString(call.getArg(0));
      return new AbstractIntegerCalc(call,new Calc[]{stringCalc}){
        public int evaluateInteger(        Evaluator evaluator){
          String value=stringCalc.evaluateString(evaluator);
          return value.length();
        }
      }
;
    }
  }
);
  for (  FunDef funDef : JavaFunDef.scan(Vba.class)) {
    define(funDef);
  }
  for (  FunDef funDef : JavaFunDef.scan(Excel.class)) {
    define(funDef);
  }
}