From: Jomi H. <jom...@gm...> - 2010-05-11 13:03:21
|
Hi Tim, thanks again for such a great job: find and solve the problem! I simply added your solution in the subversion. Cheers, Jomi On 11/05/2010, at 05:26, Tim Cleaver wrote: > Jason Devs, > > There is an issue when an uninstantiated variable is compared to a number term implementation. This is because a VarTerm is a NumberTerm. When comparing them, solve is called on the uninstantiated VarTerm which causes an exception and evaluates the VarTerm as 0. > > There is a statement in the tests (src/test/TermTest.java:569-570) that variables should be greater than other terms when different types of terms are compared. > > Attached is a patch that prevents the exception being thrown and results in uninstantiated variables being compared greater than other terms. When the variable is bound, however, the comparison is based on the variable's value instead. Thus, a variable bound to a number implementation of 4 is greater than a number implementation value of 2. > > I have included a patch to VarTermTest.java that highlights the problem and a patch for NumberTermImpl.java that solves it. The result passes both the jason junit tests and the as-unit tests as well. > > cheers, > Tim Cleaver > > > <NumberTermImpl.java.patch><VarTermTest.java.patch>------------------------------------------------------------------------------ > > _______________________________________________ > Jason-bugs mailing list > Jas...@li... > https://lists.sourceforge.net/lists/listinfo/jason-bugs -- Jomi Fred Hubner Federal University of Santa Catarina Department of Automation and Systems Engineering PO Box 476, Florianópolis, SC 88040-900 Brazil http://www.das.ufsc.br/~jomi |