0

I have this simple DLV program consisting of few predicates and derivations rules. One of the rules is not being activated and I have no clue why since apparently all predicates exist. I have to admit I am no expert in DLV and a bit rusty since the last time I used it so please forgive me if this is too obvious :-/

Among others, I have this rule:

knows(ps, chunk(v, ps, pd)) :-  value(v),       
                                knows(ps, v),
                                connected(ps, pd).

And here you can see what I get after executing the code:

./dlv -nofinitecheck model.edb rules.idb

{participant(p1), participant(p2), participant(p3), value(v1), value(r1), value(v2), value(r2), value(v3), value(r3), connected(p1,p2), connected(p1,p3), connected(p2,p3), knows(p1,v1), knows(p1,r1), knows(p2,v2), knows(p2,r2), knows(p3,v3), knows(p3,r3)}

Since I have "value(v1)" and "knows(p1,v1)" and "connected(p1,p2)", I was expecting the output of the program should contain "knows(p1, chunk(v1, p1, p2))".

Can anyone explain me why this is not happening?


Edit: I have removed all rules and created just this single one

chunk(v, ps) :- value(v), participant(ps).

But this rule is not being activated either! What's the problem? I have tried the simplest one:

chunk(v) :- value(v).

and no activation. What am I missing?

rutex
  • 137
  • 3
  • 12

1 Answers1

1

OK. I Just realised of my stupidity. The problem is I am using lowercase letters for the variables rather than capitol letters... Sorry, as I said I am rusty!

So, just for the record. Rather than chunk(v) :- value(v) it should be something like chunk(V) :- value(V)

rutex
  • 137
  • 3
  • 12