Program: 51604
Project: 51604
Buggy source:
/** 
 * Derived class can override this method to add more functions.
 */
protected void defineFunctions(){
  defineReserved("String_Node_Str");
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      return hierarchy.getDimension();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return dimension;
    }
    public void testDimensionHierarchy(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getDimension();
    }
    public void testLevelDimension(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getDimension();
    }
    public void testMemberDimension(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Cube cube=evaluator.getCube();
      Dimension[] dimensions=cube.getDimensions();
      int n=getIntArg(evaluator,args,0);
      if ((n > dimensions.length) || (n < 1)) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return dimensions[n - 1];
    }
    public void testDimensionsNumeric(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      String defValue="String_Node_Str";
      String s=getStringArg(evaluator,args,0,defValue);
      if (s.indexOf("String_Node_Str") == -1) {
        s=Util.quoteMdxIdentifier(s);
      }
      OlapElement o=lookupCompound(evaluator.getSchemaReader(),evaluator.getCube(),explode(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);
      }
    }
    public void testDimensionsString(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getHierarchy();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getHierarchy();
    }
    public void testTime(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testBasic9(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testFirstInLevel9(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testHierarchyAll(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testHierarchyNull(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getLevel();
    }
    public void testMemberLevel(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      Level[] levels=hierarchy.getLevels();
      int n=getIntArg(evaluator,args,1);
      if ((n > levels.length) || (n < 1)) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return levels[n - 1];
    }
    public void testLevelsNumeric(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testLevelsTooSmall(    FoodMartTestCase test){
      test.assertExprThrows("String_Node_Str","String_Node_Str");
    }
    public void testLevelsTooLarge(    FoodMartTestCase test){
      test.assertExprThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      String s=getStringArg(evaluator,args,0,null);
      Cube cube=evaluator.getCube();
      OlapElement o=null;
      if (s.startsWith("String_Node_Str")) {
        o=lookupCompound(evaluator.getSchemaReader(),cube,explode(s),false,Category.Level);
      }
 else {
        o=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);
      }
    }
    public void testLevelsString(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testLevelsStringFail(    FoodMartTestCase test){
      test.assertExprThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Object o=getScalarArg(evaluator,args,0);
      if (o == Util.nullValue) {
        return Boolean.TRUE;
      }
 else {
        return Boolean.FALSE;
      }
    }
    public void testIsEmpty(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,false);
      Level level=getLevelArg(evaluator,args,1,false);
      if (member.getHierarchy() != level.getHierarchy()) {
        throw newEvalException(this,"String_Node_Str" + member + "String_Node_Str"+ level+ "String_Node_Str");
      }
      if (member.getLevel().equals(level)) {
        return member;
      }
      Member[] members=member.getAncestorMembers();
      for (int i=0; i < members.length; i++) {
        if (members[i].getLevel().equals(level))         return members[i];
      }
      return member.getHierarchy().getNullMember();
    }
    public void testAncestor(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testAncestorHigher(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testAncestorSameLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testAncestorWrongHierarchy(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
    public void testAncestorAllLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertTrue(member.isAll());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Cube cube=evaluator.getCube();
      Dimension timeDimension=cube.getYearLevel().getDimension();
      Member member=evaluator.getContext(timeDimension);
      Level level=member.getLevel().getChildLevel();
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriodNoArgs(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Cube cube=evaluator.getCube();
      Dimension timeDimension=cube.getYearLevel().getDimension();
      Member member=evaluator.getContext(timeDimension);
      Level level=getLevelArg(evaluator,args,0,true);
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriodLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testClosingPeriodLevelNotInTimeFails(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Level level=member.getLevel().getChildLevel();
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriodMember(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testClosingPeriodMemberLeaf(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      Member member=getMemberArg(evaluator,args,1,true);
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriod(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testClosingPeriodBelow(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member1=getMemberArg(evaluator,args,0,true);
      Member member2=getMemberArg(evaluator,args,1,true);
      Member cousin=cousin(evaluator.getSchemaReader(),member1,member2);
      if (cousin == null) {
        cousin=member1.getHierarchy().getNullMember();
      }
      return cousin;
    }
    private Member cousin(    SchemaReader schemaReader,    Member member1,    Member member2){
      if (member1.getHierarchy() != member2.getHierarchy()) {
        throw newEvalException(this,"String_Node_Str" + member1 + "String_Node_Str"+ member2+ "String_Node_Str");
      }
      if (member1.getLevel().getDepth() < member2.getLevel().getDepth()) {
        return null;
      }
      return cousin2(schemaReader,member1,member2);
    }
    private Member cousin2(    SchemaReader schemaReader,    Member member1,    Member member2){
      if (member1.getLevel() == member2.getLevel()) {
        return member2;
      }
      Member uncle=cousin2(schemaReader,member1.getParentMember(),member2);
      if (uncle == null) {
        return null;
      }
      int ordinal=Util.getMemberOrdinalInParent(schemaReader,member1);
      Member[] cousins=schemaReader.getMemberChildren(uncle);
      if (cousins.length <= ordinal) {
        return null;
      }
      return cousins[ordinal];
    }
    public void testCousin1(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testCousin2(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testCousinOverrun(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testCousinThreeDown(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testCousinSameLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testCousinHigherLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testCousinWrongHierarchy(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return evaluator.getContext(dimension);
    }
    public void testCurrentMemberFromSlicer(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0}).getValue());
    }
    public void testCurrentMemberFromDefaultMember(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0}).getValue());
    }
    public void testCurrentMemberFromAxis(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0,0}).getValue());
    }
    /** 
 * When evaluating a calculated member, MSOLAP regards that calculated member as the current member of that dimension, so it cycles in this case. But I disagree; it is the previous current member, before the calculated member was expanded.
 */
    public void testCurrentMemberInCalcMember(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0}).getValue());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return evaluator.getSchemaReader().getHierarchyDefaultMember(dimension.getHierarchy());
    }
    public void testDimensionDefaultMember(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      if (children.length == 0) {
        return member.getHierarchy().getNullMember();
      }
 else {
        return children[0];
      }
    }
    public void testFirstChildFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstChildAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstChildOfChildless(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member parent=member.getParentMember();
      Member[] children;
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=evaluator.getSchemaReader().getMemberChildren(parent);
      }
      return children[0];
    }
    public void testFirstSiblingFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstSiblingLastInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstSiblingAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertTrue(member.isAll());
    }
    public void testFirstSiblingRoot(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstSiblingNull(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      int n=getIntArg(evaluator,args,1);
      return evaluator.getSchemaReader().getLeadMember(member,-n);
    }
    public void testLag(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLagFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testLagAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testLagRoot(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLagRootTooFar(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      if (children.length == 0) {
        return member.getHierarchy().getNullMember();
      }
 else {
        return children[children.length - 1];
      }
    }
    public void testLastChild(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastChildLastInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastChildAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastChildOfChildless(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member parent=member.getParentMember();
      Member[] children;
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=evaluator.getSchemaReader().getMemberChildren(parent);
      }
      return children[children.length - 1];
    }
    public void testLastSibling(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastSiblingFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastSiblingAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertTrue(member.isAll());
    }
    public void testLastSiblingRoot(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastSiblingNull(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      int n=getIntArg(evaluator,args,1);
      return evaluator.getSchemaReader().getLeadMember(member,n);
    }
    public void testLead(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLeadNegative(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLeadLastInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return evaluator.getSchemaReader().getLeadMember(member,+1);
    }
    public void testBasic2(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testFirstInLevel2(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
    public void testAll2(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member parent=member.getParentMember();
      if (parent == null || !evaluator.getSchemaReader().getRole().canAccess(parent)) {
        parent=member.getHierarchy().getNullMember();
      }
      return parent;
    }
    public void testBasic5(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testFirstInLevel5(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testAll5(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return evaluator.getSchemaReader().getLeadMember(member,-1);
    }
    public void testBasic(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testFirstInLevel(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
    public void testAll(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE);
      if (aggregator == null) {
        throw newEvalException(null,"String_Node_Str");
      }
      Aggregator rollup=aggregator.getRollup();
      if (rollup == null) {
        throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
      }
      return rollup.aggregate(evaluator.push(),members,exp);
    }
    public void testAggregate(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testAggregate2(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testAggregateToSimulateCompoundSlicer(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      Member member=evaluator.getParent().getContext(hierarchy.getDimension());
      List members=(List)member.getPropertyValue(Property.PROPERTY_CONTRIBUTING_CHILDREN);
      Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE);
      if (aggregator == null) {
        throw newEvalException(null,"String_Node_Str");
      }
      Aggregator rollup=aggregator.getRollup();
      if (rollup == null) {
        throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
      }
      return rollup.aggregate(evaluator.push(),members,valueFunCall);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return avg(evaluator.push(),members,exp);
    }
    public void testAvg(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp1=(ExpBase)getArgNoEval(args,1);
      ExpBase exp2=(ExpBase)getArgNoEval(args,2,valueFunCall);
      return correlation(evaluator.push(),members,exp1,exp2);
    }
    public void testCorrelation(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      String empties=getLiteralArg(args,1,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},null);
      final boolean includeEmpty=empties.equals("String_Node_Str");
      return count(evaluator,members,includeEmpty);
    }
    public void testCount(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
    public void testCountExcludeEmpty(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp1=(ExpBase)getArgNoEval(args,1);
      ExpBase exp2=(ExpBase)getArgNoEval(args,2);
      return covariance(evaluator.push(),members,exp1,exp2,true);
    }
    public void testCovariance(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp1=(ExpBase)getArgNoEval(args,1);
      ExpBase exp2=(ExpBase)getArgNoEval(args,2,valueFunCall);
      return covariance(evaluator.push(),members,exp1,exp2,false);
    }
    public void testCovarianceN(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      boolean logical=getBooleanArg(evaluator,args,0);
      return getDoubleArg(evaluator,args,logical ? 1 : 2);
    }
    public void testIIfNumeric(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return max(evaluator.push(),members,exp);
    }
    public void testMax(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return median(evaluator.push(),members,exp);
    }
    public void testMedian(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
    public void testMedian2(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return min(evaluator.push(),members,exp);
    }
    public void testMin(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
    public void testMinTupel(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,false);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,false);
    }
    public void testStdev(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,true);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,true);
    }
    public void testStdevP(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return sum(evaluator.push(),members,exp);
    }
    public void testSumNoExp(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.evaluateScalar(evaluator);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member[] members=getTupleArg(evaluator,args,0);
      Evaluator evaluator2=evaluator.push(members);
      return evaluator2.evaluateCurrent();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return evaluator.evaluateCurrent();
    }
  }
);
  if (false)   define(new ResolverBase("String_Node_Str",null,null,Syntax.Parentheses){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length == 1 && args[0].getType() == Category.Tuple) {
        return new ValueFunDef(new int[]{Category.Tuple});
      }
      for (int i=0; i < args.length; i++) {
        Exp arg=args[i];
        if (!canConvert(arg,Category.Member,conversionCount)) {
          return null;
        }
      }
      int[] argTypes=new int[args.length];
      for (int i=0; i < argTypes.length; i++) {
        argTypes[i]=Category.Member;
      }
      return new ValueFunDef(argTypes);
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,false);
    }
    public void testVar(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,false);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,true);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,true);
    }
    public void testVarP(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,false);
      if (member.isNull()) {
        return new ArrayList();
      }
      Member[] members=member.getAncestorMembers();
      final ArrayList result=new ArrayList(members.length + 1);
      result.add(member);
      addAll(result,members);
      return result;
    }
    public void testAscendants(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testAscendantsAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testAscendantsNull(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List list=(List)getArg(evaluator,args,0);
      int n=getIntArg(evaluator,args,1);
      ExpBase exp=(ExpBase)getArgNoEval(args,2,null);
      if (exp != null) {
        boolean desc=false, brk=true;
        sort(evaluator,list,exp,desc,brk);
      }
      if (n < list.size()) {
        list=list.subList(0,n);
      }
      return list;
    }
    public void testBottomCount(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,false,true,n.doubleValue());
    }
    public void testBottomPercent(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,false,false,n.doubleValue());
    }
    public void testBottomSum(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      return Arrays.asList(children);
    }
  }
);
  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 CrossJoinFunDef(dummyFunDef);
    }
    public void testCrossjoinNested(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testCrossjoinSingletonTuples(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testCrossjoinSingletonTuplesNested(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      return new CrossJoinFunDef(dummyFunDef);
    }
    public void testCrossjoinAsterisk(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testCrossjoinAsteriskAssoc(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testCrossjoinAsteriskInsideBraces(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testCrossJoinAsteriskQuery(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
);
  defineReserved(DescendantsFlags.instance);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      int depthLimit=-1;
      boolean depthSpecified=false;
      int flag=DescendantsFlags.SELF;
      if (args.length == 1) {
        depthLimit=-1;
        flag=DescendantsFlags.SELF_BEFORE_AFTER;
      }
      if (args.length >= 2) {
        if (args[1] instanceof Literal) {
          Literal literal=(Literal)args[1];
          if (literal.getValue() instanceof Number) {
            Number number=(Number)literal.getValue();
            depthLimit=number.intValue();
            depthSpecified=true;
          }
        }
      }
      if (args.length >= 3) {
        flag=getLiteralArg(args,2,DescendantsFlags.SELF,DescendantsFlags.instance,dummyFunDef);
      }
      final int depthLimitFinal=depthLimit < 0 ? Integer.MAX_VALUE : depthLimit;
      final int flagFinal=flag;
      final boolean depthSpecifiedFinal=depthSpecified;
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          Member member=getMemberArg(evaluator,args,0,true);
          Level level;
          if (depthSpecifiedFinal) {
            level=null;
          }
 else           if (args.length > 1) {
            level=getLevelArg(evaluator,args,1,true);
          }
 else {
            level=member.getLevel();
          }
          final SchemaReader schemaReader=evaluator.getSchemaReader();
          Member[] children={member};
          int depth=0;
          List result=new ArrayList();
          while (true) {
            final int currentDepth;
            final int targetDepth;
            if (level == null) {
              currentDepth=depth++;
              targetDepth=depthLimitFinal;
            }
 else {
              final Member firstChild=children[0];
              currentDepth=firstChild.getLevel().getDepth();
              targetDepth=level.getDepth();
            }
            if (currentDepth == targetDepth) {
              if ((flagFinal & DescendantsFlags.SELF) == DescendantsFlags.SELF) {
                Util.addAll(result,children);
              }
              if ((flagFinal & DescendantsFlags.AFTER) != DescendantsFlags.AFTER) {
                break;
              }
            }
 else             if (currentDepth < targetDepth) {
              if ((flagFinal & DescendantsFlags.BEFORE) == DescendantsFlags.BEFORE) {
                Util.addAll(result,children);
              }
            }
 else {
              if ((flagFinal & DescendantsFlags.AFTER) == DescendantsFlags.AFTER) {
                Util.addAll(result,children);
              }
 else {
                break;
              }
            }
            children=schemaReader.getMemberChildren(children);
            if (children.length == 0) {
              break;
            }
          }
          return result;
        }
      }
;
    }
    public void testDescendantsM(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testDescendantsML(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",months);
    }
    public void testDescendantsMLSelf(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",quarters);
    }
    public void testDescendantsMLSelfBefore(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + quarters);
    }
    public void testDescendantsMLSelfBeforeAfter(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + quarters+ nl+ months);
    }
    public void testDescendantsMLBefore(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997);
    }
    public void testDescendantsMLBeforeAfter(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + months);
    }
    public void testDescendantsMLAfter(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",months);
    }
    public void testDescendantsMLAfterEnd(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void _testDescendantsMLLeaves(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testDescendantsM0(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997);
    }
    public void testDescendantsM2(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",months);
    }
    public void testDescendantsMNY(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + months);
    }
    public void testDescendantsParentChild(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testDescendantsParentChildBefore(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List set0=(List)getArg(evaluator,args,0);
      int[] depthArray=new int[set0.size()];
      List drilledSet=new ArrayList();
      for (int i=0, m=set0.size(); i < m; i++) {
        Member member=(Member)set0.get(i);
        depthArray[i]=member.getLevel().getDepth();
      }
      Arrays.sort(depthArray);
      int maxDepth=depthArray[depthArray.length - 1];
      for (int i=0, m=set0.size(); i < m; i++) {
        Member member=(Member)set0.get(i);
        drilledSet.add(member);
        if (member.getLevel().getDepth() == maxDepth) {
          Member[] childMembers=evaluator.getSchemaReader().getMemberChildren(member);
          for (int j=0; j < childMembers.length; j++) {
            drilledSet.add(childMembers[j]);
          }
        }
      }
      return drilledSet;
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      HashSet set=new HashSet();
      set.addAll((List)getArg(evaluator,args,1));
      List set1=(List)getArg(evaluator,args,0);
      List result=new ArrayList();
      for (int i=0, count=set1.size(); i < count; i++) {
        Object o=set1.get(i);
        if (!set.contains(o)) {
          result.add(o);
        }
      }
      return result;
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      Exp exp=args[1];
      List result=new ArrayList();
      Evaluator evaluator2=evaluator.push();
      for (int i=0, count=members.size(); i < count; i++) {
        Object o=members.get(i);
        if (o instanceof Member) {
          evaluator2.setContext((Member)o);
        }
 else         if (o instanceof Member[]) {
          evaluator2.setContext((Member[])o);
        }
 else {
          throw Util.newInternal("String_Node_Str" + o.getClass());
        }
        Boolean b=(Boolean)exp.evaluateScalar(evaluator2);
        if (b.booleanValue()) {
          result.add(o);
        }
      }
      return result;
    }
    /** 
 * Make sure that slicer is in force when expression is applied on axis, E.g. select filter([Customers].members, [Unit Sales] > 100) from sales where ([Time].[1998])
 */
    public void testFilterWithSlicer(    FoodMartTestCase test){
      Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      Axis rows=result.getAxes()[1];
      Assert.assertEquals(1,rows.positions.length);
      Cell cell=result.getCell(new int[]{0,0});
      Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
    }
    public void testFilterCompound(    FoodMartTestCase test){
      Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      Position[] rows=result.getAxes()[1].positions;
      Assert.assertTrue(rows.length == 3);
      Assert.assertEquals("String_Node_Str",rows[0].members[0].getName());
      Assert.assertEquals("String_Node_Str",rows[0].members[1].getName());
      Assert.assertEquals("String_Node_Str",rows[1].members[0].getName());
      Assert.assertEquals("String_Node_Str",rows[1].members[1].getName());
      Assert.assertEquals("String_Node_Str",rows[2].members[0].getName());
      Assert.assertEquals("String_Node_Str",rows[2].members[1].getName());
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      final boolean all=getLiteralArg(args,2,"String_Node_Str",new String[]{"String_Node_Str"},dummyFunDef).equalsIgnoreCase("String_Node_Str");
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List members=(List)getArg(evaluator,args,0);
          List result=new ArrayList();
          HashSet emitted=all ? null : new HashSet();
          for (int i=0; i < members.size(); i++) {
            Object o=members.get(i);
            if (o instanceof Member) {
              evaluator.setContext((Member)o);
            }
 else {
              evaluator.setContext((Member[])o);
            }
            final List result2=(List)args[1].evaluate(evaluator);
            if (all) {
              result.addAll(result2);
            }
 else {
              for (int j=0; j < result2.size(); j++) {
                Object row=result2.get(j);
                if (emitted.add(row)) {
                  result.add(row);
                }
              }
            }
          }
          return result;
        }
      }
;
    }
    public void testGenerate(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testGenerateAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testGenerateUnique(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testGenerateCrossJoin(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      final int count=args.length < 2 ? 1 : getIntArg(evaluator,args,1);
      if (count >= members.size()) {
        return members;
      }
      if (count <= 0) {
        return new ArrayList();
      }
      return members.subList(0,count);
    }
    public void testHead(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testHeadNegative(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testHeadDefault(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testHeadOvershoot(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHeadEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      String order=getLiteralArg(args,1,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},dummyFunDef);
      final boolean post=order.equals("String_Node_Str");
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List members=(List)getArg(evaluator,args,0);
          hierarchize(members,post);
          return members;
        }
      }
;
    }
    public void testHierarchize(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHierarchizePost(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHierarchizeCrossJoinPre(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHierarchizeCrossJoinPost(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      final boolean all=getLiteralArg(args,2,"String_Node_Str",new String[]{"String_Node_Str"},dummyFunDef).equalsIgnoreCase("String_Node_Str");
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List left=(List)getArg(evaluator,args,0);
          if (left == null) {
            left=Collections.EMPTY_LIST;
          }
          List right=(List)getArg(evaluator,args,1);
          if (right == null) {
            right=Collections.EMPTY_LIST;
          }
          ArrayList result=new ArrayList();
          for (Iterator i=left.iterator(); i.hasNext(); ) {
            Object leftObject=i.next();
            if (right.contains(leftObject)) {
              if (all || !result.contains(leftObject)) {
                result.add(leftObject);
              }
            }
          }
          return result;
        }
      }
;
    }
    public void testIntersect(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testIntersectRightEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testIntersectLeftEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=(Dimension)getArg(evaluator,args,0);
      Hierarchy hierarchy=dimension.getHierarchy();
      return addMembers(evaluator.getSchemaReader(),new ArrayList(),hierarchy);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=(Hierarchy)getArg(evaluator,args,0);
      return addMembers(evaluator.getSchemaReader(),new ArrayList(),hierarchy);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=(Level)getArg(evaluator,args,0);
      return Arrays.asList(evaluator.getSchemaReader().getLevelMembers(level));
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getMonthLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  defineReserved(OrderFlags.instance);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      int order=getLiteralArg(args,2,OrderFlags.ASC,OrderFlags.instance,dummyFunDef);
      final boolean desc=OrderFlags.isDescending(order);
      final boolean brk=OrderFlags.isBreak(order);
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List members=(List)getArg(evaluator,args,0);
          ExpBase exp=(ExpBase)getArgNoEval(args,1);
          sort(evaluator,members,exp,desc,brk);
          return members;
        }
      }
;
    }
    public void testOrder(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderParentsMissing(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + "String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderCrossJoinBreak(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderCrossJoin(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderHierarchicalDesc(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testOrderCrossJoinDesc(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testOrderBug656802(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderBug712702_Simplified(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderBug712702_Original(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,false);
      Member member=getMemberArg(evaluator,args,1,false);
      return periodsToDate(evaluator,level,member);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getQuarterLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      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);
    }
    public void testSiblingsA(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testSiblingsB(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSiblingsC(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Hierarchy getHierarchy(    Exp[] args){
      return (args.length == 2) ? (Hierarchy)args[1] : null;
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      final int start=getIntArg(evaluator,args,1);
      final int end;
      if (args.length < 3) {
        end=members.size();
      }
 else {
        final int count=getIntArg(evaluator,args,2);
        end=start + count;
      }
      if (start >= end || start < 0) {
        return new ArrayList();
      }
      if (start == 0 && end >= members.size()) {
        return members;
      }
      return members.subList(start,end);
    }
    public void testSubset(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testSubsetNegativeCount(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSubsetNegativeStart(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSubsetDefault(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testSubsetOvershoot(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSubsetEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      final int count=args.length < 2 ? 1 : getIntArg(evaluator,args,1);
      if (count >= members.size()) {
        return members;
      }
      if (count <= 0) {
        return new ArrayList();
      }
      return members.subList(members.size() - count,members.size());
    }
    public void testTail(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testTailNegative(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testTailDefault(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testTailOvershoot(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testTailEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  defineReserved("String_Node_Str");
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List v0=(List)getArg(evaluator,args,0), v1=(List)getArg(evaluator,args,1);
      if (args.length > 2) {
        throw Util.newInternal("String_Node_Str");
      }
      if (v1.isEmpty()) {
        return v0;
      }
      if (v0.isEmpty()) {
        return v0;
      }
      HashSet set=new HashSet();
      set.addAll(v1);
      HashSet set1=set;
      List result=new ArrayList();
      int i=0, n=v0.size();
      while (i < n) {
        Object o=v0.get(i++);
        result.add(o);
        Member m=null;
        int k=-1;
        if (o instanceof Member) {
          if (!set1.contains(o)) {
            continue;
          }
          m=(Member)o;
          k=-1;
        }
 else {
          Util.assertTrue(o instanceof Member[]);
          Member[] members=(Member[])o;
          for (int j=0; j < members.length; j++) {
            Member member=members[j];
            if (set1.contains(member)) {
              k=j;
              m=member;
              break;
            }
          }
          if (k == -1) {
            continue;
          }
        }
        boolean isDrilledDown=false;
        if (i < n) {
          Object next=v0.get(i);
          Member nextMember=(k < 0) ? (Member)next : ((Member[])next)[k];
          boolean strict=true;
          if (isAncestorOf(m,nextMember,strict)) {
            isDrilledDown=true;
          }
        }
        if (isDrilledDown) {
          do {
            Object next=v0.get(i);
            Member nextMember=(k < 0) ? (Member)next : ((Member[])next)[k];
            boolean strict=true;
            if (isAncestorOf(m,nextMember,strict)) {
              i++;
            }
 else {
              break;
            }
          }
 while (i < n);
        }
 else {
          Member[] children=evaluator.getSchemaReader().getMemberChildren(m);
          for (int j=0; j < children.length; j++) {
            if (k < 0) {
              result.add(children[j]);
            }
 else {
              Member[] members=(Member[])((Member[])o).clone();
              members[k]=children[j];
              result.add(members);
            }
          }
        }
      }
      return result;
    }
    public void testToggleDrillState(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testToggleDrillState2(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testToggleDrillState3(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testToggleDrillStateTuple(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List list=(List)getArg(evaluator,args,0);
      int n=getIntArg(evaluator,args,1);
      ExpBase exp=(ExpBase)getArgNoEval(args,2,null);
      if (exp != null) {
        boolean desc=true, brk=true;
        sort(evaluator,list,exp,desc,brk);
      }
      if (n < list.size()) {
        list=list.subList(0,n);
      }
      return list;
    }
    public void testTopCount(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testTopCountTuple(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,true,true,n.doubleValue());
    }
    public void testTopPercent(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,true,false,n.doubleValue());
    }
    public void testTopSum(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      String allString=getLiteralArg(args,2,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},dummyFunDef);
      final boolean all=allString.equalsIgnoreCase("String_Node_Str");
      checkCompatible(args[0],args[1],dummyFunDef);
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List left=(List)getArg(evaluator,args,0), right=(List)getArg(evaluator,args,1);
          if (all) {
            if (left == null || left.isEmpty()) {
              return right;
            }
            left.addAll(right);
            return left;
          }
 else {
            HashSet added=new HashSet();
            List result=new ArrayList();
            addUnique(result,left,added);
            addUnique(result,right,added);
            return result;
          }
        }
      }
;
    }
    public void testUnionAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testUnion(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testUnionEmptyBoth(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testUnionEmptyRight(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testUnionTuple(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testUnionQuery(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      final Axis rowsAxis=result.getAxes()[1];
      Assert.assertEquals(45,rowsAxis.positions.length);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getWeekLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getYearLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      final Member member0=getMemberArg(evaluator,args,0,true);
      final Member member1=getMemberArg(evaluator,args,1,true);
      if (member0.isNull() || member1.isNull()) {
        return Collections.EMPTY_LIST;
      }
      if (member0.getLevel() != member1.getLevel()) {
        throw newEvalException(this,"String_Node_Str");
      }
      return FunUtil.memberRange(evaluator,member0,member1);
    }
    public void testRange(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    /** 
 * Large dimensions use a different member reader, therefore need to be tested separately.
 */
    public void testRangeLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testRangeStartEqualsEnd(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeStartEqualsEndLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeEndBeforeStart(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testRangeEndBeforeStartLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testRangeBetweenDifferentLevelsIsError(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByAllLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByNull(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByNullLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Braces){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      int[] parameterTypes=new int[args.length];
      for (int i=0; i < args.length; i++) {
        if (canConvert(args[i],Category.Member,conversionCount)) {
          parameterTypes[i]=Category.Member;
          continue;
        }
        if (canConvert(args[i],Category.Set,conversionCount)) {
          parameterTypes[i]=Category.Set;
          continue;
        }
        if (canConvert(args[i],Category.Tuple,conversionCount)) {
          parameterTypes[i]=Category.Tuple;
          continue;
        }
        return null;
      }
      return new SetFunDef(this,parameterTypes);
    }
    public void testSetContainingLevelFails(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
    public void testBug715177(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testBug714707(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void todo_testBug715177c(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    final Exp[] args,    final FunDef dummyFunDef){
      final Locale locale=Locale.getDefault();
      if (args[1] instanceof Literal) {
        String formatString=(String)((Literal)args[1]).getValue();
        final Format format=new Format(formatString,locale);
        return new FunDefBase(dummyFunDef){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            Double o=getDoubleArg(evaluator,args,0);
            return format.format(o);
          }
        }
;
      }
 else {
        return new FunDefBase(dummyFunDef){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            Double o=getDoubleArg(evaluator,args,0);
            String formatString=getStringArg(evaluator,args,1,null);
            final Format format=new Format(formatString,locale);
            return format.format(o);
          }
        }
;
      }
    }
    public void testFormatFixed(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testFormatVariable(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      boolean logical=getBooleanArg(evaluator,args,0);
      return getStringArg(evaluator,args,logical ? 1 : 2,null);
    }
    public void testIIf(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return dimension.getName();
    }
    public void testDimensionName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      return hierarchy.getName();
    }
    public void testHierarchyName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getName();
    }
    public void testLevelName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getName();
    }
    public void testMemberName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return dimension.getUniqueName();
    }
    public void testDimensionUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      return hierarchy.getUniqueName();
    }
    public void testHierarchyUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getUniqueName();
    }
    public void testLevelUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getUniqueName();
    }
    public void testMemberUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testMemberUniqueNameOfNull(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Hierarchy getHierarchy(    Exp[] args){
      return (args.length == 2) ? (Hierarchy)args[1] : null;
    }
  }
);
  define(new ResolverBase("String_Node_Str",null,null,Syntax.Parentheses){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length == 1) {
        return new ParenthesesFunDef(args[0].getType());
      }
 else {
        return new TupleFunDef(ExpBase.getTypes(args));
      }
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Function){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length < 1) {
        return null;
      }
      final int[] types={Category.Numeric,Category.String};
      for (int j=0; j < types.length; j++) {
        int type=types[j];
        int matchingArgs=0;
        conversionCount[0]=0;
        for (int i=0; i < args.length; i++) {
          if (canConvert(args[i],type,conversionCount)) {
            matchingArgs++;
          }
        }
        if (matchingArgs == args.length) {
          return new FunDefBase(this,type,ExpBase.getTypes(args));
        }
      }
      return null;
    }
    public boolean requiresExpression(    int k){
      return true;
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Case){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length < 1) {
        return null;
      }
      int j=0, clauseCount=args.length / 2, mismatchingArgs=0;
      int returnType=args[1].getType();
      for (int i=0; i < clauseCount; i++) {
        if (!canConvert(args[j++],Category.Logical,conversionCount)) {
          mismatchingArgs++;
        }
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      if (j < args.length) {
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      Util.assertTrue(j == args.length);
      if (mismatchingArgs == 0) {
        return new FunDefBase(this,returnType,ExpBase.getTypes(args)){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            return evaluateCaseTest(evaluator,args);
          }
        }
;
      }
 else {
        return null;
      }
    }
    public boolean requiresExpression(    int k){
      return true;
    }
    Object evaluateCaseTest(    Evaluator evaluator,    Exp[] args){
      int clauseCount=args.length / 2, j=0;
      for (int i=0; i < clauseCount; i++) {
        boolean logical=getBooleanArg(evaluator,args,j++);
        if (logical) {
          return getArg(evaluator,args,j);
        }
 else {
          j++;
        }
      }
      if (j < args.length) {
        return getArg(evaluator,args,j);
      }
 else {
        return null;
      }
    }
    public void testCaseTestMatch(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseTestMatchElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseTestMatchNoElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Case){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length < 3) {
        return null;
      }
      int valueType=args[0].getType();
      int returnType=args[2].getType();
      int j=0, clauseCount=(args.length - 1) / 2, mismatchingArgs=0;
      if (!canConvert(args[j++],valueType,conversionCount)) {
        mismatchingArgs++;
      }
      for (int i=0; i < clauseCount; i++) {
        if (!canConvert(args[j++],valueType,conversionCount)) {
          mismatchingArgs++;
        }
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      if (j < args.length) {
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      Util.assertTrue(j == args.length);
      if (mismatchingArgs == 0) {
        return new FunDefBase(this,returnType,ExpBase.getTypes(args)){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            return evaluateCaseMatch(evaluator,args);
          }
        }
;
      }
 else {
        return null;
      }
    }
    public boolean requiresExpression(    int k){
      return true;
    }
    Object evaluateCaseMatch(    Evaluator evaluator,    Exp[] args){
      int clauseCount=(args.length - 1) / 2, j=0;
      Object value=getArg(evaluator,args,j++);
      for (int i=0; i < clauseCount; i++) {
        Object match=getArg(evaluator,args,j++);
        if (match.equals(value)) {
          return getArg(evaluator,args,j);
        }
 else {
          j++;
        }
      }
      if (j < args.length) {
        return getArg(evaluator,args,j);
      }
 else {
        return null;
      }
    }
    public void testCaseMatch(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseMatchElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseMatchNoElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Method){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      final int[] argTypes=new int[]{Category.Member,Category.String};
      if (args.length != 2 || args[0].getType() != Category.Member || args[1].getType() != Category.String) {
        return null;
      }
      int returnType;
      if (args[1] instanceof Literal) {
        String propertyName=(String)((Literal)args[1]).getValue();
        Hierarchy hierarchy=args[0].getHierarchy();
        Level[] levels=hierarchy.getLevels();
        Property property=lookupProperty(levels[levels.length - 1],propertyName);
        if (property == null) {
          returnType=Category.Value;
        }
 else {
switch (property.getType()) {
case Property.TYPE_BOOLEAN:
            returnType=Category.Logical;
          break;
case Property.TYPE_NUMERIC:
        returnType=Category.Numeric;
      break;
case Property.TYPE_STRING:
    returnType=Category.String;
  break;
default :
throw Util.newInternal("String_Node_Str" + property.getType());
}
}
}
 else {
returnType=Category.Value;
}
return new PropertiesFunDef(name,signature,description,syntax,returnType,argTypes);
}
public boolean requiresExpression(int k){
return true;
}
public void testPropertiesExpr(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
/** 
 * Tests that non-existent property throws an error. 
 */
public void testPropertiesNonExistent(FoodMartTestCase test){
test.assertExprThrows("String_Node_Str","String_Node_Str");
}
public void testPropertiesFilter(FoodMartTestCase test){
Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
Assert.assertEquals(8,result.getAxes()[1].positions.length);
}
public void testPropertyInCalculatedMember(FoodMartTestCase test){
Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
Member member;
Cell cell;
member=result.getAxes()[1].positions[18].members[0];
Assert.assertEquals("String_Node_Str",member.getUniqueName());
cell=result.getCell(new int[]{0,18});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
cell=result.getCell(new int[]{1,18});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
member=result.getAxes()[1].positions[3].members[0];
Assert.assertEquals("String_Node_Str",member.getUniqueName());
cell=result.getCell(new int[]{0,3});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
cell=result.getCell(new int[]{1,3});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
}
}
);
defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}){
protected FunDef createFunDef(Exp[] args,FunDef dummyFunDef){
String parameterName;
if (args[0] instanceof Literal && args[0].getType() == Category.String) {
parameterName=(String)((Literal)args[0]).getValue();
}
 else {
throw newEvalException(dummyFunDef,"String_Node_Str");
}
Exp typeArg=args[1];
Hierarchy hierarchy;
int type;
switch (typeArg.getType()) {
case Category.Hierarchy:
case Category.Dimension:
hierarchy=typeArg.getHierarchy();
if (hierarchy == null || !isConstantHierarchy(typeArg)) {
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str");
}
type=Category.Member;
break;
case Category.Symbol:
hierarchy=null;
String s=(String)((Literal)typeArg).getValue();
if (s.equalsIgnoreCase("String_Node_Str")) {
type=Category.Numeric;
break;
}
 else if (s.equalsIgnoreCase("String_Node_Str")) {
type=Category.String;
break;
}
default :
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str");
}
Exp exp=args[2];
if (exp.getType() != type) {
String typeName=Category.instance.getName(type).toUpperCase();
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str"+ typeName);
}
if (type == Category.Member) {
Hierarchy expHierarchy=exp.getHierarchy();
if (expHierarchy != hierarchy) {
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str"+ hierarchy);
}
}
String parameterDescription=null;
if (args.length > 3) {
if (args[3] instanceof Literal && args[3].getType() == Category.String) {
parameterDescription=(String)((Literal)args[3]).getValue();
}
 else {
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str");
}
}
return new ParameterFunDef(dummyFunDef,parameterName,hierarchy,type,exp,parameterDescription);
}
}
);
define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"}){
protected FunDef createFunDef(Exp[] args,FunDef dummyFunDef){
String parameterName;
if (args[0] instanceof Literal && args[0].getType() == Category.String) {
parameterName=(String)((Literal)args[0]).getValue();
}
 else {
throw newEvalException(dummyFunDef,"String_Node_Str");
}
return new ParameterFunDef(dummyFunDef,parameterName,null,Category.Unknown,null,null);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return new Double(o0.doubleValue() + o1.doubleValue());
}
public void testPlus(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return new Double(o0.doubleValue() - o1.doubleValue());
}
public void testMinus(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testMinusAssociativity(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return new Double(o0.doubleValue() * o1.doubleValue());
}
public void testMultiply(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testMultiplyPrecedence(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
/** 
 * Bug 774807 caused expressions to be mistaken for the crossjoin operator. 
 */
public void testMultiplyBug774807(FoodMartTestCase test){
final String desiredResult="String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl;
test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str",desiredResult);
test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str",desiredResult);
test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str",desiredResult);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
Double result=new Double(o0.doubleValue() / o1.doubleValue());
return result;
}
public double evaluate(double d1,double d2){
return d1 / d2;
}
public void testDivide(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testDivideByZero(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testDividePrecedence(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0);
return new Double(-o0.doubleValue());
}
public void testUnaryMinus(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testUnaryMinusMember(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testUnaryMinusPrecedence(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
String o0=getStringArg(evaluator,args,0,null), o1=getStringArg(evaluator,args,1,null);
return o0 + o1;
}
public void testStringConcat(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testStringConcat2(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
return toBoolean(getBooleanArg(evaluator,args,0) && getBooleanArg(evaluator,args,1));
}
public void testAnd(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testAnd2(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
return toBoolean(getBooleanArg(evaluator,args,0) || getBooleanArg(evaluator,args,1));
}
public void testOr(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOr2(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOrAssociativity1(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOrAssociativity2(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOrAssociativity3(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
final boolean b0=getBooleanArg(evaluator,args,0);
final boolean b1=getBooleanArg(evaluator,args,1);
return toBoolean(b0 != b1);
}
public void testXor(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testXorAssociativity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
return toBoolean(!getBooleanArg(evaluator,args,0));
}
public void testNot(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testNotNot(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testNotAssociativity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
String o0=getStringArg(evaluator,args,0,null), o1=getStringArg(evaluator,args,1,null);
return toBoolean(o0.equals(o1));
}
public void testStringEquals(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testStringEqualsAssociativity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testStringEqualsEmpty(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.equals(o1));
}
public void testEq(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
String o0=getStringArg(evaluator,args,0,null), o1=getStringArg(evaluator,args,1,null);
return toBoolean(!o0.equals(o1));
}
public void testStringNe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(!o0.equals(o1));
}
public void testNe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testNeInfinity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) < 0);
}
public void testLt(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) <= 0);
}
public void testLe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) > 0);
}
public void testGt(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) >= 0);
}
public void testGe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
}

Fixed version (ground truth):
/** 
 * Derived class can override this method to add more functions.
 */
protected void defineFunctions(){
  defineReserved("String_Node_Str");
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      return hierarchy.getDimension();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return dimension;
    }
    public void testDimensionHierarchy(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getDimension();
    }
    public void testLevelDimension(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getDimension();
    }
    public void testMemberDimension(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Cube cube=evaluator.getCube();
      Dimension[] dimensions=cube.getDimensions();
      int n=getIntArg(evaluator,args,0);
      if ((n > dimensions.length) || (n < 1)) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return dimensions[n - 1];
    }
    public void testDimensionsNumeric(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      String defValue="String_Node_Str";
      String s=getStringArg(evaluator,args,0,defValue);
      if (s.indexOf("String_Node_Str") == -1) {
        s=Util.quoteMdxIdentifier(s);
      }
      OlapElement o=lookupCompound(evaluator.getSchemaReader(),evaluator.getCube(),explode(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);
      }
    }
    public void testDimensionsString(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getHierarchy();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getHierarchy();
    }
    public void testTime(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testBasic9(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testFirstInLevel9(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testHierarchyAll(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testHierarchyNull(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getLevel();
    }
    public void testMemberLevel(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      Level[] levels=hierarchy.getLevels();
      int n=getIntArg(evaluator,args,1);
      if ((n > levels.length) || (n < 1)) {
        throw newEvalException(this,"String_Node_Str" + n + "String_Node_Str");
      }
      return levels[n - 1];
    }
    public void testLevelsNumeric(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testLevelsTooSmall(    FoodMartTestCase test){
      test.assertExprThrows("String_Node_Str","String_Node_Str");
    }
    public void testLevelsTooLarge(    FoodMartTestCase test){
      test.assertExprThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      String s=getStringArg(evaluator,args,0,null);
      Cube cube=evaluator.getCube();
      OlapElement o=null;
      if (s.startsWith("String_Node_Str")) {
        o=lookupCompound(evaluator.getSchemaReader(),cube,explode(s),false,Category.Level);
      }
 else {
        o=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);
      }
    }
    public void testLevelsString(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testLevelsStringFail(    FoodMartTestCase test){
      test.assertExprThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Object o=getScalarArg(evaluator,args,0);
      if (o == Util.nullValue) {
        return Boolean.TRUE;
      }
 else {
        return Boolean.FALSE;
      }
    }
    public void testIsEmpty(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,false);
      Level level=getLevelArg(evaluator,args,1,false);
      if (member.getHierarchy() != level.getHierarchy()) {
        throw newEvalException(this,"String_Node_Str" + member + "String_Node_Str"+ level+ "String_Node_Str");
      }
      if (member.getLevel().equals(level)) {
        return member;
      }
      Member[] members=member.getAncestorMembers();
      for (int i=0; i < members.length; i++) {
        if (members[i].getLevel().equals(level))         return members[i];
      }
      return member.getHierarchy().getNullMember();
    }
    public void testAncestor(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testAncestorHigher(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testAncestorSameLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testAncestorWrongHierarchy(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
    public void testAncestorAllLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertTrue(member.isAll());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Cube cube=evaluator.getCube();
      Dimension timeDimension=cube.getYearLevel().getDimension();
      Member member=evaluator.getContext(timeDimension);
      Level level=member.getLevel().getChildLevel();
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriodNoArgs(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Cube cube=evaluator.getCube();
      Dimension timeDimension=cube.getYearLevel().getDimension();
      Member member=evaluator.getContext(timeDimension);
      Level level=getLevelArg(evaluator,args,0,true);
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriodLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testClosingPeriodLevelNotInTimeFails(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Level level=member.getLevel().getChildLevel();
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriodMember(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testClosingPeriodMemberLeaf(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      Member member=getMemberArg(evaluator,args,1,true);
      return openClosingPeriod(evaluator,this,member,level);
    }
    public void testClosingPeriod(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testClosingPeriodBelow(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member1=getMemberArg(evaluator,args,0,true);
      Member member2=getMemberArg(evaluator,args,1,true);
      Member cousin=cousin(evaluator.getSchemaReader(),member1,member2);
      if (cousin == null) {
        cousin=member1.getHierarchy().getNullMember();
      }
      return cousin;
    }
    private Member cousin(    SchemaReader schemaReader,    Member member1,    Member member2){
      if (member1.getHierarchy() != member2.getHierarchy()) {
        throw newEvalException(this,"String_Node_Str" + member1 + "String_Node_Str"+ member2+ "String_Node_Str");
      }
      if (member1.getLevel().getDepth() < member2.getLevel().getDepth()) {
        return null;
      }
      return cousin2(schemaReader,member1,member2);
    }
    private Member cousin2(    SchemaReader schemaReader,    Member member1,    Member member2){
      if (member1.getLevel() == member2.getLevel()) {
        return member2;
      }
      Member uncle=cousin2(schemaReader,member1.getParentMember(),member2);
      if (uncle == null) {
        return null;
      }
      int ordinal=Util.getMemberOrdinalInParent(schemaReader,member1);
      Member[] cousins=schemaReader.getMemberChildren(uncle);
      if (cousins.length <= ordinal) {
        return null;
      }
      return cousins[ordinal];
    }
    public void testCousin1(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testCousin2(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testCousinOverrun(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testCousinThreeDown(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getUniqueName());
    }
    public void testCousinSameLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testCousinHigherLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testCousinWrongHierarchy(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return evaluator.getContext(dimension);
    }
    public void testCurrentMemberFromSlicer(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0}).getValue());
    }
    public void testCurrentMemberFromDefaultMember(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0}).getValue());
    }
    public void testCurrentMemberFromAxis(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0,0}).getValue());
    }
    /** 
 * When evaluating a calculated member, MSOLAP regards that calculated member as the current member of that dimension, so it cycles in this case. But I disagree; it is the previous current member, before the calculated member was expanded.
 */
    public void testCurrentMemberInCalcMember(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
      Assert.assertEquals("String_Node_Str",result.getCell(new int[]{0}).getValue());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return evaluator.getSchemaReader().getHierarchyDefaultMember(dimension.getHierarchy());
    }
    public void testDimensionDefaultMember(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      if (children.length == 0) {
        return member.getHierarchy().getNullMember();
      }
 else {
        return children[0];
      }
    }
    public void testFirstChildFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstChildAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstChildOfChildless(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member parent=member.getParentMember();
      Member[] children;
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=evaluator.getSchemaReader().getMemberChildren(parent);
      }
      return children[0];
    }
    public void testFirstSiblingFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstSiblingLastInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstSiblingAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertTrue(member.isAll());
    }
    public void testFirstSiblingRoot(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testFirstSiblingNull(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      int n=getIntArg(evaluator,args,1);
      return evaluator.getSchemaReader().getLeadMember(member,-n);
    }
    public void testLag(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLagFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testLagAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
    public void testLagRoot(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLagRootTooFar(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      if (children.length == 0) {
        return member.getHierarchy().getNullMember();
      }
 else {
        return children[children.length - 1];
      }
    }
    public void testLastChild(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastChildLastInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastChildAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastChildOfChildless(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member parent=member.getParentMember();
      Member[] children;
      if (parent == null) {
        if (member.isNull()) {
          return member;
        }
        children=evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy());
      }
 else {
        children=evaluator.getSchemaReader().getMemberChildren(parent);
      }
      return children[children.length - 1];
    }
    public void testLastSibling(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastSiblingFirstInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastSiblingAll(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertTrue(member.isAll());
    }
    public void testLastSiblingRoot(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLastSiblingNull(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      int n=getIntArg(evaluator,args,1);
      return evaluator.getSchemaReader().getLeadMember(member,n);
    }
    public void testLead(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLeadNegative(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertEquals("String_Node_Str",member.getName());
    }
    public void testLeadLastInLevel(    FoodMartTestCase test){
      Member member=test.executeAxis("String_Node_Str");
      Assert.assertNull(member);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return evaluator.getSchemaReader().getLeadMember(member,+1);
    }
    public void testBasic2(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testFirstInLevel2(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
    public void testAll2(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member parent=member.getParentMember();
      if (parent == null || !evaluator.getSchemaReader().getRole().canAccess(parent)) {
        parent=member.getHierarchy().getNullMember();
      }
      return parent;
    }
    public void testBasic5(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testFirstInLevel5(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testAll5(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return evaluator.getSchemaReader().getLeadMember(member,-1);
    }
    public void testBasic(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("String_Node_Str"));
    }
    public void testFirstInLevel(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
    public void testAll(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str");
      Assert.assertTrue(result.getAxes()[0].positions.length == 0);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE);
      if (aggregator == null) {
        throw newEvalException(null,"String_Node_Str");
      }
      Aggregator rollup=aggregator.getRollup();
      if (rollup == null) {
        throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
      }
      return rollup.aggregate(evaluator.push(),members,exp);
    }
    public void testAggregate(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testAggregate2(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testAggregateToSimulateCompoundSlicer(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      Member member=evaluator.getParent().getContext(hierarchy.getDimension());
      List members=(List)member.getPropertyValue(Property.PROPERTY_CONTRIBUTING_CHILDREN);
      Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE);
      if (aggregator == null) {
        throw newEvalException(null,"String_Node_Str");
      }
      Aggregator rollup=aggregator.getRollup();
      if (rollup == null) {
        throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
      }
      return rollup.aggregate(evaluator.push(),members,valueFunCall);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return avg(evaluator.push(),members,exp);
    }
    public void testAvg(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp1=(ExpBase)getArgNoEval(args,1);
      ExpBase exp2=(ExpBase)getArgNoEval(args,2,valueFunCall);
      return correlation(evaluator.push(),members,exp1,exp2);
    }
    public void testCorrelation(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      String empties=getLiteralArg(args,1,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},null);
      final boolean includeEmpty=empties.equals("String_Node_Str");
      return count(evaluator,members,includeEmpty);
    }
    public void testCount(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
    public void testCountExcludeEmpty(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp1=(ExpBase)getArgNoEval(args,1);
      ExpBase exp2=(ExpBase)getArgNoEval(args,2);
      return covariance(evaluator.push(),members,exp1,exp2,true);
    }
    public void testCovariance(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp1=(ExpBase)getArgNoEval(args,1);
      ExpBase exp2=(ExpBase)getArgNoEval(args,2,valueFunCall);
      return covariance(evaluator.push(),members,exp1,exp2,false);
    }
    public void testCovarianceN(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      boolean logical=getBooleanArg(evaluator,args,0);
      return getDoubleArg(evaluator,args,logical ? 1 : 2,null);
    }
    public void testIIfNumeric(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return max(evaluator.push(),members,exp);
    }
    public void testMax(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return median(evaluator.push(),members,exp);
    }
    public void testMedian(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
    public void testMedian2(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return min(evaluator.push(),members,exp);
    }
    public void testMin(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
    public void testMinTupel(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,false);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,false);
    }
    public void testStdev(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,true);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return stdev(evaluator.push(),members,exp,true);
    }
    public void testStdevP(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return sum(evaluator.push(),members,exp);
    }
    public void testSumNoExp(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.evaluateScalar(evaluator);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member[] members=getTupleArg(evaluator,args,0);
      Evaluator evaluator2=evaluator.push(members);
      return evaluator2.evaluateCurrent();
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return evaluator.evaluateCurrent();
    }
  }
);
  if (false)   define(new ResolverBase("String_Node_Str",null,null,Syntax.Parentheses){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length == 1 && args[0].getType() == Category.Tuple) {
        return new ValueFunDef(new int[]{Category.Tuple});
      }
      for (int i=0; i < args.length; i++) {
        Exp arg=args[i];
        if (!canConvert(arg,Category.Member,conversionCount)) {
          return null;
        }
      }
      int[] argTypes=new int[args.length];
      for (int i=0; i < argTypes.length; i++) {
        argTypes[i]=Category.Member;
      }
      return new ValueFunDef(argTypes);
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,false);
    }
    public void testVar(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,false);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,true);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,1,valueFunCall);
      return var(evaluator.push(),members,exp,true);
    }
    public void testVarP(    FoodMartTestCase test){
      String result=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",result);
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,false);
      if (member.isNull()) {
        return new ArrayList();
      }
      Member[] members=member.getAncestorMembers();
      final ArrayList result=new ArrayList(members.length + 1);
      result.add(member);
      addAll(result,members);
      return result;
    }
    public void testAscendants(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testAscendantsAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testAscendantsNull(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List list=(List)getArg(evaluator,args,0);
      int n=getIntArg(evaluator,args,1);
      ExpBase exp=(ExpBase)getArgNoEval(args,2,null);
      if (exp != null) {
        boolean desc=false, brk=true;
        sort(evaluator,list,exp,desc,brk);
      }
      if (n < list.size()) {
        list=list.subList(0,n);
      }
      return list;
    }
    public void testBottomCount(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,false,true,n.doubleValue());
    }
    public void testBottomPercent(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,false,false,n.doubleValue());
    }
    public void testBottomSum(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      Member[] children=evaluator.getSchemaReader().getMemberChildren(member);
      return Arrays.asList(children);
    }
  }
);
  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 CrossJoinFunDef(dummyFunDef);
    }
    public void testCrossjoinNested(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testCrossjoinSingletonTuples(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testCrossjoinSingletonTuplesNested(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      return new CrossJoinFunDef(dummyFunDef);
    }
    public void testCrossjoinAsterisk(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testCrossjoinAsteriskAssoc(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testCrossjoinAsteriskInsideBraces(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testCrossJoinAsteriskQuery(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
);
  defineReserved(DescendantsFlags.instance);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      int depthLimit=-1;
      boolean depthSpecified=false;
      int flag=DescendantsFlags.SELF;
      if (args.length == 1) {
        depthLimit=-1;
        flag=DescendantsFlags.SELF_BEFORE_AFTER;
      }
      if (args.length >= 2) {
        if (args[1] instanceof Literal) {
          Literal literal=(Literal)args[1];
          if (literal.getValue() instanceof Number) {
            Number number=(Number)literal.getValue();
            depthLimit=number.intValue();
            depthSpecified=true;
          }
        }
      }
      if (args.length >= 3) {
        flag=getLiteralArg(args,2,DescendantsFlags.SELF,DescendantsFlags.instance,dummyFunDef);
      }
      final int depthLimitFinal=depthLimit < 0 ? Integer.MAX_VALUE : depthLimit;
      final int flagFinal=flag;
      final boolean depthSpecifiedFinal=depthSpecified;
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          Member member=getMemberArg(evaluator,args,0,true);
          Level level;
          if (depthSpecifiedFinal) {
            level=null;
          }
 else           if (args.length > 1) {
            level=getLevelArg(evaluator,args,1,true);
          }
 else {
            level=member.getLevel();
          }
          final SchemaReader schemaReader=evaluator.getSchemaReader();
          Member[] children={member};
          int depth=0;
          List result=new ArrayList();
          while (true) {
            final int currentDepth;
            final int targetDepth;
            if (level == null) {
              currentDepth=depth++;
              targetDepth=depthLimitFinal;
            }
 else {
              final Member firstChild=children[0];
              currentDepth=firstChild.getLevel().getDepth();
              targetDepth=level.getDepth();
            }
            if (currentDepth == targetDepth) {
              if ((flagFinal & DescendantsFlags.SELF) == DescendantsFlags.SELF) {
                Util.addAll(result,children);
              }
              if ((flagFinal & DescendantsFlags.AFTER) != DescendantsFlags.AFTER) {
                break;
              }
            }
 else             if (currentDepth < targetDepth) {
              if ((flagFinal & DescendantsFlags.BEFORE) == DescendantsFlags.BEFORE) {
                Util.addAll(result,children);
              }
            }
 else {
              if ((flagFinal & DescendantsFlags.AFTER) == DescendantsFlags.AFTER) {
                Util.addAll(result,children);
              }
 else {
                break;
              }
            }
            children=schemaReader.getMemberChildren(children);
            if (children.length == 0) {
              break;
            }
          }
          return result;
        }
      }
;
    }
    public void testDescendantsM(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testDescendantsML(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",months);
    }
    public void testDescendantsMLSelf(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",quarters);
    }
    public void testDescendantsMLSelfBefore(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + quarters);
    }
    public void testDescendantsMLSelfBeforeAfter(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + quarters+ nl+ months);
    }
    public void testDescendantsMLBefore(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997);
    }
    public void testDescendantsMLBeforeAfter(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + months);
    }
    public void testDescendantsMLAfter(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",months);
    }
    public void testDescendantsMLAfterEnd(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void _testDescendantsMLLeaves(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testDescendantsM0(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997);
    }
    public void testDescendantsM2(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",months);
    }
    public void testDescendantsMNY(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str",year1997 + nl + months);
    }
    public void testDescendantsParentChild(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testDescendantsParentChildBefore(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List set0=(List)getArg(evaluator,args,0);
      int[] depthArray=new int[set0.size()];
      List drilledSet=new ArrayList();
      for (int i=0, m=set0.size(); i < m; i++) {
        Member member=(Member)set0.get(i);
        depthArray[i]=member.getLevel().getDepth();
      }
      Arrays.sort(depthArray);
      int maxDepth=depthArray[depthArray.length - 1];
      for (int i=0, m=set0.size(); i < m; i++) {
        Member member=(Member)set0.get(i);
        drilledSet.add(member);
        if (member.getLevel().getDepth() == maxDepth) {
          Member[] childMembers=evaluator.getSchemaReader().getMemberChildren(member);
          for (int j=0; j < childMembers.length; j++) {
            drilledSet.add(childMembers[j]);
          }
        }
      }
      return drilledSet;
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      HashSet set=new HashSet();
      set.addAll((List)getArg(evaluator,args,1));
      List set1=(List)getArg(evaluator,args,0);
      List result=new ArrayList();
      for (int i=0, count=set1.size(); i < count; i++) {
        Object o=set1.get(i);
        if (!set.contains(o)) {
          result.add(o);
        }
      }
      return result;
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      Exp exp=args[1];
      List result=new ArrayList();
      Evaluator evaluator2=evaluator.push();
      for (int i=0, count=members.size(); i < count; i++) {
        Object o=members.get(i);
        if (o instanceof Member) {
          evaluator2.setContext((Member)o);
        }
 else         if (o instanceof Member[]) {
          evaluator2.setContext((Member[])o);
        }
 else {
          throw Util.newInternal("String_Node_Str" + o.getClass());
        }
        Boolean b=(Boolean)exp.evaluateScalar(evaluator2);
        if (b.booleanValue()) {
          result.add(o);
        }
      }
      return result;
    }
    /** 
 * Make sure that slicer is in force when expression is applied on axis, E.g. select filter([Customers].members, [Unit Sales] > 100) from sales where ([Time].[1998])
 */
    public void testFilterWithSlicer(    FoodMartTestCase test){
      Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      Axis rows=result.getAxes()[1];
      Assert.assertEquals(1,rows.positions.length);
      Cell cell=result.getCell(new int[]{0,0});
      Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
    }
    public void testFilterCompound(    FoodMartTestCase test){
      Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      Position[] rows=result.getAxes()[1].positions;
      Assert.assertTrue(rows.length == 3);
      Assert.assertEquals("String_Node_Str",rows[0].members[0].getName());
      Assert.assertEquals("String_Node_Str",rows[0].members[1].getName());
      Assert.assertEquals("String_Node_Str",rows[1].members[0].getName());
      Assert.assertEquals("String_Node_Str",rows[1].members[1].getName());
      Assert.assertEquals("String_Node_Str",rows[2].members[0].getName());
      Assert.assertEquals("String_Node_Str",rows[2].members[1].getName());
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      final boolean all=getLiteralArg(args,2,"String_Node_Str",new String[]{"String_Node_Str"},dummyFunDef).equalsIgnoreCase("String_Node_Str");
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List members=(List)getArg(evaluator,args,0);
          List result=new ArrayList();
          HashSet emitted=all ? null : new HashSet();
          for (int i=0; i < members.size(); i++) {
            Object o=members.get(i);
            if (o instanceof Member) {
              evaluator.setContext((Member)o);
            }
 else {
              evaluator.setContext((Member[])o);
            }
            final List result2=(List)args[1].evaluate(evaluator);
            if (all) {
              result.addAll(result2);
            }
 else {
              for (int j=0; j < result2.size(); j++) {
                Object row=result2.get(j);
                if (emitted.add(row)) {
                  result.add(row);
                }
              }
            }
          }
          return result;
        }
      }
;
    }
    public void testGenerate(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testGenerateAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testGenerateUnique(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testGenerateCrossJoin(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      final int count=args.length < 2 ? 1 : getIntArg(evaluator,args,1);
      if (count >= members.size()) {
        return members;
      }
      if (count <= 0) {
        return new ArrayList();
      }
      return members.subList(0,count);
    }
    public void testHead(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testHeadNegative(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testHeadDefault(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testHeadOvershoot(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHeadEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      String order=getLiteralArg(args,1,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},dummyFunDef);
      final boolean post=order.equals("String_Node_Str");
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List members=(List)getArg(evaluator,args,0);
          hierarchize(members,post);
          return members;
        }
      }
;
    }
    public void testHierarchize(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHierarchizePost(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHierarchizeCrossJoinPre(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testHierarchizeCrossJoinPost(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      final boolean all=getLiteralArg(args,2,"String_Node_Str",new String[]{"String_Node_Str"},dummyFunDef).equalsIgnoreCase("String_Node_Str");
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List left=(List)getArg(evaluator,args,0);
          if (left == null) {
            left=Collections.EMPTY_LIST;
          }
          List right=(List)getArg(evaluator,args,1);
          if (right == null) {
            right=Collections.EMPTY_LIST;
          }
          ArrayList result=new ArrayList();
          for (Iterator i=left.iterator(); i.hasNext(); ) {
            Object leftObject=i.next();
            if (right.contains(leftObject)) {
              if (all || !result.contains(leftObject)) {
                result.add(leftObject);
              }
            }
          }
          return result;
        }
      }
;
    }
    public void testIntersect(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testIntersectRightEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testIntersectLeftEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=(Dimension)getArg(evaluator,args,0);
      Hierarchy hierarchy=dimension.getHierarchy();
      return addMembers(evaluator.getSchemaReader(),new ArrayList(),hierarchy);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=(Hierarchy)getArg(evaluator,args,0);
      return addMembers(evaluator.getSchemaReader(),new ArrayList(),hierarchy);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=(Level)getArg(evaluator,args,0);
      return Arrays.asList(evaluator.getSchemaReader().getLevelMembers(level));
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getMonthLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  defineReserved(OrderFlags.instance);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      int order=getLiteralArg(args,2,OrderFlags.ASC,OrderFlags.instance,dummyFunDef);
      final boolean desc=OrderFlags.isDescending(order);
      final boolean brk=OrderFlags.isBreak(order);
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List members=(List)getArg(evaluator,args,0);
          ExpBase exp=(ExpBase)getArgNoEval(args,1);
          sort(evaluator,members,exp,desc,brk);
          return members;
        }
      }
;
    }
    public void testOrder(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderParentsMissing(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + "String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderCrossJoinBreak(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderCrossJoin(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderHierarchicalDesc(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testOrderCrossJoinDesc(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testOrderBug656802(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderBug712702_Simplified(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testOrderBug712702_Original(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,false);
      Member member=getMemberArg(evaluator,args,1,false);
      return periodsToDate(evaluator,level,member);
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getQuarterLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      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);
    }
    public void testSiblingsA(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testSiblingsB(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSiblingsC(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Hierarchy getHierarchy(    Exp[] args){
      return (args.length == 2) ? (Hierarchy)args[1] : null;
    }
  }
);
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      final int start=getIntArg(evaluator,args,1);
      final int end;
      if (args.length < 3) {
        end=members.size();
      }
 else {
        final int count=getIntArg(evaluator,args,2);
        end=start + count;
      }
      if (start >= end || start < 0) {
        return new ArrayList();
      }
      if (start == 0 && end >= members.size()) {
        return members;
      }
      return members.subList(start,end);
    }
    public void testSubset(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testSubsetNegativeCount(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSubsetNegativeStart(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSubsetDefault(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testSubsetOvershoot(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testSubsetEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      final int count=args.length < 2 ? 1 : getIntArg(evaluator,args,1);
      if (count >= members.size()) {
        return members;
      }
      if (count <= 0) {
        return new ArrayList();
      }
      return members.subList(members.size() - count,members.size());
    }
    public void testTail(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testTailNegative(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testTailDefault(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testTailOvershoot(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testTailEmpty(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  defineReserved("String_Node_Str");
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List v0=(List)getArg(evaluator,args,0), v1=(List)getArg(evaluator,args,1);
      if (args.length > 2) {
        throw Util.newInternal("String_Node_Str");
      }
      if (v1.isEmpty()) {
        return v0;
      }
      if (v0.isEmpty()) {
        return v0;
      }
      HashSet set=new HashSet();
      set.addAll(v1);
      HashSet set1=set;
      List result=new ArrayList();
      int i=0, n=v0.size();
      while (i < n) {
        Object o=v0.get(i++);
        result.add(o);
        Member m=null;
        int k=-1;
        if (o instanceof Member) {
          if (!set1.contains(o)) {
            continue;
          }
          m=(Member)o;
          k=-1;
        }
 else {
          Util.assertTrue(o instanceof Member[]);
          Member[] members=(Member[])o;
          for (int j=0; j < members.length; j++) {
            Member member=members[j];
            if (set1.contains(member)) {
              k=j;
              m=member;
              break;
            }
          }
          if (k == -1) {
            continue;
          }
        }
        boolean isDrilledDown=false;
        if (i < n) {
          Object next=v0.get(i);
          Member nextMember=(k < 0) ? (Member)next : ((Member[])next)[k];
          boolean strict=true;
          if (isAncestorOf(m,nextMember,strict)) {
            isDrilledDown=true;
          }
        }
        if (isDrilledDown) {
          do {
            Object next=v0.get(i);
            Member nextMember=(k < 0) ? (Member)next : ((Member[])next)[k];
            boolean strict=true;
            if (isAncestorOf(m,nextMember,strict)) {
              i++;
            }
 else {
              break;
            }
          }
 while (i < n);
        }
 else {
          Member[] children=evaluator.getSchemaReader().getMemberChildren(m);
          for (int j=0; j < children.length; j++) {
            if (k < 0) {
              result.add(children[j]);
            }
 else {
              Member[] members=(Member[])((Member[])o).clone();
              members[k]=children[j];
              result.add(members);
            }
          }
        }
      }
      return result;
    }
    public void testToggleDrillState(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testToggleDrillState2(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testToggleDrillState3(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testToggleDrillStateTuple(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List list=(List)getArg(evaluator,args,0);
      int n=getIntArg(evaluator,args,1);
      ExpBase exp=(ExpBase)getArgNoEval(args,2,null);
      if (exp != null) {
        boolean desc=true, brk=true;
        sort(evaluator,list,exp,desc,brk);
      }
      if (n < list.size()) {
        list=list.subList(0,n);
      }
      return list;
    }
    public void testTopCount(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testTopCountTuple(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,true,true,n.doubleValue());
    }
    public void testTopPercent(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      List members=(List)getArg(evaluator,args,0);
      ExpBase exp=(ExpBase)getArgNoEval(args,2);
      Double n=getDoubleArg(evaluator,args,1);
      return topOrBottom(evaluator.push(),members,exp,true,false,n.doubleValue());
    }
    public void testTopSum(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
  }
));
  defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    Exp[] args,    FunDef dummyFunDef){
      String allString=getLiteralArg(args,2,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},dummyFunDef);
      final boolean all=allString.equalsIgnoreCase("String_Node_Str");
      checkCompatible(args[0],args[1],dummyFunDef);
      return new FunDefBase(dummyFunDef){
        public Object evaluate(        Evaluator evaluator,        Exp[] args){
          List left=(List)getArg(evaluator,args,0), right=(List)getArg(evaluator,args,1);
          if (all) {
            if (left == null || left.isEmpty()) {
              return right;
            }
            left.addAll(right);
            return left;
          }
 else {
            HashSet added=new HashSet();
            List result=new ArrayList();
            addUnique(result,left,added);
            addUnique(result,right,added);
            return result;
          }
        }
      }
;
    }
    public void testUnionAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str");
    }
    public void testUnion(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testUnionEmptyBoth(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testUnionEmptyRight(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testUnionTuple(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testUnionQuery(    FoodMartTestCase test){
      Result result=test.runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
      final Axis rowsAxis=result.getAxes()[1];
      Assert.assertEquals(45,rowsAxis.positions.length);
    }
  }
);
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getWeekLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  define(new FunkResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new FunkBase(){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      return periodsToDate(evaluator,evaluator.getCube().getYearLevel(),getMemberArg(evaluator,args,0,false));
    }
  }
));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      final Member member0=getMemberArg(evaluator,args,0,true);
      final Member member1=getMemberArg(evaluator,args,1,true);
      if (member0.isNull() || member1.isNull()) {
        return Collections.EMPTY_LIST;
      }
      if (member0.getLevel() != member1.getLevel()) {
        throw newEvalException(this,"String_Node_Str");
      }
      return FunUtil.memberRange(evaluator,member0,member1);
    }
    public void testRange(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    /** 
 * Large dimensions use a different member reader, therefore need to be tested separately.
 */
    public void testRangeLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testRangeStartEqualsEnd(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeStartEqualsEndLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeEndBeforeStart(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testRangeEndBeforeStartLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void testRangeBetweenDifferentLevelsIsError(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByAll(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByAllLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByNull(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
    public void testRangeBoundedByNullLarge(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Braces){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      int[] parameterTypes=new int[args.length];
      for (int i=0; i < args.length; i++) {
        if (canConvert(args[i],Category.Member,conversionCount)) {
          parameterTypes[i]=Category.Member;
          continue;
        }
        if (canConvert(args[i],Category.Set,conversionCount)) {
          parameterTypes[i]=Category.Set;
          continue;
        }
        if (canConvert(args[i],Category.Tuple,conversionCount)) {
          parameterTypes[i]=Category.Tuple;
          continue;
        }
        return null;
      }
      return new SetFunDef(this,parameterTypes);
    }
    public void testSetContainingLevelFails(    FoodMartTestCase test){
      test.assertAxisThrows("String_Node_Str","String_Node_Str");
    }
    public void testBug715177(    FoodMartTestCase test){
      test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl);
    }
    public void testBug714707(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
    }
    public void todo_testBug715177c(    FoodMartTestCase test){
      test.assertAxisReturns("String_Node_Str","String_Node_Str");
    }
  }
);
  define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"}){
    protected FunDef createFunDef(    final Exp[] args,    final FunDef dummyFunDef){
      final Locale locale=Locale.getDefault();
      if (args[1] instanceof Literal) {
        String formatString=(String)((Literal)args[1]).getValue();
        final Format format=new Format(formatString,locale);
        return new FunDefBase(dummyFunDef){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            Double o=getDoubleArg(evaluator,args,0);
            return format.format(o);
          }
        }
;
      }
 else {
        return new FunDefBase(dummyFunDef){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            Double o=getDoubleArg(evaluator,args,0);
            String formatString=getStringArg(evaluator,args,1,null);
            final Format format=new Format(formatString,locale);
            return format.format(o);
          }
        }
;
      }
    }
    public void testFormatFixed(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testFormatVariable(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      boolean logical=getBooleanArg(evaluator,args,0);
      return getStringArg(evaluator,args,logical ? 1 : 2,null);
    }
    public void testIIf(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return dimension.getName();
    }
    public void testDimensionName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      return hierarchy.getName();
    }
    public void testHierarchyName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getName();
    }
    public void testLevelName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getName();
    }
    public void testMemberName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Dimension dimension=getDimensionArg(evaluator,args,0,true);
      return dimension.getUniqueName();
    }
    public void testDimensionUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Hierarchy hierarchy=getHierarchyArg(evaluator,args,0,true);
      return hierarchy.getUniqueName();
    }
    public void testHierarchyUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Level level=getLevelArg(evaluator,args,0,true);
      return level.getUniqueName();
    }
    public void testLevelUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Object evaluate(    Evaluator evaluator,    Exp[] args){
      Member member=getMemberArg(evaluator,args,0,true);
      return member.getUniqueName();
    }
    public void testMemberUniqueName(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testMemberUniqueNameOfNull(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  if (false)   define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
    public Hierarchy getHierarchy(    Exp[] args){
      return (args.length == 2) ? (Hierarchy)args[1] : null;
    }
  }
);
  define(new ResolverBase("String_Node_Str",null,null,Syntax.Parentheses){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length == 1) {
        return new ParenthesesFunDef(args[0].getType());
      }
 else {
        return new TupleFunDef(ExpBase.getTypes(args));
      }
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Function){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length < 1) {
        return null;
      }
      final int[] types={Category.Numeric,Category.String};
      for (int j=0; j < types.length; j++) {
        int type=types[j];
        int matchingArgs=0;
        conversionCount[0]=0;
        for (int i=0; i < args.length; i++) {
          if (canConvert(args[i],type,conversionCount)) {
            matchingArgs++;
          }
        }
        if (matchingArgs == args.length) {
          return new FunDefBase(this,type,ExpBase.getTypes(args));
        }
      }
      return null;
    }
    public boolean requiresExpression(    int k){
      return true;
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Case){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length < 1) {
        return null;
      }
      int j=0, clauseCount=args.length / 2, mismatchingArgs=0;
      int returnType=args[1].getType();
      for (int i=0; i < clauseCount; i++) {
        if (!canConvert(args[j++],Category.Logical,conversionCount)) {
          mismatchingArgs++;
        }
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      if (j < args.length) {
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      Util.assertTrue(j == args.length);
      if (mismatchingArgs == 0) {
        return new FunDefBase(this,returnType,ExpBase.getTypes(args)){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            return evaluateCaseTest(evaluator,args);
          }
        }
;
      }
 else {
        return null;
      }
    }
    public boolean requiresExpression(    int k){
      return true;
    }
    Object evaluateCaseTest(    Evaluator evaluator,    Exp[] args){
      int clauseCount=args.length / 2, j=0;
      for (int i=0; i < clauseCount; i++) {
        boolean logical=getBooleanArg(evaluator,args,j++);
        if (logical) {
          return getArg(evaluator,args,j);
        }
 else {
          j++;
        }
      }
      if (j < args.length) {
        return getArg(evaluator,args,j);
      }
 else {
        return null;
      }
    }
    public void testCaseTestMatch(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseTestMatchElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseTestMatchNoElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Case){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      if (args.length < 3) {
        return null;
      }
      int valueType=args[0].getType();
      int returnType=args[2].getType();
      int j=0, clauseCount=(args.length - 1) / 2, mismatchingArgs=0;
      if (!canConvert(args[j++],valueType,conversionCount)) {
        mismatchingArgs++;
      }
      for (int i=0; i < clauseCount; i++) {
        if (!canConvert(args[j++],valueType,conversionCount)) {
          mismatchingArgs++;
        }
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      if (j < args.length) {
        if (!canConvert(args[j++],returnType,conversionCount)) {
          mismatchingArgs++;
        }
      }
      Util.assertTrue(j == args.length);
      if (mismatchingArgs == 0) {
        return new FunDefBase(this,returnType,ExpBase.getTypes(args)){
          public Object evaluate(          Evaluator evaluator,          Exp[] args){
            return evaluateCaseMatch(evaluator,args);
          }
        }
;
      }
 else {
        return null;
      }
    }
    public boolean requiresExpression(    int k){
      return true;
    }
    Object evaluateCaseMatch(    Evaluator evaluator,    Exp[] args){
      int clauseCount=(args.length - 1) / 2, j=0;
      Object value=getArg(evaluator,args,j++);
      for (int i=0; i < clauseCount; i++) {
        Object match=getArg(evaluator,args,j++);
        if (match.equals(value)) {
          return getArg(evaluator,args,j);
        }
 else {
          j++;
        }
      }
      if (j < args.length) {
        return getArg(evaluator,args,j);
      }
 else {
        return null;
      }
    }
    public void testCaseMatch(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseMatchElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
    public void testCaseMatchNoElse(    FoodMartTestCase test){
      String s=test.executeExpr("String_Node_Str");
      Assert.assertEquals("String_Node_Str",s);
    }
  }
);
  define(new ResolverBase("String_Node_Str","String_Node_Str","String_Node_Str",Syntax.Method){
    public FunDef resolve(    Exp[] args,    int[] conversionCount){
      final int[] argTypes=new int[]{Category.Member,Category.String};
      if (args.length != 2 || args[0].getType() != Category.Member || args[1].getType() != Category.String) {
        return null;
      }
      int returnType;
      if (args[1] instanceof Literal) {
        String propertyName=(String)((Literal)args[1]).getValue();
        Hierarchy hierarchy=args[0].getHierarchy();
        Level[] levels=hierarchy.getLevels();
        Property property=lookupProperty(levels[levels.length - 1],propertyName);
        if (property == null) {
          returnType=Category.Value;
        }
 else {
switch (property.getType()) {
case Property.TYPE_BOOLEAN:
            returnType=Category.Logical;
          break;
case Property.TYPE_NUMERIC:
        returnType=Category.Numeric;
      break;
case Property.TYPE_STRING:
    returnType=Category.String;
  break;
default :
throw Util.newInternal("String_Node_Str" + property.getType());
}
}
}
 else {
returnType=Category.Value;
}
return new PropertiesFunDef(name,signature,description,syntax,returnType,argTypes);
}
public boolean requiresExpression(int k){
return true;
}
public void testPropertiesExpr(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
/** 
 * Tests that non-existent property throws an error. 
 */
public void testPropertiesNonExistent(FoodMartTestCase test){
test.assertExprThrows("String_Node_Str","String_Node_Str");
}
public void testPropertiesFilter(FoodMartTestCase test){
Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
Assert.assertEquals(8,result.getAxes()[1].positions.length);
}
public void testPropertyInCalculatedMember(FoodMartTestCase test){
Result result=test.execute("String_Node_Str" + nl + "String_Node_Str"+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str");
Member member;
Cell cell;
member=result.getAxes()[1].positions[18].members[0];
Assert.assertEquals("String_Node_Str",member.getUniqueName());
cell=result.getCell(new int[]{0,18});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
cell=result.getCell(new int[]{1,18});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
member=result.getAxes()[1].positions[3].members[0];
Assert.assertEquals("String_Node_Str",member.getUniqueName());
cell=result.getCell(new int[]{0,3});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
cell=result.getCell(new int[]{1,3});
Assert.assertEquals("String_Node_Str",cell.getFormattedValue());
}
}
);
defineReserved(new String[]{"String_Node_Str","String_Node_Str"});
define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}){
protected FunDef createFunDef(Exp[] args,FunDef dummyFunDef){
String parameterName;
if (args[0] instanceof Literal && args[0].getType() == Category.String) {
parameterName=(String)((Literal)args[0]).getValue();
}
 else {
throw newEvalException(dummyFunDef,"String_Node_Str");
}
Exp typeArg=args[1];
Hierarchy hierarchy;
int type;
switch (typeArg.getType()) {
case Category.Hierarchy:
case Category.Dimension:
hierarchy=typeArg.getHierarchy();
if (hierarchy == null || !isConstantHierarchy(typeArg)) {
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str");
}
type=Category.Member;
break;
case Category.Symbol:
hierarchy=null;
String s=(String)((Literal)typeArg).getValue();
if (s.equalsIgnoreCase("String_Node_Str")) {
type=Category.Numeric;
break;
}
 else if (s.equalsIgnoreCase("String_Node_Str")) {
type=Category.String;
break;
}
default :
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str");
}
Exp exp=args[2];
if (exp.getType() != type) {
String typeName=Category.instance.getName(type).toUpperCase();
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str"+ typeName);
}
if (type == Category.Member) {
Hierarchy expHierarchy=exp.getHierarchy();
if (expHierarchy != hierarchy) {
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str"+ hierarchy);
}
}
String parameterDescription=null;
if (args.length > 3) {
if (args[3] instanceof Literal && args[3].getType() == Category.String) {
parameterDescription=(String)((Literal)args[3]).getValue();
}
 else {
throw newEvalException(dummyFunDef,"String_Node_Str" + parameterName + "String_Node_Str");
}
}
return new ParameterFunDef(dummyFunDef,parameterName,hierarchy,type,exp,parameterDescription);
}
}
);
define(new MultiResolver("String_Node_Str","String_Node_Str","String_Node_Str",new String[]{"String_Node_Str"}){
protected FunDef createFunDef(Exp[] args,FunDef dummyFunDef){
String parameterName;
if (args[0] instanceof Literal && args[0].getType() == Category.String) {
parameterName=(String)((Literal)args[0]).getValue();
}
 else {
throw newEvalException(dummyFunDef,"String_Node_Str");
}
return new ParameterFunDef(dummyFunDef,parameterName,null,Category.Unknown,null,null);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0,null), o1=getDoubleArg(evaluator,args,1,null);
if (o0 == null || o1 == null) return null;
return new Double(o0.doubleValue() + o1.doubleValue());
}
public void testPlus(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0,null), o1=getDoubleArg(evaluator,args,1,null);
if (o0 == null || o1 == null) return null;
return new Double(o0.doubleValue() - o1.doubleValue());
}
public void testMinus(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testMinusAssociativity(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0,null), o1=getDoubleArg(evaluator,args,1,null);
if (o0 == null || o1 == null) return null;
return new Double(o0.doubleValue() * o1.doubleValue());
}
public void testMultiply(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testMultiplyPrecedence(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
/** 
 * Bug 774807 caused expressions to be mistaken for the crossjoin operator. 
 */
public void testMultiplyBug774807(FoodMartTestCase test){
final String desiredResult="String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl;
test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str",desiredResult);
test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str",desiredResult);
test.runQueryCheckResult("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str"+ nl+ "String_Node_Str",desiredResult);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0,null), o1=getDoubleArg(evaluator,args,1,null);
if (o0 == null || o1 == null) return null;
return new Double(o0.doubleValue() / o1.doubleValue());
}
public double evaluate(double d1,double d2){
return d1 / d2;
}
public void testDivide(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testDivideByZero(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testDividePrecedence(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0,null);
if (o0 == null) return null;
return new Double(-o0.doubleValue());
}
public void testUnaryMinus(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testUnaryMinusMember(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testUnaryMinusPrecedence(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
String o0=getStringArg(evaluator,args,0,null), o1=getStringArg(evaluator,args,1,null);
return o0 + o1;
}
public void testStringConcat(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testStringConcat2(FoodMartTestCase test){
String s=test.executeExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
return toBoolean(getBooleanArg(evaluator,args,0) && getBooleanArg(evaluator,args,1));
}
public void testAnd(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testAnd2(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
return toBoolean(getBooleanArg(evaluator,args,0) || getBooleanArg(evaluator,args,1));
}
public void testOr(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOr2(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOrAssociativity1(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOrAssociativity2(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testOrAssociativity3(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
final boolean b0=getBooleanArg(evaluator,args,0);
final boolean b1=getBooleanArg(evaluator,args,1);
return toBoolean(b0 != b1);
}
public void testXor(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testXorAssociativity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
return toBoolean(!getBooleanArg(evaluator,args,0));
}
public void testNot(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testNotNot(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testNotAssociativity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
String o0=getStringArg(evaluator,args,0,null), o1=getStringArg(evaluator,args,1,null);
return toBoolean(o0.equals(o1));
}
public void testStringEquals(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testStringEqualsAssociativity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testStringEqualsEmpty(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.equals(o1));
}
public void testEq(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
String o0=getStringArg(evaluator,args,0,null), o1=getStringArg(evaluator,args,1,null);
return toBoolean(!o0.equals(o1));
}
public void testStringNe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(!o0.equals(o1));
}
public void testNe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
public void testNeInfinity(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) < 0);
}
public void testLt(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) <= 0);
}
public void testLe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) > 0);
}
public void testGt(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
define(new FunDefBase("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"){
public Object evaluate(Evaluator evaluator,Exp[] args){
Double o0=getDoubleArg(evaluator,args,0), o1=getDoubleArg(evaluator,args,1);
return toBoolean(o0.compareTo(o1) >= 0);
}
public void testGe(FoodMartTestCase test){
String s=test.executeBooleanExpr("String_Node_Str");
Assert.assertEquals("String_Node_Str",s);
}
}
);
}