Thanks for the reply. Right, the spec needs to be clear about these issues.
03/09/2009 08:55 AM
Please respond to
"The light at the end of the tunnel...may be you"
WebSphere XD - Compute Grid
Apache Imperius - http://incubator.apache.org/imperius
03/06/2009 09:44 AM
Question about some collection operations
>I have some questions about collection expressions for you.
>1) In a collection expression such as Max, is it allowed to include a
>declared constant in it's parameter list ?
>Imperius seems like Max(10,10,1,2,3,4,5), but not Max(p,10,1,2,3,4,5) as
>p's value is not included in the symTable after parsing.
>So when evaluating the Max expression Max(p,10,1,2,3,4,5), a
>NullPointException is thrown.
Where is 'p' declared ? can you show a sample policy?
>2) Does each element of a collection expression have to be of
>SingleArgumentExpression type? This is not clear to me, it is not clearly
>specified in the spec.
>For example, is it allowed to write something like this, Max(x+y, 1, 2,
>where x+y is a DoubleArgumentExpression. The Imperius parser is happy
>it, but an exception gets thrown at
>evaluation time as the lhs and rhs of "x+y" are null.
That is correct, the specification didn't say such embedding was allowed
as far as I remember.
>3) In a collection expression, can an element be another collection? For
>example, InCollection(x, [1,2,[3,4,5]]). Again, the parser seems like it,
>but the evaluation part does not expect any element to be another
Cascaded collections was again not called out in the spec.
But I agree that all these cases should either be handled at compile time
or we provide an implementation at