PENG Light
Processable ENGlish

1. Introduction

PENG Light is a controlled natural language designed for writing specification texts in an unambiguous way so that these texts can be translated into a formal target language. The language of PENG Light covers a strict subset of standard English and is defined by a controlled grammar and a controlled lexicon. The controlled lexicon consists of domain-dependent content words (nouns, verbs, adjectives, and adverbs), predefined function words (e.g., conjunctions, determiners, query words), a small number of predefined fixed phrases (e.g., there is, it is the case that), and an open list of exclusion words. The author of a specification text can add new content words to the lexicon during the writing process, and the writing process is supported with the help of an intelligent authoring tool.

In order to illustrate the coverage of PENG Light, we start with a simple scenario from the transport domain and show how PENG Light can be used to predict via deduction the fluents (= time-varying properties) that are initiated and terminated as a result of performing a sequence of events. The resulting scenario is translated via discourse representation structures into the input language of the Simplified Event Calculus. This is a logic based temporal formalism that is in particular suitable for dynamic domains and can be used for various reasoning tasks, among them for question answering. In the following we look at how background knowledge about direct effects (Section 2) and indirect effects (Section 3) of events can be specified in PENG Light and introduce the kind of axioms that are necessary for dealing with continuous change (Section 4).

2. Direct Effects

We can specify the initial scenario (red) and the narrative part of the scenario (green) in PENG Light. Also the relevant effect axioms (blue) for the domain as well as the terminological information (brown) can be specified directly in PENG Light. If an event sentence (green) does not occur with a temporal modifier (e.g., at 07:00), then the event is automatically time-stamped during the translation of the sentence into the formal traget notation.

2.1 Specification in PENG Light

   The container c is on the floor.
		 
   The container b is on the container c.
		 
   The container a is on the container b.
		 
   The container d is on the floor.
		 
   The container a is clear.
		 
   The container d is clear.
		 
   If a container X is clear  
      and a container Y is clear 
      and X is not Y
      and an agent moves the container X on the container Y 
      then X will be on Y.
		 
   If a container X is clear 
      and a container Y is clear 
      and X is not Y 
      and the container X is on a container Z 
      and X is not Z
      and Y is not Z 
      and an agent moves X on Y 
      then X will no longer be on Z.
		 
   If a container X is clear 
      and a container Y is clear
      and X is not Y 
      and the container X is on a container Z
      and X is not Z 
      and Y is not Z
      and an agent moves X on Y
      then Z will be clear.
		 
   If a container X is clear 
      and a container Y is clear 
      and X is not Y 
      and an agent moves X on Y
      then Y will no longer be clear.
		 
   Every forklift is an agent.
		 
   The forklift moves the container a on the container d at 07:00.

2.2 Event Calculus Representation

   Asserted: theta(sk1, agent, sk3).

   Asserted: event(sk1, moving).

   Asserted: theta(sk1, theme, sk9).

   Asserted: theta(sk1, time, sk2).

   Asserted: timex(sk2, 1306789200).

   Asserted: theta(sk1, location, sk7).

   Asserted: object(sk3, forklift).

   Asserted: object(A, agent) :- 
               object(A, forklift).

   Asserted: terminates(B, [theta(I, experiencer, D), 
                            state(I, being), 
                            theta(I, predicate, clear)], E) :- 
               theta(B, agent, F), 
               event(B, moving), 
               theta(B, theme, G), 
               theta(B, location, D), 
               object(F, agent), 
               object(D, container), 
               object(G, container), 
               G\=D, 
               theta(B, time, H), 
               timex(H, E), 
               holds_at([theta(I, experiencer, D), 
                         state(I, being), 
                         theta(I, predicate, clear)], E), 
               holds_at([theta(J, experiencer, G), 
                         state(J, being), 
                         theta(J, predicate, clear)], E).

   Asserted: initiates(K, [theta(sk(K, L, M, N, O, P, Q, R, S), experiencer, N), 
                           state(sk(K, L, M, N, O, P, Q, R, S), being), 
                           theta(sk(K, L, M, N, O, P, Q, R, S), predicate, clear)], T) :- 
               theta(K, agent, L), 
               event(K, moving), 
               theta(K, theme, R), 
               theta(K, location, P), 
               object(L, agent), 
               object(N, container), 
               object(P, container), 
               P\=N, 
               object(R, container), 
               R\=P, 
               R\=N, 
               theta(K, time, S), 
               timex(S, T), 
               holds_at([theta(M, experiencer, R), 
                         state(M, being), 
                         theta(M, location, N)], T), 
               holds_at([theta(O, experiencer, P), 
                         state(O, being), 
                         theta(O, predicate, clear)], T), 
               holds_at([theta(Q, experiencer, R), 
                         state(Q, being), 
                         theta(Q, predicate, clear)], T).

   Asserted: terminates(U, [theta(C1, experiencer, W), 
                            state(C1, being), 
                            theta(C1, location, X)], Y) :- 
               theta(U, agent, Z), 
               event(U, moving), 
               theta(U, theme, W), 
               theta(U, location, A1), 
               object(Z, agent), 
               object(X, container), 
               object(A1, container), 
               A1\=X, 
               object(W, container), 
               W\=A1, 
               W\=X, 
               theta(U, time, B1), 
               timex(B1, Y), 
               holds_at([theta(C1, experiencer, W), 
                         state(C1, being), 
                         theta(C1, location, X)], Y), 
               holds_at([theta(D1, experiencer, A1), 
                         state(D1, being), 
                         theta(D1, predicate, clear)], Y), 
               holds_at([theta(E1, experiencer, W), 
                         state(E1, being), 
                         theta(E1, predicate, clear)], Y).

   Asserted: initiates(F1, [theta(sk(F1, G1, H1, I1, J1, K1, L1), experiencer, K1), 
                            state(sk(F1, G1, H1, I1, J1, K1, L1), being), 
                            theta(sk(F1, G1, H1, I1, J1, K1, L1), location, I1)], M1) :- 
               theta(F1, agent, G1), 
               event(F1, moving), 
               theta(F1, theme, K1), 
               theta(F1, location, I1), 
               object(G1, agent), 
               object(I1, container), 
               object(K1, container), 
               K1\=I1, 
               theta(F1, time, L1), 
               timex(L1, M1), 
               holds_at([theta(H1, experiencer, I1), 
                         state(H1, being), 
                         theta(H1, predicate, clear)], M1), 
               holds_at([theta(J1, experiencer, K1), 
                         state(J1, being), 
                         theta(J1, predicate, clear)], M1).

   Asserted: theta(sk4, experiencer, sk7).

   Asserted: state(sk4, being).

   Asserted: theta(sk4, predicate, clear).

   Asserted: theta(sk5, experiencer, sk9).

   Asserted: state(sk5, being).

   Asserted: theta(sk5, predicate, clear).

   Asserted: theta(sk6, experiencer, sk7).

   Asserted: state(sk6, being).

   Asserted: theta(sk6, location, sk13).

   Asserted: named(sk7, d).

   Asserted: object(sk7, container).

   Asserted: theta(sk8, experiencer, sk9).

   Asserted: state(sk8, being).

   Asserted: theta(sk8, location, sk11).

   Asserted: named(sk9, a).

   Asserted: object(sk9, container).

   Asserted: theta(sk10, experiencer, sk11).

   Asserted: state(sk10, being).

   Asserted: theta(sk10, location, sk14).

   Asserted: named(sk11, b).

   Asserted: object(sk11, container).

   Asserted: theta(sk12, experiencer, sk14).

   Asserted: state(sk12, being).

   Asserted: theta(sk12, location, sk13).

   Asserted: object(sk13, floor).

   Asserted: named(sk14, c).

   Asserted: object(sk14, container).  

2.3 Question

    What holds at 07:15?

2.4 Event Calculus Query

    [holds_at([theta(A, experiencer, B), 
               state(A, being)|C], 1306530900)]

2.5 Answers

   [holds_at([theta(sk5, experiencer, sk9), 
              state(sk5, being), 
              theta(sk5, predicate, clear)], 1306790100), 
    object(sk9, container), 
    named(sk9, a)]

   [holds_at([theta(sk6, experiencer, sk7), 
              state(sk6, being), 
              theta(sk6, location, sk13)], 1306790100), 
    object(sk7, container), 
    named(sk7, d), object(sk13, floor)]

   [holds_at([theta(sk10, experiencer, sk11), 
              state(sk10, being), 
              theta(sk10, location, sk14)], 1306790100), 
   object(sk11, container), 
   named(sk11, b), 
   object(sk14, container), 
   named(sk14, c)]

   [holds_at([theta(sk12, experiencer, sk14), 
              state(sk12, being), 
              theta(sk12, location, sk13)], 1306790100), 
    object(sk14, container), 
    named(sk14, c), 
    object(sk13, floor)]

   [holds_at([theta(sk(sk1, sk3, sk8, sk11, sk4, sk7, sk5, sk9, sk2), experiencer, sk11), 
              state(sk(sk1, sk3, sk8, sk11, sk4, sk7, sk5, sk9, sk2), being), 
              theta(sk(sk1, sk3, sk8, sk11, sk4, sk7, sk5, sk9, sk2), predicate, clear)], 1306790100), 
    object(sk11, container), 
    named(sk11, b)]

   [holds_at([theta(sk(sk1, sk3, sk4, sk7, sk5, sk9, sk2), experiencer, sk9), 
              state(sk(sk1, sk3, sk4, sk7, sk5, sk9, sk2), being), 
              theta(sk(sk1, sk3, sk4, sk7, sk5, sk9, sk2), location, sk7)], 1306790100), 
    object(sk9, container), 
    named(sk9, a), 
    object(sk7, container), 
    named(sk7, d)]  

3. Indirect Effects

Consider now the case where the forklift picks up the container b and drives from the warehouse to the loading dock. It is obvious for a human that the container b will no longer be at the same location as before. That means driving from the warehouse to the loading dock has the indirect effect that the container changes its location.

3.1 Specification in PENG Light

   The container c is on the floor.
		 
   The container b is on the container c.
		 
   The container d is on the floor.
		 
   The container b is clear.
		 
   The container d is clear. 

   If a container X is clear 
      and the container X is on a container Y
      and X is not Y 
      and an agent picks up the container X
      then the container Y will be clear.

   If a container X is clear 
      and the container X is on a container Y 
      and X is not Y
      and an agent picks up X
      then X will no longer be on Y.

   If an agent is at a location 
      and an object is at the location 
      and the agent picks up the object 
      then the agent will be holding the object.
		 
   If an agent holds an object
      and the agent puts down the object 
      then the agent will no longer be holding the object.

   If an agent holds an object 
      and the agent drives from a location X to a location Y
      and X is not Y 
      then the agent will be at the location Y 
           and the object will be at the location Y.

   If an agent holds an object 
      and the agent drives from a location X to a location Y 
      and X is not Y 
      then the agent will no longer be at the location X 
           and the object will no longer be at the location X.

   Every container is an object.

   Every warehouse is a location.

   Every loading dock is a location.

   Every forklift is an agent.

   The forklift is in the warehouse.

   The container b is in the warehouse.

   The forklift picks up the container b at 09:00.

   The forklift drives from the warehouse to the loading dock at 09:05. 

3.2 Event Calculus Representation

   Asserted: theta(sk1, theme, sk9).

   Asserted: event(sk1, driving).

   Asserted: theta(sk1, time, sk2).

   Asserted: timex(sk2, 1306537500).

   Asserted: theta(sk1, location, sk3).

   Asserted: object(sk3, loading_dock).

   Asserted: theta(sk1, origin, sk8).

   Asserted: theta(sk4, agent, sk9).

   Asserted: event(sk4, picking_up).

   Asserted: theta(sk4, theme, sk15).

   Asserted: theta(sk4, time, sk5).

   Asserted: timex(sk5, 1306537200).

   Asserted: theta(sk6, experiencer, sk15).

   Asserted: state(sk6, being).

   Asserted: theta(sk6, location, sk8).

   Asserted: theta(sk7, experiencer, sk9).

   Asserted: state(sk7, being).

   Asserted: theta(sk7, location, sk8).

   Asserted: object(sk8, warehouse).

   Asserted: object(sk9, forklift).

   Asserted: object(A, agent) :- 
               object(A, forklift).

   Asserted: object(B, location) :- 
               object(B, loading_dock).

   Asserted: object(C, location) :- 
               object(C, warehouse).

   Asserted: object(D, object) :- 
               object(D, container).

   Asserted: terminates(E, [theta(F, experiencer, G), 
                            state(F, being), 
                            theta(F, location, H)], I) :- 
               theta(E, theme, J), 
               event(E, driving), 
               theta(E, location, K), 
               object(K, location), 
               theta(E, origin, H), 
               object(H, location), 
               H\=K, 
               object(G, object), 
               object(J, agent), 
               theta(E, time, L), 
               timex(L, I), 
               holds_at([theta(M, experiencer, J), 
                         state(M, holding), 
                         theta(M, theme, G)], I).

   Asserted: terminates(E, [theta(N, experiencer, J), 
                            state(N, being), 
                            theta(N, location, H)], I) :- 
               theta(E, theme, J), 
               event(E, driving), 
               theta(E, location, K), 
               object(K, location), 
               theta(E, origin, H), 
               object(H, location), 
               H\=K, 
               object(G, object), 
               object(J, agent), 
               theta(E, time, L), 
               timex(L, I), 
               holds_at([theta(M, experiencer, J), 
                         state(M, holding), 
                         theta(M, theme, G)], I).

   Asserted: initiates(O, [theta(sk(O, P, Q, R, S, T, U), experiencer, S), 
                           state(sk(O, P, Q, R, S, T, U), being), 
                           theta(sk(O, P, Q, R, S, T, U), location, P)], V) :- 
               theta(O, theme, T), 
               event(O, driving), 
               theta(O, location, P), 
               object(P, location), 
               theta(O, origin, Q), 
               object(Q, location), 
               Q\=P, 
               object(S, object), 
               object(T, agent), 
               theta(O, time, U), 
               timex(U, V), 
               holds_at([theta(R, experiencer, T), 
                         state(R, holding), 
                         theta(R, theme, S)], V).

   Asserted: initiates(O, [theta(sk(O, P, Q, R, S, T, U), experiencer, T), 
                           state(sk(O, P, Q, R, S, T, U), being), 
                           theta(sk(O, P, Q, R, S, T, U), location, P)], V) :- 
               theta(O, theme, T), 
               event(O, driving), 
               theta(O, location, P), 
               object(P, location), 
               theta(O, origin, Q), 
               object(Q, location), 
               Q\=P, 
               object(S, object), 
               object(T, agent), 
               theta(O, time, U), 
               timex(U, V), 
               holds_at([theta(R, experiencer, T), 
                         state(R, holding), 
                         theta(R, theme, S)], V).

   Asserted: terminates(W, [theta(X, experiencer, Y), 
                            state(X, holding), 
                            theta(X, theme, Z)], A1) :- 
               theta(W, agent, Y), 
               event(W, putting_down), 
               theta(W, theme, Z), 
               object(Z, object), 
               object(Y, agent), 
               theta(W, time, B1), 
               timex(B1, A1), 
               holds_at([theta(X, experiencer, Y), 
                         state(X, holding), 
                         theta(X, theme, Z)], A1).

   Asserted: initiates(D1, [theta(sk(D1, E1, F1, G1, H1, I1, J1), experiencer, I1), 
                            state(sk(D1, E1, F1, G1, H1, I1, J1), holding), 
                            theta(sk(D1, E1, F1, G1, H1, I1, J1), theme, F1)], K1) :- 
               theta(D1, agent, I1), 
               event(D1, picking_up), 
               theta(D1, theme, F1), 
               object(F1, object), 
               object(H1, location), 
               object(I1, agent), 
               theta(D1, time, J1), 
               timex(J1, K1), 
               holds_at([theta(E1, experiencer, F1), 
                         state(E1, being), 
                         theta(E1, location, H1)], K1), 
               holds_at([theta(G1, experiencer, I1), 
                         state(G1, being), 
                         theta(G1, location, H1)], K1).

   Asserted: terminates(L1, [theta(S1, experiencer, N1), 
                             state(S1, being), 
                             theta(S1, location, O1)], P1) :- 
               theta(L1, agent, Q1), 
               event(L1, picking_up), 
               theta(L1, theme, N1), 
               object(Q1, agent), 
               object(O1, container), 
               object(N1, container), 
               N1\=O1, 
               theta(L1, time, R1), 
               timex(R1, P1), 
               holds_at([theta(S1, experiencer, N1), 
                         state(S1, being), 
                         theta(S1, location, O1)], P1), 
               holds_at([theta(T1, experiencer, N1), 
                         state(T1, being), 
                         theta(T1, predicate, clear)], P1).

   Asserted: initiates(U1, [theta(sk(U1, V1, W1, X1, Y1, Z1, A2), 
                            experiencer, X1), state(sk(U1, V1, W1, X1, Y1, Z1, A2), being), 
                            theta(sk(U1, V1, W1, X1, Y1, Z1, A2), predicate, clear)], B2) :- 
               theta(U1, agent, V1), 
               event(U1, picking_up), 
               theta(U1, theme, Z1), 
               object(V1, agent), 
               object(X1, container), 
               object(Z1, container), 
               Z1\=X1, 
               theta(U1, time, A2), 
               timex(A2, B2), 
               holds_at([theta(W1, experiencer, Z1), 
                         state(W1, being), 
                         theta(W1, location, X1)], B2), 
               holds_at([theta(Y1, experiencer, Z1), 
                         state(Y1, being), 
                         theta(Y1, predicate, clear)], B2).

   Asserted: theta(sk10, experiencer, sk13).

   Asserted: state(sk10, being).

   Asserted: theta(sk10, predicate, clear).

   Asserted: theta(sk11, experiencer, sk15).

   Asserted: state(sk11, being).

   Asserted: theta(sk11, predicate, clear).

   Asserted: theta(sk12, experiencer, sk13).

   Asserted: state(sk12, being).

   Asserted: theta(sk12, location, sk17).

   Asserted: named(sk13, d).

   Asserted: object(sk13, container).

   Asserted: theta(sk14, experiencer, sk15).

   Asserted: state(sk14, being).

   Asserted: theta(sk14, location, sk18).

   Asserted: named(sk15, b).

   Asserted: object(sk15, container).

   Asserted: theta(sk16, experiencer, sk18).

   Asserted: state(sk16, being).

   Asserted: theta(sk16, location, sk17).

   Asserted: object(sk17, floor).

   Asserted: named(sk18, c).

   Asserted: object(sk18, container).

3.3 Question

    Where is the container b?

3.4 Event Calculus Query

    [object(A, B),  
     (object(A, B), 
      holds_at([theta(C, experiencer, D), 
                state(C, being), 
                theta(C, location, A)], 1306590783), 
      named(D, b), 
      object(D, container))]

3.5 Answers

   [object(sk3, loading_dock),  
    object(sk3, location)]

4. Continuous Change

Let us consider the case where a truck departs at a given time point from the origin, travels along with a fixed velocity of 80 km/h, and halts at a later time point. We can calculate how far the truck is away from the origin at each point in time, if we know the speed and the elapsed time (questions without temporal markers are time-stamped during their translation). We need an axiom (maroon) that deals with continuous change and can do the calculation.

4.1 Specification in PENG Light

   The truck is 0 km away from the origin.

   The truck leaves the origin at 10:00.

   Every truck is a vehicle.

   If a vehicle leaves an origin 
      then the vehicle will be travelling.

   If a vehicle is travelling 
      and the vehicle halts
      then the vehicle will no longer be travelling.

   If a vehicle is X km away from an origin 
      and leaves the origin 
      then the vehicle will no longer be X km away from the origin.

   If a vehicle is X km away from an origin 
      and halts
      then the vehicle will be X km away from the origin.

   If a vehicle is travelling 
      and the vehicle is X km away from the origin at the timepoint T1 
      and [ Y is X + ( 80  * ( T2 - T1 ) / 3600 ) ] 
      then the vehicle will be Y km away from the origin at the timepoint T2.

4.2 Event Calculus Representation

   Asserted: trajectory([theta(A, experiencer, B), 
                         state(A, being),  
                         theta(A, predicate, travelling)], 
                         C, 
                        [theta(sk(D, E, F, C, A, B), experiencer, B), 
                         state(sk(D, E, F, C, A, B), being), 
                         theta(sk(D, E, F, C, A, B), origin, sk4), 
                         theta(sk(D, E, F, C, A, B), direction, away), 
                         theta(sk(D, E, F, C, A, B), quantity, [eq, E, kilometer])], D) :- 
               object(B, vehicle), 
               holds_at([theta(F, experiencer, B), 
                         state(F, being), 
                         theta(F, origin, sk4), 
                         theta(F, direction, away), 
                         theta(F, quantity, [eq, G, kilometer])], C), 
               E is G+(80*(D-C)/3600).

   Asserted: initiates(H, 
                      [theta(sk(H, I, J, K), experiencer, J), 
                       state(sk(H, I, J, K), being), 
                       theta(sk(H, I, J, K), origin, I), 
                       theta(sk(H, I, J, K), direction, away), 
                       theta(sk(H, I, J, K), quantity, [eq, L, kilometer])], M) :- 
               theta(H, theme, J), 
               event(H, halting), 
               object(I, origin), 
               object(J, vehicle), 
               theta(H, time, K), 
               timex(K, M), 
               holds_at([theta(sk(H, I, J, K), experiencer, J), 
                         state(sk(H, I, J, K), being), 
                         theta(sk(H, I, J, K), origin, I), 
                         theta(sk(H, I, J, K), direction, away), 
                         theta(sk(H, I, J, K), quantity, [eq, L, kilometer])], M).

   Asserted: terminates(N, 
                        [theta(O, experiencer, P), 
                         state(O, being), 
                         theta(O, origin, Q), 
                         theta(O, direction, away), 
                         theta(O, quantity, [eq, R, kilometer])], S) :- 
               theta(N, agent, P), 
               event(N, leaving), 
               theta(N, theme, Q), 
               object(Q, origin), 
               object(P, vehicle), 
               theta(N, time, T), 
               timex(T, S), 
               holds_at([theta(O, experiencer, P), 
                         state(O, being), 
                         theta(O, origin, Q), 
                         theta(O, direction, away), 
                         theta(O, quantity, [eq, R, kilometer])], S).

   Asserted: terminates(U, 
                        [theta(Z, experiencer, W), 
                         state(Z, being), 
                         theta(Z, predicate, travelling)], X) :- 
               theta(U, theme, W), 
               event(U, halting), 
               object(W, vehicle), 
               theta(U, time, Y), 
               timex(Y, X), 
               holds_at([theta(Z, experiencer, W), 
                         state(Z, being), 
                         theta(Z, predicate, travelling)], X).

   Asserted: initiates(A1, 
                       [theta(sk(A1, B1, C1, D1), experiencer, C1), 
                        state(sk(A1, B1, C1, D1), being), 
                        theta(sk(A1, B1, C1, D1), predicate, travelling)], E1) :- 
               theta(A1, agent, C1), 
               event(A1, leaving), 
               theta(A1, theme, B1), 
               object(B1, origin), 
               object(C1, vehicle), 
               theta(A1, time, D1), 
               timex(D1, E1).

   Asserted: object(F1, vehicle) :- 
               object(F1, truck).

   Asserted: theta(sk1, agent, sk5).

   Asserted: event(sk1, leaving).

   Asserted: theta(sk1, theme, sk4).

   Asserted: theta(sk1, time, sk2).

   Asserted: timex(sk2, 1306540800).

   Asserted: theta(sk3, experiencer, sk5).

   Asserted: state(sk3, being).

   Asserted: theta(sk3, origin, sk4).

   Asserted: object(sk4, origin).

   Asserted: theta(sk3, direction, away).

   Asserted: theta(sk3, quantity, [eq, 0, kilometer]).

   Asserted: object(sk5, truck).

4.3 Question

   How many kilometers is the truck away from the origin?

4.4 Event Calculus Query

   [A,  
    (holds_at([theta(B, experiencer, C), 
               state(B, being), 
               theta(B, origin, D), 
               theta(B, direction, away), 
               theta(B, quantity, A)], 1306584471), 
               object(D, origin), 
               object(C, truck))]

4.5 Answer

   [eq, 970.467, kilometer]


© Rolf Schwitter, Macquarie University, Australia
Last modified: 13th September 2011