% Defining the time constants time(0..length). % Defining fluents fluent(loaded). fluent(dead). fluent(walking). % Defining actions action(load). action(shoot). % Representing action effects holds(dead, T+1):- time(T), occ(shoot, T), holds(loaded, T). holds(neg(loaded), T+1):- time(T), occ(shoot, T). holds(loaded, T+1) :- time(T), occ(load, T). % Static law holds(neg(walking), T):- time(T), holds(dead, T). % The initial state holds(loaded, 0). holds(neg(dead), 0). holds(walking, 0). % Defining fluent literals literal(F):- fluent(F). literal(neg(F)):- fluent(F). % Contrary literals contrary(F, neg(F)):- fluent(F). contrary(neg(F), F):- fluent(F). % The inertial rule holds(F, T+1) :- literal(F), time(T), holds(F, T), contrary(G, F), not holds(G, T+1). % action occurrences occ(shoot, 0). %hide fluent(X). hide action(A). hide time(T). hide literal(L). hide contrary(X,Y).