Suppose I have the knowledge base
likes(john,mary).
person(mary).
person(john).
If we ask prolog whether
|?- likes(mary,john)
It will answer no because we did not assert that. Is there any way to make prolog answer unknown unless we explicitly state.
\+ likes(mary,john)
In other words can we ask prolog to treat unbound expressions as possible rather than false. I've been using IDP system which permits existential quantification and treats non asserted relations as if unbound rather than false, but I would like to use something more mainstream. http://adams.cs.kuleuven.be/idp/server.html
For example in IDP you can make the statement
vocabulary V{
type Person
Likes(Person,Person)
}
theory T: V{
//Everyone might like someone and disallow narcisiscm
!x : ?y: Likes(x,y) & ~Likes(x,x).
}
//some instance without special meaning
structure S:V{
Person={A..C}
}
procedure main(){
//Print all possible solutions
printmodels(allmodels(T,S))
}
Which yields
Number of models: 27
Model 1
=======
structure : V {
Person = { "A"; "B"; "C" }
Likes = { "A","B"; "A","C"; "B","A"; "B","C"; "C","A"; "C","B" }
}
//...