I have this facts:
morpheme(a,82).
morpheme(r,83).
And i have this rule:
foo(er,Start) :-
morpheme(a,Start), morpheme(r,I), I is Start+1,
not(morfema(_,J)), J is I+1.
When I ask the query:
foo(er,82).
I got "false" (wrong answer) instead of "true" (correct answer).
In the query I've tried to say that: "if there is a morpheme AR in the start position "Start" and there are no more morphemes in higher positions (higher than Start+1), then fires the rule".
I tried using \+ and cut-fail (http://stackoverflow.com/questions/3850563/writing-prolog-statement-with-not-operator) but no success :(
I think that the problem is located in the way i wrote the rule.
Thanks in advance!!!