From: Nathan M. <na...@ra...> - 2009-02-18 19:23:15
|
Hello, I was taking a look at IRIS, and I can't figure out how to incorporate equality and arithmetic into a query. (This is probably a basic logic programming question more than anything else). Can you give an example program that uses equality and arithmetic? For example, I tried to do something like the following: man('joe'). woman('alice'). funky(?x) = 5 :- man(?x). funky(?x) = 7 :- woman(?x). ?-funky(?y) = 5. However, nothing gets printed out. I also tried: man('joe'). woman('alice'). funky(?x) = 5 :- man(?x). funky(?x) = 7 :- woman(?x). isFunky(?x) :- funky(?x) < 6. ?-isFunky(?x). This time, I got an "unlimited variable" error. What am I doing wrong? Thanks, Nathan Marz |