a bug in PPL Java bindings

Hi, I'm here again with another problem concerning boxes and Java bindings. I found by chance a sequence of operations which gives a wrong result. It is difficult to describe what happens, therefore I prepared a small Java program exhibiting the bad behavior. The program should print
A in 0, B in 1 A in 0, B in 1 A in 0, B in 4 false A in 0, B in 4
but it prints:
A in 0, B in 1 A in 0, B in 1 A in 0, B in 4 false A in 0, B in [1, 4]
Cheers, --gianluca

On 02/14/2012 10:18 AM, Gianluca Amato wrote:
Hi, I'm here again with another problem concerning boxes and Java bindings. I found by chance a sequence of operations which gives a wrong result.
Hello Gianluca.
Thanks for reporting the issue.
This is a misbehavior in method Box<ITV>::upper_bound_assign() which is caused by the wrong handling of flags recording box emptiness. We have now fixed it on git master (I also added a C++ variant of your testcase to our test suite).
As witnessed by the observation you performed when trying minor variations of your program, the error had to do with the laziness of the computation (e.g., the error was disappearing if printing out intermediate results).
Please confirm us that things are now OK also on the Java side.
Cheers, Enea.
It is difficult to describe what happens, therefore I prepared a small Java program exhibiting the bad behavior. The program should print
A in 0, B in 1 A in 0, B in 1 A in 0, B in 4 false A in 0, B in 4
but it prints:
A in 0, B in 1 A in 0, B in 1 A in 0, B in 4 false A in 0, B in [1, 4]
Cheers, --gianluca

On 02/14/2012 12:45 PM, Enea Zaffanella wrote:
On 02/14/2012 10:18 AM, Gianluca Amato wrote:
Hi, I'm here again with another problem concerning boxes and Java bindings. I found by chance a sequence of operations which gives a wrong result.
Hello Gianluca.
Thanks for reporting the issue.
This is a misbehavior in method Box<ITV>::upper_bound_assign() which is caused by the wrong handling of flags recording box emptiness. We have now fixed it on git master (I also added a C++ variant of your testcase to our test suite).
As witnessed by the observation you performed when trying minor variations of your program, the error had to do with the laziness of the computation (e.g., the error was disappearing if printing out intermediate results).
Please confirm us that things are now OK also on the Java side.
Hi Enea, I confirm that it works now, even in Java.
Thank you, --gianluca
participants (3)
-
Enea Zaffanella
-
Gianluca Amato
-
Gianluca Amato