Thanks for the hint but this doesn't help. As stated
before, the problem is Yap simply stops searching at
some point.
Yap
?- is_true(problem_in_kitchen).
> (1) call:is_true(problem_in_kitchen) ?
> (2) call:fact(problem_in_kitchen) ?
> (2) fail:fact(problem_in_kitchen) ?
> (3) call:if _92 then problem_in_kitchen ?
> (3) fail:if _92 then problem_in_kitchen ?
> (1) fail:is_true(problem_in_kitchen) ?
gprolog
is_true(problem_in_kitchen).
1 1 Call: is_true(problem_in_kitchen) ?
2 2 Call: fact(problem_in_kitchen) ?
2 2 Fail: fact(problem_in_kitchen) ?
2 2 Call: if _41 then problem_in_kitchen ?
2 2 Exit: if hall_wet and bathroom_dry then problem_in_kitchen ?
3 2 Call: is_true(hall_wet and bathroom_dry) ?
4 3 Call: fact(hall_wet and bathroom_dry) ?
4 3 Fail: fact(hall_wet and bathroom_dry) ?
4 3 Call: if _94 then hall_wet and bathroom_dry ?
4 3 Fail: if _94 then hall_wet and bathroom_dry ?
4 3 Call: is_true(hall_wet) ?
5 4 Call: fact(hall_wet) ?
5 4 Exit: fact(hall_wet) ?
4 3 Exit: is_true(hall_wet) ?
6 3 Call: is_true(bathroom_dry) ?
7 4 Call: fact(bathroom_dry) ?
7 4 Exit: fact(bathroom_dry) ?
6 3 Exit: is_true(bathroom_dry) ?
3 2 Exit: is_true(hall_wet and bathroom_dry) ?
1 1 Exit: is_true(problem_in_kitchen) ?