Neeraj,
Thanks for initiating this effort. Below are my comments on the open issues
you mentioned. We did fix a lot of bugs at Watson, but we kept our fixes in
Imperius-WMPL, a separate version of Imperius which has additions for
policy analysis support. (How to merge our Imperius-WPML with Imperius on
Apache? ) It seems to me that only Imperius-24 is a real open issue at this
moment. Since you are familiar with the Imperius parser, would you please
take a look at Imperius-24?
For some reason, I have not received my committer password. Do you know how
I can get it?
Xiping
=======================================================================================
IMPERIUS-22
Import Class java.util.List:list1;
Strategy Execute_All_Applicable;
Policy
{
Condition
{
inCollection("1", list1)
}
Decision
{
list.get(1)
}
}:1;
This is not a bug. According to CIM-SPL specification, the elements of
inCollection expression can only be CIM-SPL expressions. “list1” above is
not a CIM-SPL expression.
IMPERIUS-23
Import Class java.util.Properties:prop;
Strategy Execute_All_Applicable;
Policy
{
Condition
{
1 == 1 && prop.getProperty("foo","bar").equals("foo")
}
Decision
{
prop.getProperty("foo")
}
}:1;
There are two problems with this policy.
1) It uses java overloading (getProperty("foo") and getProperty
("foo","bar")) which is not supported by Imperius.
2) prop.getProperty("foo","bar").equals("foo") is not a correct CIM-SPL
syntax. It should be rewritten to prop.getProperty("foo","bar") ==
"foo".
This policy can be parsed without errors if using Java overloading support
implemented by IBM Research policy team.
IMPERIUS-24
Import Class util.SimpleBean1 : b1;
Import Class util.SimpleBean2 : b2;
Strategy Execute_All_Applicable;
Policy
{
Condition
{
1 == 1
}
Decision
{
b2.print(b1.id)
}
}:1;
This problem is reproducible. The parser does not like an anchor object
passed in as an argument.
IMPERIUS-25
Import Class java.util.List:list1;
Strategy Execute_All_Applicable;
Policy
{
Condition
{
list1.toString() == "something"
}
Decision
{
list1.toString()
}
}:1;
Imperius uses Java reflection to query available methods on a Java class.
The policy above is not parserable because java.util.List is an interface
which does not have toString() method. Instead, concrete classes such as
Properties and ArrayList, all work fine. I think this is OK.
IMPERIUS-27
Import Class java.util.Properties:list1;
Strategy Execute_All_Applicable;
Policy
{
Condition
{
1 == 1
}
Decision
{
list1.put("foo", .6)
}
}:1;
This problem is reproducible. The parser does not like “.6”, but it works
fine if changing “.6” to “0.6”. This is because the parser interprets “.”
as an unexpected token. I think this is OK just because the way Imperius
was implemented.
IMPERIUS-28
Import Class com.ibm.watson.pml.bytearray.ByteArrayFactory:baf;
Strategy Execute_All_Applicable;
Policy {
Condition { baf.takeByteArray(baf.getByteArray()) }
Decision { baf.getByteArray() }
}:1;
package com.ibm.watson.pml.bytearray;
public interface ByteArrayFactory {
public byte[] getByteArray();
public boolean takeByteArray(byte[] barray);
}
This problem has been fixed at Watson.
From: Neeraj Joshi/Durham/i...@ibmus
To: [email protected]
Date: 08/14/2009 09:52 AM
Subject: bugs to be resolved
Hey Guys,
I was going through the list of open issues for Imperius
Imperius - 22 to Imperius - 28 seem to be open but I remember some patches
being committed.
Any idea if these have been resolved? Also we need to figure out which of
these bugs are important
to be fixed before we propose a release. David / Xiping since you guys
opened these bugs can
you comment?
Thanks
Neeraj
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"The light at the end of the tunnel...may be you"
Neeraj Joshi
WebSphere XD - Compute Grid
AIM, IBM
Apache Imperius - http://incubator.apache.org/imperius
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~