
#const n=6.      

%%%%%%%%%%%%%%%%%%%%  SCENARIO 4 %%%%%%%%%%%%%%%%%%
%                                                 %
%   John took the plane from Paris to Baghdad.    % 
%   On the way the plane stopped in Rome, where   %
%   John was arrested. Is John in Baghdad?        %
%                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%           THE TRANSLATION

% Statement 1 and the query as in scenario 2. 
% The second part of statement 2 is new.

%     John took the plane from Paris to Baghdad. 

            h(at(john,paris),0).
            o(go_on(john,j(paris,baghdad)),0).

%     On the way the plane stopped in Rome... 

            o(stop(j(paris,baghdad),rome),2).

%     ...where John was arrested

            o(arrest(john),3).

%  The query:

answer_true(q) :-
	h(at(john,baghdad),n).
answer_false(q) :-
	-h(at(john,baghdad),n).
type_query(q,boolean).   

% As before we'll run the program together with
% the rules and directives below.

       yes :- 
           type_query(Q,boolean),
           answer_true(Q).

       no :- 
           type_query(Q,boolean),
           answer_false(Q).

       maybe :- 
           type_query(Q,boolean),
           not yes, 
           not no.

hide.

show yes,no,maybe,do(A,B).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% The story contains an action arrest(P) not normally 
% related to travel. The corresponding axiom:

-h(participant(P,J),T+1) :-
         o(arrest(P),T).

% which can be viewed as a special case of a statement
% "arrest stops the person participation in his
% current activities" will be loaded from the
% module associated with "arrest".
