Beispiel #1
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            Decimal bdval = new Decimal(0);

            if (params_Renamed.Length == 1)
            {
                if (params_Renamed[0] is ValueParam)
                {
                    ValueParam n = (ValueParam)params_Renamed[0];
                    bdval = n.BigDecimalValue;
                }
                else if (params_Renamed[0] is BoundParam)
                {
                    BoundParam bp = (BoundParam)params_Renamed[0];
                    bdval = (Decimal)engine.getBinding(bp.VariableName);
                }
                else if (params_Renamed[0] is FunctionParam2)
                {
                    FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                    n.Engine = engine;
                    n.lookUpFunction();
                    IReturnVector rval = (IReturnVector)n.Value;
                    bdval = rval.firstReturnValue().BigDecimalValue;
                }
                double bdh = System.Math.Log(Decimal.ToDouble(bdval)); //.pow(Math.E, bdval.doubleValue());
                bdval = new Decimal(bdh);
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.BIG_DECIMAL, bdval);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #2
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            bool boolVal = true;

            if (params_Renamed != null)
            {
                if (params_Renamed.Length == 1)
                {
                    if (params_Renamed[0] is ValueParam)
                    {
                        ValueParam n = (ValueParam)params_Renamed[0];
                        boolVal = n.BooleanValue;
                    }
                    else if (params_Renamed[0] is BoundParam)
                    {
                        BoundParam bp = (BoundParam)params_Renamed[0];
                        boolVal = ((Boolean)engine.getBinding(bp.VariableName));
                    }
                    else if (params_Renamed[0] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        boolVal = rval.firstReturnValue().BooleanValue;
                    }
                    boolVal = (boolVal == false);
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.BOOLEAN_OBJECT, boolVal);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #3
0
        public virtual bool executeFunction(Rete.Rete engine, IParameter[] params_Renamed)
        {
            IReturnVector rv = func.executeFunction(engine, params_Renamed);

            // we return the first ReturnValue
            return(rv.firstReturnValue().BooleanValue);
        }
Beispiel #4
0
        public override Object getValue(Rete engine, int valueType)
        {
            initParams();
            IReturnVector rval = func.executeFunction(engine, params_Renamed);

            return(rval.firstReturnValue().BigDecimalValue);
        }
Beispiel #5
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            Decimal bdval = new Decimal(0);

            if (params_Renamed != null)
            {
                if (params_Renamed[0] is ValueParam)
                {
                    bdval = params_Renamed[0].BigDecimalValue;
                }
                else if (params_Renamed[0] is BoundParam)
                {
                    BoundParam bp = (BoundParam)params_Renamed[0];
                    bdval = (Decimal)engine.getBinding(bp.VariableName);
                }
                else if (params_Renamed[0] is FunctionParam2)
                {
                    FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                    n.Engine = engine;
                    n.lookUpFunction();
                    IReturnVector rval = (IReturnVector)n.Value;
                    bdval = rval.firstReturnValue().BigDecimalValue;
                }
                for (int idx = 1; idx < params_Renamed.Length; idx++)
                {
                    if (params_Renamed[idx] is ValueParam)
                    {
                        ValueParam n  = (ValueParam)params_Renamed[idx];
                        Decimal    bd = n.BigDecimalValue;
                        bdval = Decimal.Multiply(bdval, bd);
                    }
                    else if (params_Renamed[idx] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[idx];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        Decimal       bd   = rval.firstReturnValue().BigDecimalValue;
                        if (idx == 0)
                        {
                            bdval = bd;
                        }
                        else
                        {
                            bdval = Decimal.Multiply(bdval, bd);
                        }
                    }
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.BIG_DECIMAL, bdval);

            ret.addReturnValue(rv);
            return(ret);
        }
 /// <summary> TODO we may want to check the value type and throw and exception
 /// for now just getting it to work.
 /// </summary>
 public override Object getValue(Rete engine, int valueType)
 {
     if (params_Renamed != null)
     {
         this.engine = engine;
         lookUpFunction();
         IReturnVector rval = func.executeFunction(engine, params_Renamed);
         return(rval.firstReturnValue().BigDecimalValue);
     }
     else
     {
         return(null);
     }
 }
Beispiel #7
0
        /// <summary> The method uses the function to evaluate the fact
        /// </summary>
        /// <param name="">factInstance
        /// </param>
        /// <returns>
        ///
        /// </returns>
        public virtual bool evaluate(IFact factInstance, Rete engine)
        {
            for (int idx = 0; idx < params_Renamed.Length; idx++)
            {
                if (params_Renamed[idx] is BoundParam)
                {
                    ((BoundParam)params_Renamed[idx]).Facts = new IFact[] { factInstance };
                }
            }
            IReturnVector rv   = function.executeFunction(engine, params_Renamed);
            IReturnValue  rval = rv.firstReturnValue();

            return(rval.BooleanValue);
        }
Beispiel #8
0
        /// <summary> Assert will first pass the facts to the parameters. Once the
        /// parameters are set, it should call execute to Get the result.
        /// </summary>
        public override void assertLeft(Index linx, Rete engine, IWorkingMemory mem)
        {
            IGenericMap <Object, Object> leftmem = (IGenericMap <Object, Object>)mem.getBetaLeftMemory(this);

            if (!leftmem.ContainsKey(linx))
            {
                Parameters = linx.Facts;
                IReturnVector rv = func.executeFunction(engine, params_Renamed);
                if (rv.firstReturnValue().BooleanValue)
                {
                    IBetaMemory bmem = new BetaMemoryImpl(linx);
                    leftmem.Put(bmem.Index, bmem);
                    propogateAssert(linx, engine, mem);
                }
            }
        }
Beispiel #9
0
 public virtual bool evaluate(IFact[] left, IFact right, Rete engine)
 {
     if (function != null)
     {
         IReturnVector rv = function.executeFunction(engine, params_Renamed);
         return(rv.firstReturnValue().BooleanValue);
     }
     else if (left.Length > leftrow)
     {
         if (left[leftrow] == right)
         {
             return(false);
         }
         return(Evaluate.evaluate(operator_Renamed, left[leftrow].getSlotValue(leftIndex), right.getSlotValue(rightIndex)));
     }
     else
     {
         return(false);
     }
 }
Beispiel #10
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            double dval = 0;

            if (params_Renamed != null)
            {
                if (params_Renamed.Length == 1)
                {
                    if (params_Renamed[0] is ValueParam)
                    {
                        ValueParam n = (ValueParam)params_Renamed[0];
                        dval = n.DoubleValue;
                        dval = System.Math.Cos(dval);
                    }
                    else if (params_Renamed[0] is BoundParam)
                    {
                        BoundParam bp = (BoundParam)params_Renamed[0];
                        dval = bp.DoubleValue;
                        dval = System.Math.Cos(dval);
                    }
                    else if (params_Renamed[0] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        dval = rval.firstReturnValue().DoubleValue;
                        dval = System.Math.Cos(dval);
                    }
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.DOUBLE_PRIM_TYPE, dval);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #11
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            Object result = null;

            if (params_Renamed != null)
            {
                if (params_Renamed.Length >= 3)
                {
                    bool conditionValue = false;
                    if (params_Renamed[0] is ValueParam)
                    {
                        ValueParam n = (ValueParam)params_Renamed[0];
                        conditionValue = n.BooleanValue;
                    }
                    else if (params_Renamed[0] is BoundParam)
                    {
                        BoundParam bp = (BoundParam)params_Renamed[0];
                        conditionValue = ((Boolean)engine.getBinding(bp.VariableName));
                    }
                    else if (params_Renamed[0] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        conditionValue = rval.firstReturnValue().BooleanValue;
                    }
                    if (params_Renamed[1] is ValueParam && "then".Equals(params_Renamed[1].StringValue))
                    {
                        bool elseExpressions = false;
                        for (int i = 2; i < params_Renamed.Length; ++i)
                        {
                            if (params_Renamed[i] is ValueParam && "else".Equals(params_Renamed[i].StringValue))
                            {
                                elseExpressions = true;
                            }
                            else
                            {
                                if ((conditionValue && !elseExpressions) || (!conditionValue && elseExpressions))
                                {
                                    if (params_Renamed[i] is ValueParam)
                                    {
                                        ValueParam n = (ValueParam)params_Renamed[i];
                                        result = n.Value;
                                    }
                                    else if (params_Renamed[i] is BoundParam)
                                    {
                                        BoundParam bp = (BoundParam)params_Renamed[i];
                                        result = engine.getBinding(bp.VariableName);
                                    }
                                    else if (params_Renamed[i] is FunctionParam2)
                                    {
                                        FunctionParam2 n = (FunctionParam2)params_Renamed[i];
                                        n.Engine = engine;
                                        n.lookUpFunction();
                                        IReturnVector rval = (IReturnVector)n.Value;
                                        if (rval.size() > 0)
                                        {
                                            result = rval.firstReturnValue().Value;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.OBJECT_TYPE, result);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #12
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            Object o         = null;
            String classname = null;

            if (params_Renamed != null && params_Renamed.Length == 1)
            {
                if (params_Renamed[0] is ValueParam)
                {
                    ValueParam n = (ValueParam)params_Renamed[0];
                    classname = n.StringValue;
                }
                else if (params_Renamed[0] is BoundParam)
                {
                    BoundParam bp = (BoundParam)params_Renamed[0];
                    classname = (String)engine.getBinding(bp.VariableName);
                }
                else if (params_Renamed[0] is FunctionParam2)
                {
                    FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                    n.Engine = engine;
                    n.lookUpFunction();
                    IReturnVector rval = (IReturnVector)n.Value;
                    classname = rval.firstReturnValue().StringValue;
                }
                try
                {
                    Type classDefinition = classnameResolver.resolveClass(classname);
                    o = CreateNewInstance(classDefinition);
                    if (o is IFunctionGroup)
                    {
                        engine.declareFunctionGroup((IFunctionGroup)o);
                    }
                }

                catch (UnauthorizedAccessException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (SecurityException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (ArgumentException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (Exception e)
                {
                    // TODO Auto-generated catch block
                    Trace.WriteLine(e.Message);
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.OBJECT_TYPE, o);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #13
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            String sval = new String("".ToCharArray());

            if (params_Renamed != null)
            {
                if (params_Renamed.Length == 1)
                {
                    if (params_Renamed[0] is ValueParam)
                    {
                        ValueParam n = (ValueParam)params_Renamed[0];
                        sval = n.StringValue;
                        IFunction aFunction = engine.findFunction(sval);
                        if (aFunction != null)
                        {
                            sval = aFunction.toPPString(null, 0);
                        }
                        else
                        {
                            sval = toPPString(null, 0);
                        }
                    }
                    else if (params_Renamed[0] is BoundParam)
                    {
                        BoundParam bp = (BoundParam)params_Renamed[0];
                        sval = bp.StringValue;
                        IFunction aFunction = engine.findFunction(sval);
                        if (aFunction != null)
                        {
                            sval = aFunction.toPPString(null, 0);
                        }
                        else
                        {
                            sval = toPPString(null, 0);
                        }
                    }
                    else if (params_Renamed[0] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        sval = rval.firstReturnValue().StringValue;
                        IFunction aFunction = engine.findFunction(sval);
                        if (aFunction != null)
                        {
                            sval = aFunction.toPPString(null, 0);
                        }
                        else
                        {
                            sval = toPPString(null, 0);
                        }
                    }
                }
                else
                {
                    sval = toPPString(null, 0);
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.STRING_TYPE, sval);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #14
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            Object o          = null;
            Object ro         = null;
            String methodname = null;

            Type[]   argsclass = null;
            Object[] args      = null;
            if (params_Renamed != null)
            {
                if (params_Renamed[0] is ValueParam)
                {
                    ValueParam n = (ValueParam)params_Renamed[0];
                    o = n.Value;
                }
                else if (params_Renamed[0] is BoundParam)
                {
                    BoundParam bp = (BoundParam)params_Renamed[0];
                    o = engine.getBinding(bp.VariableName);
                }
                else if (params_Renamed[0] is FunctionParam2)
                {
                    FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                    n.Engine = engine;
                    n.lookUpFunction();
                    IReturnVector rval = (IReturnVector)n.Value;
                    o = rval.firstReturnValue().Value;
                }
                if (params_Renamed[1] is ValueParam)
                {
                    ValueParam n = (ValueParam)params_Renamed[1];
                    methodname = n.StringValue;
                }
                else if (params_Renamed[1] is BoundParam)
                {
                    BoundParam bp = (BoundParam)params_Renamed[1];
                    methodname = (String)engine.getBinding(bp.VariableName);
                }
                else if (params_Renamed[1] is FunctionParam2)
                {
                    FunctionParam2 n = (FunctionParam2)params_Renamed[1];
                    n.Engine = engine;
                    n.lookUpFunction();
                    IReturnVector rval = (IReturnVector)n.Value;
                    methodname = rval.firstReturnValue().StringValue;
                }
                if (params_Renamed.Length > 2)
                {
                    argsclass = new Type[params_Renamed.Length - 1];
                    args      = new Object[params_Renamed.Length - 1];
                }
                for (int idx = 2; idx < params_Renamed.Length; idx++)
                {
                    if (params_Renamed[idx] is ValueParam)
                    {
                        ValueParam n = (ValueParam)params_Renamed[idx];
                        argsclass[idx - 1] = n.Value.GetType();
                        args[idx - 1]      = n.Value;
                    }
                    else if (params_Renamed[idx] is BoundParam)
                    {
                        BoundParam bp = (BoundParam)params_Renamed[idx];
                        argsclass[idx - 1] = engine.getBinding(bp.VariableName).GetType();
                        args[idx - 1]      = engine.getBinding(bp.VariableName);
                    }
                    else if (params_Renamed[idx] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[idx];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        argsclass[idx - 1] = rval.firstReturnValue().Value.GetType();
                        args[idx - 1]      = rval.firstReturnValue().Value;
                    }
                }
                try
                {
                    Type       classDefinition = o.GetType();
                    MethodInfo method          = classDefinition.GetMethod(methodname, (Type[])argsclass);
                    ro = method.Invoke(o, (Object[])args);
                }
                catch (UnauthorizedAccessException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (SecurityException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (MethodAccessException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (ArgumentException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (TargetInvocationException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.OBJECT_TYPE, ro);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #15
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            Object o         = null;
            String classname = null;

            Type[]   argsclass = null;
            Object[] args      = null;
            if (params_Renamed != null)
            {
                if (params_Renamed[0] is ValueParam)
                {
                    ValueParam n = (ValueParam)params_Renamed[0];
                    classname = n.StringValue;
                }
                else if (params_Renamed[0] is BoundParam)
                {
                    BoundParam bp = (BoundParam)params_Renamed[0];
                    classname = (String)engine.getBinding(bp.VariableName);
                }
                else if (params_Renamed[0] is FunctionParam2)
                {
                    FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                    n.Engine = engine;
                    n.lookUpFunction();
                    IReturnVector rval = (IReturnVector)n.Value;
                    classname = rval.firstReturnValue().StringValue;
                }
                args = new Object[params_Renamed.Length - 1];
                for (int idx = 1; idx < params_Renamed.Length; idx++)
                {
                    if (params_Renamed[idx] is ValueParam)
                    {
                        ValueParam n = (ValueParam)params_Renamed[idx];
                        args[idx - 1] = n.Value;
                    }
                    else if (params_Renamed[idx] is BoundParam)
                    {
                        BoundParam bp = (BoundParam)params_Renamed[idx];
                        args[idx - 1] = engine.getBinding(bp.VariableName);
                    }
                    else if (params_Renamed[idx] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[idx];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        args[idx - 1] = rval.firstReturnValue().Value;
                    }
                }
                try
                {
                    Type            classDefinition  = classnameResolver.resolveClass(classname);
                    ConstructorInfo foundConstructor = null;
                    for (int idx = 0; idx < classDefinition.GetConstructors().Length; idx++)
                    {
                        ConstructorInfo constructor      = classDefinition.GetConstructors()[idx];
                        ParameterInfo[] parameterClasses = constructor.GetParameters();
                        if (parameterClasses.Length == args.Length)
                        {
                            bool match = true;
                            for (int i = 0; i < parameterClasses.Length; ++i)
                            {
                                match &= (parameterClasses[i].GetType().IsInstanceOfType(args[i]) || args[i] == null);
                            }
                            if (match)
                            {
                                foundConstructor = constructor;
                                break;
                            }
                        }
                    }
                    if (foundConstructor != null)
                    {
                        o = foundConstructor.Invoke(args);
                    }
                }

                catch (UnauthorizedAccessException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (SecurityException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (ArgumentException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (TargetInvocationException e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
                catch (Exception e)
                {
                    // TODO Auto-generated catch block
                    System.Diagnostics.Trace.WriteLine(e.Message);
                }
            }
            DefaultReturnVector ret = new DefaultReturnVector();
            DefaultReturnValue  rv  = new DefaultReturnValue(Constants.OBJECT_TYPE, o);

            ret.addReturnValue(rv);
            return(ret);
        }
Beispiel #16
0
        public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed)
        {
            DefaultReturnVector ret = new DefaultReturnVector();
            bool eq = false;

            if (params_Renamed != null && params_Renamed.Length > 1)
            {
                Object first = null;
                if (params_Renamed[0] is ValueParam)
                {
                    ValueParam n = (ValueParam)params_Renamed[0];
                    first = n.Value;
                }
                else if (params_Renamed[0] is BoundParam)
                {
                    BoundParam bp = (BoundParam)params_Renamed[0];
                    first = (Decimal)engine.getBinding(bp.VariableName);
                }
                else if (params_Renamed[0] is FunctionParam2)
                {
                    FunctionParam2 n = (FunctionParam2)params_Renamed[0];
                    n.Engine = engine;
                    n.lookUpFunction();
                    IReturnVector rval = (IReturnVector)n.Value;
                    first = rval.firstReturnValue().Value;
                }
                bool eval = true;
                for (int idx = 1; idx < params_Renamed.Length; idx++)
                {
                    Object right = null;
                    if (params_Renamed[idx] is ValueParam)
                    {
                        ValueParam n = (ValueParam)params_Renamed[idx];
                        right = n.Value;
                    }
                    else if (params_Renamed[idx] is BoundParam)
                    {
                        BoundParam bp = (BoundParam)params_Renamed[idx];
                        right = engine.getBinding(bp.VariableName);
                    }
                    else if (params_Renamed[idx] is FunctionParam2)
                    {
                        FunctionParam2 n = (FunctionParam2)params_Renamed[idx];
                        n.Engine = engine;
                        n.lookUpFunction();
                        IReturnVector rval = (IReturnVector)n.Value;
                        right = rval.firstReturnValue().Value;
                    }
                    if (first == null && right != null)
                    {
                        eval = false;
                        break;
                    }
                    else if (first != null && !first.Equals(right))
                    {
                        eval = false;
                        break;
                    }
                }
                eq = eval;
            }
            DefaultReturnValue rv = new DefaultReturnValue(Constants.BOOLEAN_OBJECT, eq);

            ret.addReturnValue(rv);
            return(ret);
        }