Representing Relative Temporal Knowledge with TAND Connective P.G Wijayarathna, Y. Kawata, A. Santosa, K. Isogai and M. Maekawa Department of Information System Design, Graduate School of Information Systems, University of Electro-Communications, 1-5-1 Chofugaoka, Chofu-Shi, Tokyo 182, Japan. email :
[email protected]
Abstract Several temporal models have been introduced to represent and reason temporal knowledge. These models are mainly based on the point based or interval based time theories. However both point based and interval based time models have their own weaknesses. Allen points out that there can be a time point in point based models where either two events could occur at the same time or none would occur. Galton shows weaknesses in interval based time models. On the other hand, standard logical connective AND does not represent temporal order of events. The AND connective is more suitable for concurrent events rather than for sequential events. Hence in this paper we suggest a new temporal logical connective TAND to represent sequential events and redefine the standard logical connective AND to represent concurrent events. TAND increases the expressive power of the temporal logic. We show how incomplete relative temporal relations can be represented using TAND and AND connectives.
Introduction Much work has been done to represent and reason temporal knowledge in a wide range of disciplines; including artificial intelligence[1][2][3][4][5][6], databases[7][8][9], program verification[10] and software requirements specification languages[11][12][13]. Temporal knowledge representation models introduced so far can be grouped into two: namely point based and interval based temporal models. In point based models time is represented by points in a real line. Time intervals are considered as set of time points in a real line bounded by start and end time points. Start and end time points are used to represent activities. However, Allen[3] argues that there exists a time point in point based models where either two events could occur simultaneously or none would occur. This may lead to semantically inappropriate situations. Interval based models employ the time interval as the primitive. Events and activities are represented using time intervals which meet each other, and there is no time gap between consecutive time intervals. Allen[3] introduces thirteen temporal relations among time intervals namely “before”, “after”, “during”, “contains”, “overlaps”, “overlapped-by”, “meets”, “met-by”, “starts”, “started-by”, “finishes”, “finished-by” and “equals”. However, Galton[14] shows that Allen’s temporal logic is not suitable to represent knowledge on continuous events. Both point based and interval based models require special predicates or operators to represent and to reason temporal knowledge. Allen[15] employs HOLD(t,p) and IN(t1,t2) predicates in his temporal logic. HOLD(t,p) is true iff property p holds during time interval t while IN(t1,t2) is true iff time interval t1 falls within time interval t2. Peter[5] uses + and - unary operators to represent start and end points of an event. McDermott[2] uses Lisp-like statements while Manna and Pnueli[10] apply several first-order temporal operators for program verification. However Torsun[16] says that first-order temporal logic is not complete. Temporal operators available in first-order temporal logic[10][16][17] do not provide enough expressiveness to represent relative temporal knowledge. For example Allen’s[3] temporal relations cannot be represented by existing first-order temporal operators. Still we have to use Allen’s[15] first-order versions of temporal relations with HOLD(t,p) and IN(t1,t2). These temporal relations require complete time information. Therefore it is difficult to represent and reason incomplete relative temporal knowledge about events. In Information Systems we have to deal with incomplete relative temporal information rather than events with complete information with exact times of occurrence. Freksa[6] discusses about incomplete
knowledge about events. For example in road traffic simulations, we may have to specify that police should follow a vehicle which does not stop after signal lights turn Red at a particular junction. This requirement may appear in Templar specification[12] as, When not stop(vehicle, junction) After signal(red, junction) Then-do follow(vehicle, police). In this case, we are not interested to know exactly when the signal lights turn Red. Simply we will examine whether the event “not stop(vehicle, junction)” occurs after the event “signal(red, junction)”. In Templar, temporal predicates can take temporal operators such as always_in_the_future, sometimes_in_the_future, for_time, within_time. However relative temporal knowledge is represented using the clauses before, while and after. TROLL[13] employs existing temporal operators and the predicates “before” and “after”. TELOS[11] uses a slightly modified version of Allen’s temporal relations to represent temporal knowledge. These show the importance of incomplete relative temporal knowledge in software requirements specifications. The time-sensitive Boolean operators: ANDS, ORS, NOTS are yet another approach to represent and reason temporal knowledge[9]. The application of these operators is limited since they are designed to represent concurrent situations. For example, result of “p ANDS q” is a set of time intervals where p and q both occur. Hence these operators cannot be used to represent relative temporal relations except “equals”. Both point based and interval based temporal models first describe a model to represent time, and subsequently use a predefined time model to define events and activities. This is the main reason for the problems in these models. However our approach is different. We do not use any time model; instead we use the logical truth status of two events at any given time and ascertain whether they occur simultaneously or not. If they do not occur simultaneously, an event should follow the other event. In this paper we propose a new truth value based temporal logical connective TAND (and_then connective) to represent both complete and incomplete relative temporal knowledge and we redefine the standard logical connective AND to represent only concurrent situations. TAND is easy to use and it enhances the expressive power of temporal logic when combined with existing temporal operators. It can be used wherever the standard logical connective AND is used. TAND can be used with both point based and interval based temporal models.
The Standard Logical Connective AND Logical connective AND ( Λ ) does not discriminate the temporal order of events. Even though two events occur in different time zones, as far as the standard logical connective AND is concerned they occur in the same time zone. Hence it treats the events as concurrent events. The whole time line is a single time zone for the AND connective. We use the “time zone” to represent both time points and time intervals. Therefore the standard logical connective AND is not suitable for applications where the temporal order of events play an important role. Bassiouni et al.[9] argue that events p and q in “p Λ q” are not required to occur simultaneously. However, “p Λ ¬p = false” is one of the universally accepted properties of the standard AND connective ( Idempotent law ). Whenever p is true, ¬p becomes false and when p is false, ¬p becomes true. Therefore in both cases “( p Λ ¬p ) = ( true Λ false )= ( false Λ true )” is false. According to their argument p and ¬p are not required to occur simultaneously; i.e. it is not required for “p Λ ¬p” to be false. Because p can be true at one time and ¬p can be true at another time giving “ true Λ true = true”. This contradicts with the universally accepted property “p Λ ¬p = false”. However the standard logical connective AND considers events p and q in “p Λ q” as having occurred simultaneously, even though they really occur in two different time zones. Hence it is more realistic and logical to restrict standard logical connective AND to represent simultaneous events and to introduce the new temporal logical connective to represent other cases.
The TAND ( π ) logical connective For any given two events p and q, the truth state at any time “t” will be one of the following: only p occurs, only q occurs, both p and q occur or neither p nor q occur. That is at any given time t, “p = true ” , “q = true ” , “ ( p ∧ q ) = true” or “ ( ¬p ∧ ¬q ) = true ”. Here ∧ represents concurrent events. Therefore we can represent any relative temporal relation using these four truth states. For example to represent “p meet q” , we have to express that there exists a state where “p = true ” and then another state where “q = true ”. That is “p
meet q” is true, iff { p = true and then q = true} is true. In this representation one state is followed by another state. As we have discussed in an earlier section, the standard logical connective AND does not distinguish whether p and q occur simultaneously or not. Hence what we need is a logical connective to represent and then in such a way that “true and then true” is equal to true. We define and then as TAND logical connective and is represented by π. Then “p meet q” can be represented by “(p π q )”. We show how to represent Allen’s[3] temporal relation using π in detail in a later section of this paper.
Properties of AND and TAND 1. Idempotent Law p ∧ ¬p = false ; either p is true or false. p π ¬p = false ; p is true and then p is true. p is false and then p is true. p is false and then p is false. p π ¬p = true ; p is true and then p is false. Therefore TAND does not obey the Idempotent law as AND does. 2. Commutative law p∧q=q∧p p πq ≠ qπ p Since p π q means that p is true and then q is true while q π p means that q is true and then p is true. There are only two things we can ascertain from p π q. First, p and q do not occur at the same time and second, if Tq and Tp are sets of time zones where q and p occur respectively then ∀t1∈Tq > ∀t2∈Tp. Therefore TAND does not obey the commutative law as AND does. However both “p ∧ q” and “q ∧ p” express that p and q occur at the same time. Therefore the order of events is insignificant. 3. Distributive law p ∧ ( q ∨ s ) = ( p ∧ q ) ∨ ( p ∧ s) p∨(q∧s)=(p∨q)∧(p∨s) p π ( q ∨ s ) = (p π q ) ∨ ( p π s) (table 1) p π ( q ∧ s ) = (p π q ) ∧ ( p π s) (table 2) 4. Associative law p∧(q ∧ s)= (p∧q)∧ s pπ(q π s)= (pπq)πs This means TAND obeys the associative law as AND does. 5. DeMorgan’s law ¬( p ∧ q ) = ¬p ∨ ¬q ¬( pπ q ) = ( p π ¬q ) ∨ ( ¬p π q ) ∨ ( ¬p π ¬q) As we can see TAND obeys distributive and associative laws as AND does but not other laws. Axioms Now we can define three important axioms about TAND. A1. ( p TAND q ) Þ ( ( p ∨ q ) ∧ ¬( p ∧ q) ) Þ ( p ∨ q ) ∧ (¬p ∨ ¬ q) Þ ( ( p ∨ q ) ∧ ¬p) ∨ ( ( p ∨ q ) ∧ ¬ q) ) Þ ( p ∧ ¬p ) ∨ ( q ∧ ¬p ) ∨ ( p ∧ ¬q ) ∨ ( q ∧ ¬ q ) Þ ( q ∧ ¬p ) ∨ ( p ∧ ¬q ) A2. ( p TAND q ) ≠ ( q TAND p ) A3. If time of occurrence of p is t1 and that of q is t2, then t2 > t1. Axiom A1 says that at any given time t, if ( p TAND q ) is true then either p or q must be true. However both p and q cannot be true or false simultaneously. Case 1. Let us say ( p TAND q ) is true and p is true. Now for axiom A1 to be true, right hand side of axiom A1 must be true, since the left hand side is true. ( A Þ B is true iff B is true or A is false.) That is, ( p TAND q ) Þ ( q ∧ ¬p ) ∨ ( p ∧ ¬q ) Þ ( q ∧ ¬p ) ∨ ( p ∧ ¬q ) = T (since ( p TAND q ) = T) Þ ( q ∧ F ) ∨ ( T ∧ ¬q ) = T (since ( p = T) ) Þ F ∨ ¬q = T (since ( q ∧ F) = F and ( T ∧ ¬q ) = ¬q )
Þ ¬q = T Þ q=F
(since F ∨ ¬q = ¬q )
We started with both ( p TAND q ) and p are true and could infer that q is false. Therefore we could show that if ( p TAND q ) is true and p is true then q must be false. Case 2. Now let us assume that ( p TAND q ) is true and q is true. Then applying the same logic we can show that always p must be false. Case 3. Let us say that ( p TAND q ) is true and p is false. Then, ( p TAND q ) Þ ( q ∧ ¬p ) ∨ ( p ∧ ¬q ) Þ ( q ∧ ¬p ) ∨ ( p ∧ ¬q ) = T (since ( p TAND q ) = T) Þ ( q ∧ T ) ∨ ( F ∧ ¬q ) = T (since ( p = F) ) Þ q∨ F =T (since ( q ∧ T ) = q and ( F ∧ ¬q ) = F ) Þ q =T (since q ∨ F = q ) This means whenever ( p TAND q ) is true and p is false, q must be true. Case 4. Now let us say that ( p TAND q ) is true and q is false. Then we can show that p must be true. Therefore considering above cases 1, 2, 3 and 4 we can conclude that whenever ( p TAND q ) is true, either p or q should be true. However both p and q cannot be true or false simultaneously. This is a significant result as it proves that TAND can solve the problem that occur in point based temporal models. Allen[3] says that there exists a time point in point based models where either ( p ∧ q ) is true or ( ¬p ∧¬q) is true. This means the truth state of any given time t in point based temporal models can be one of the following: only p is true, only q is true, ( p ∧ q ) is true or ( ¬p ∧¬q) is true. However we could prove that there are only two truth states when ( p TAND q ) is true ( only p is true or only q is true ). This is Allen’s[3] (p meets q).
Representation of Allen’s temporal relations The important thing to remember when representing temporal relations with TAND is that the propositions p and q should be mutually exclusive. That is to say always ( p AND q ) should be false. Propositions p and q can contain more than one event. In this situation p and q can be considered as composite events. In this paper we use events to represent single events and composite events. Since we have already shown how to represent ( p meets q ) using π, in this section we consider the other temporal relations. First let us consider the case of ( A π B π C ) where we have three mutually exclusive events. By definition of TAND ( A ∧ B ∧ C) should be false and time of occurrence of A< time of occurrence of B < time of occurrence of C. The ( A π B π C ) is equal to ( A π B ) π C because TAND obeys associative law. Therefore expressions having more than two mutually exclusive events can be decomposed into sub expressions having at most two events keeping the meaning of the expression unchanged. Then by axiom A1, ( A π B ) Þ ( A ∨ B ) ∧ ¬( A ∧ B ). If ( A π B ) is D, then ( A π B π C ) = ( D π C ). Applying axiom A1 again we have ( D π C ) Þ ( D ∨ C ) ∧ ¬( D ∧ C ). Then ( A π B π C ) = ( D π C ) Þ ( D ∨ C ) ∧ ¬( D ∧ C ) = ( D ∧ ¬C ) ∨ ( ¬D ∧ C ) Þ [ (( A ∧ ¬B ) ∨ ( ¬A ∧ B )) ∧ ¬C ] ∨ [ ¬(( A ∧ ¬B ) ∨ ( ¬A ∧ B )) ∧ C )] Þ ( A ∧ ¬B ∧ ¬C ) ∨ ( ¬A ∧ B ∧ ¬C ) ∨ (B ∧ A ∧ C ) ∨ (¬A ∧ ¬B ∧ C ) Since A, B and C are mutually exclusive events, (B ∧ A ∧ C ) is false. Þ ( A ∧ ¬B ∧ ¬C ) ∨ ( ¬A ∧ B ∧ ¬C ) ∨ (¬A ∧ ¬B ∧ C ) ( F1 ) Þ ( A=T, B=F, C=F ) or ( A=F, B=T, C=F ) or (A=F, B=F, C=T ) Þ Only one of A, B and C can occur at any given time t Therefore it is enough to show (X ∧ Y ∧ Z ) is false to prove that given temporal representation ( X π Y π Z ) is accurate.
p before q
= p π ( ¬p ∧ ¬q) π q
p before q is true, iff only p is true and then ( ¬p ∧ ¬q) is true and then only q is true. Since (p ∧ ¬p ∧ ¬q ∧ q ) is always false, at any given time t, only p can occur, only q can occur or both p and q cannot occur. In addition to this TAND gives the chronological order of the events. Therefore our representation of ( p before q ) is sound. If A= p, B = ( ¬p ∧ ¬q), C = q then from F1, ( A π B π C ) Þ ( A ∧ ¬B ∧ ¬C ) ∨ ( ¬A ∧ B ∧ ¬C ) ∨ (¬A ∧ ¬B ∧ C )
Þ [ p ∧ ¬( ¬p ∧ ¬q) ∧ ¬q ] ∨ [ ¬p ∧ ( ¬p ∧ ¬q) ∧ ¬q ] ∨ [¬p ∧ ¬( ¬p ∧ ¬q) ∧ q ] ( p before q ) Þ [ p ∧ ¬( ¬p ∧ ¬q) ∧ ¬q ] ∨ [¬p ∧ ¬q ] ∨ [¬p ∧ ¬( ¬p ∧ ¬q) ∧ q ] If ( p before q ) = T and p = T then, ( p before q ) Þ [ T ∧ ¬( F ∧ ¬q) ∧ ¬q ] ∨ [F ∧ ¬q ] ∨ [F ∧ ¬( F ∧ ¬q) ∧ q ] = T Þ [ T ∧ ¬F ∧ ¬q ] ∨ F ∨ F] = T Þ q=F If ( p before q ) = T and p = F then, ( p before q ) Þ [ F ∧ ¬( T ∧ ¬q) ∧ ¬q ] ∨ [T ∧ ¬q ] ∨ [T ∧ ¬( T ∧ ¬q) ∧ q ] = T Þ [ F ∨ ¬q ∨ (q ∧ q) ] = T Þ q = F or q = T If ( p before q ) = T and q = T then, ( p before q ) Þ [ p ∧ ¬( ¬p ∧ F) ∧ F ] ∨ [¬p ∧ F ] ∨ [¬p ∧ ¬( ¬p ∧ F) ∧ T ] = T Þ [F ∨ F ∨ ¬p ] = T Þ ¬p = T Þ p=F If ( p before q ) = T and q = F then, ( p before q ) Þ [ p ∧ ¬( ¬p ∧ T) ∧ T ] ∨ [¬p ∧ T ] ∨ [¬p ∧ ¬( ¬p ∧ T) ∧ F ] = T Þ [ p ∧ ¬( ¬p ∧ T) ∧ T ] ∨ [¬p ∧ T ] ∨ [¬p ∧ ¬( ¬p ∧ T) ∧ F ] = T Þ p = T or p = F This shows that at any given time t, only p occurs or only q occurs but both cannot occur. That is the combination of events required to occur ( p before q ) or ( q after p ). TAND connects them so as to give the required chronological order.
p overlaps q = ( p ∧ ¬q) π ( p ∧ q ) π ( q ∧ ¬p ) p overlaps q is true, iff p is true and then ( p ∧ q ) is true and then q is true. If our expression about “overlaps” is accurate, we would be able to show that for any given time t, only p occurs, only q occurs or both p and q occur. Since [ ( p ∧ ¬q) ∧ ( p ∧ q ) ∧ ( q ∧ ¬p ) ] is false, our representation of (p overlaps q) is accurate. Let us say A = ( p ∧ ¬q), B = ( p ∧ q ) and C = ( q ∧ ¬p ). Then from F1, ( p overlaps q) = ( A π B π C ) Þ ( A ∧ ¬B ∧ ¬C ) ∨ ( ¬A ∧ B ∧ ¬C ) ∨ (¬A ∧ ¬B ∧ C ) Þ ((p∧¬q)∧¬(p∧q)∧¬(q∧¬p)) ∨ (¬(p∧¬q)∧(p∧q)∧¬(q∧¬p)) ∨ (¬(p∧¬q)∧ ¬(p∧q)∧ (q∧¬p)). If ( p overlaps q ) = T and p = T, then ( p overlaps q ) = T Þ ((p∧¬q)∧¬(p∧q)∧¬(q∧¬p))∨(¬(p∧¬q)∧(p∧q)∧¬(q∧¬p)) ∨ (¬(p∧¬q)∧ ¬(p∧q)∧ (q∧¬p)) =T Þ ((T∧¬q)∧¬(T∧q)∧¬(q∧F))∨(¬(T∧¬q)∧(T∧q)∧¬(q∧F)) ∨ (¬(T∧¬q)∧ ¬(T∧q)∧ (q∧F)) =T (¬q∧¬q) ∨ (q ∧ q) ∨ F) =T q = T or q = F
If ( p overlaps q ) = T and p = F, then ( p overlaps q ) = T Þ ((p∧¬q)∧¬(p∧q)∧¬(q∧¬p))∨(¬(p∧¬q)∧(p∧q)∧¬(q∧¬p)) ∨ (¬(p∧¬q)∧ ¬(p∧q)∧ (q∧¬p)) =T Þ ((F∧¬q)∧¬(F∧q)∧¬(q∧T))∨(¬(F∧¬q)∧(F∧q)∧¬(q∧T)) ∨ (¬(F∧¬q)∧ ¬(F∧q)∧ (q∧T)) =T ( F ∨ F ∨ q ) =T
Þ q =T
If ( p overlaps q ) = T and q = T, then ( p overlaps q ) = T Þ ((p∧F)∧¬(p∧T)∧¬(T∧¬p))∨(¬(p∧F)∧(p∧T)∧¬(T∧¬p)) ∨ (¬(p∧F)∧ ¬(p∧T)∧ (T∧¬p)) =T ( F ∨ p ∨ ¬p) =T Þ p = T or p = F
If ( p overlaps q ) = T and q = F, then ( p overlaps q ) = T Þ ((p∧T)∧¬(p∧F)∧¬(F∧¬p))∨(¬(p∧T)∧(p∧F)∧¬(F∧¬p)) ∨ (¬(p∧T)∧ ¬(p∧F)∧ (F∧¬p)) =T (p ∨ F ∨ F) =T Þ p=T This indicates that at any given time t only p occurs, both p and q occur or only q occurs. That is the situation where ( p overlaps q ) or ( q overlapped-by p ) occur. Proper chronological order represented by TAND connective gives the required representations for ( p overlaps q ) or ( q overlapped-by p ).
p starts q = ( p ∧ q ) π (q ∧ ¬p)
(p starts q ) is true, iff ( p ∧ q ) is true and then q is true. Hence at any time, either ( p ∧ q ) or (q ∧ ¬p) should be true. From axiom A1, ( p starts q) Þ [ ( p ∧ q ) ∨ (q ∧ ¬p) ] ∧ ¬[ ( p ∧ q ) ∧ (q ∧ ¬p) ] [ ( p ∧ q ) ∨ (q ∧ ¬p) ] ∧ ¬[ F ] Þ [ ( p ∧ q ) ∨ (q ∧ ¬p) ]
Then if ( p starts q) = T and p = T, ( p starts q) Þ [ ( p ∧ q ) ∨ (q ∧ ¬p) ] ∧ ¬[ ( p ∧ q ) ∧ (q ∧ ¬p) ] = T [ ( T ∧ q ) ∨ (q ∧ F) ] = T Þ q =T If ( p starts q) = T and p = F, ( p starts q) Þ [ ( p ∧ q ) ∨ (q ∧ ¬p) ] = T Þ [ ( F ∧ q ) ∨ (q ∧ T) ] = T Þq=T If ( p starts q) = T and q = T,
( p starts q) Þ [ ( p ∧ q ) ∨ (q ∧ ¬p) ] = T Þ [ ( p ∧ T ) ∨ (T ∧ ¬p) ] = T [ ( p ∧ T ) ∨ (T ∧ ¬p) ] = T Þ [ p ∨ ¬p ] = T Þ p = T or p = F If ( p starts q) = T and q = F, ( p starts q) Þ[ ( p ∧ q ) ∨ (q ∧ ¬p) ] = T Þ [ ( p ∧ F ) ∨ (F ∧ ¬p) ] = T Þ F∨F=T This cannot happen. That is our assumption q = F is wrong. Hence if ( p starts q ) is true, always q should be true. This shows that there can only be two possible occurrences of events when ( p starts q ) is true: p and q both occur or only q occurs. These are the required truth states for ( p starts q ) or ( p ends q ) to occur. TAND connects these events in chronological order. Depending on the order of the occurrences either ( p starts q ) or ( p ends q ) will occur.
p during q = (q ∧ ¬p) π ( p ∧ q ) π (q ∧ ¬p) ( p during q ) is true iff (q ∧ ¬p) is true and then ( p ∧ q ) is true and then (q ∧ ¬p) is true. We can express ( p during q ) as (q ∧ ¬p) π ( p ∧ q ) π ( p ∧ q ) π (q ∧ ¬p). Because ( p ∧ q ) π (p ∧ q) equals ( p ∧ q ). Let ( p ∧ q ) occur during time zone TL. The TL can be divided into two time zones: TL1 and TL2 such that TL1 + TL2 equals TL and TL1 follows TL2. Then ( p ∧ q ) occur in time zone TL1 and then occur in time zone TL2. Therefore ( p ∧ q ) can be expressed as ( p ∧ q ) π ( p ∧ q ) without making any errors. Then (p during q ) = (q ∧ ¬p) π ( p ∧ q ) π ( p ∧ q ) π (q ∧ ¬p) = [(q ∧ ¬p) π ( p ∧ q )] π [( p ∧ q ) π (q ∧ ¬p)] = X π Y if [(q ∧ ¬p) π ( p ∧ q )] = X and [( p ∧ q ) π (q ∧ ¬p)] = Y. Then X = (q ∧ ¬p) π ( p ∧ q ) Þ [(q ∧ ¬p) ∨ ( p ∧ q )] ∧ ¬[ (q ∧ ¬p) ∧ ( p ∧ q )] Þ (q ∧ ¬p) ∨ ( p ∧ q ) and Y = ( p ∧ q ) π (q ∧ ¬p) Þ [ ( p ∧ q )∨ (q ∧ ¬p) ] ∧ ¬[ ( p ∧ q ) ∧ (q ∧ ¬p)] Þ( p ∧ q )∨(q ∧ ¬p) = (q ∧ ¬p) ∨ ( p ∧ q ) . This means, it is sufficient to consider either only X or Y. X represents ( p ends q ) and Y represents ( p starts q ). So we can represent ( p during q ) as a combination of ( p ends q ) and ( p starts q). That is ( p during q ) = ( p ends q) TAND ( p starts q). We have shown in the earlier section only q occurs and then both p and q occur are the required events for ( p ends q) to occur. The reverse sequence of events, that is both p and q occur first and then only q occur are the necessary order of events for the event ( p starts q ) to occur. Therefore we can conclude that the required order of events ( p during q ) to occur is, first only q occurs and then both p and q occur and then only q occurs.
p equals q = (p ∧ q) ( p equals q ) is true, iff p and q are both true at the same time. Since we redefine standard logical connective AND to represent only concurrent situations the required representation is (p ∧ q). Throughout this section we have proved that TAND can be used to represent temporal relations suggested by J. F. Allen[3] uniquely and properly.
Discussion Users can define their own temporal relations using TAND. For example one can combine Allen’s[3] (p before q ) and (p meets q ) together to represent a temporal relation called “on-or-before”. The required representation is, ( p on-or-before q) = [ p π ( ¬p ∧ ¬q) π q ] ∨ [ p π q ].
Yet another example, let us assume that one wants to define a temporal relation “odd-relation” to represent “only p occurs and then only q occurs and then both p and q occur and then only q occurs and then only p occurs”. Then, ( p odd-relation q) = ( p ∧ ¬q) π ( ¬p ∧ q) π (p ∧ q) π ( ¬p ∧ q) π ( p ∧ ¬q). The TAND connective can be used with existing temporal operators. This will increase the expressive power of temporal logic. For example let us consider how to represent the necessary computational steps of a software module to compute the factorial of a given integer “n”. The possible steps would be : 1) let z = 1, 2) let z = z * n, 3) reduce n by 1, 4) repeat steps 2 and 3 until n equals 1, 5) return z. Then we can represent this module as, factorial(n) = (let z=1) π [ ((let z = z* n) π (reduce n by 1)) until (n=1)] π (return z). In this representation, TAND is combined with existing temporal operator “until”. Formal logic has three basic constructs required to write a program with the introduction of TAND to represent sequential events and redefining the standard logical connective to represent concurrent events. Therefore formal logic can be extended to a programming language. Since formal logic has already been used as the basis for specification languages it will be a sound mathematical basis for languages designed to support the entire software life cycle from software requirements specification to programming.
Conclusion We suggest a new logical connective “TAND” to represent temporal order of events and redefine the standard logical connective “AND” to represent concurrent events. We show in this paper TAND can be applied to represent all relative temporal relations suggested by J. F Allen[3]. TAND is especially designed to represent incomplete relative temporal knowledge where exact time of occurrences of events is not available.
References [1]. Bruce, B. C. (1972) A Model for Temporal References and Its Application in a Question Answering Program. Artificial Intelligence, 3, 1-25. [2]. McDermott, D. (1982) A Temporal Logic for Reasoning About Processes and Plans. Cognitive Science, 6, 101-155. [3]. Allen, J. F. (1983) Maintaining Knowledge about Temporal Intervals. Communications of the ACM, 26, 832-843. [4]. Shoham, Y. (1987) Temporal Logics in AI: Semantical and Ontological Considerations. Artificial Intelligence, 33, 89-104. [5]. Peter, V. B. (1992) Reasoning about qualitative temporal information. Artificial Intelligence, 58, 297-326. [6]. Freksa, C. (1992) Temporal reasoning based on semi-intervals. Artificial Intelligence, 54, 199-227. [7]. Maiocchi, R. , Pernici, B. and Barbic, F. (1992) Automatic Deduction of Temporal Information. ACM Transactions of Database Systems, 17(4), 647-688. [8]. Knight, B. and Ma, J. (1994) A Temporal Database Model Supporting Relative and Absolute Time. The Computer Journal, 37(7), 587-597. [9]. Bassiouni, M. A. , Mukherjee, A. and Llewellyn, M. J. (1994) Design and Implementation of Extended Boolean and Comparison Operators for Time-Oriented Query Languages. The Computer Journal, 37(7), 576587. [10]. Manna, Z and Pnueli, A. (1995) Temporal verification of Reactive Systems :Safety. Sringer-Verlag New York, Inc. [11]. Mylopoulos, J., Borgida, A., Jarke, M. and Koubarakis, M. (1990) Telos: Reperesenting Knowledge About Information Systems. ACM Transactions on Information Systems, 8(4), 325-362. [12]. Tuzhilin, A. (1995) Templar: A Knowledge-Based Language for Software Specifications Using Temporal Logic. ACM Transactions on Information systems, 13(3), 269-304. [13]. Jungclaus, R., Saake, G., Hartmann, T. and Sernadas, C. (1996) TROLL- A Language for Object-Oriented Specification of Information Systems. ACM Transactions on Information Systems, 14(2), 175-211. [14]. Galton, A. (1990) A Critical Examination of Allen’s Theory of Action and Time. Artificial Intelligence, 42, 159-188. [15]. Allen, J.F. (1984) Towards a General Theory of Action and Time. Artificial Intelligence, 23, 123-154. [16]. Torsun, I. S. (1995) Foundations of Intelligent Knowledge-Based Systems. Academic Press. [17]. Abadi, M. and Manna, Z. (1990) Nonclausal Deduction in First-Order Temporal Logic. Journal of the Association for Computing Machinery, 37(2), 279-317.
(q and s occur in time zone t1 and p occurs in time zone t2 ; t1 > t2 ) p T T T T F F F F
q T T F F T T F F
s T F T F T F T F
(q∨s) T T T F T T T F
( p π q) T T F F F F F F
( p π s) T F T F F F F F
p π ( q∨ s ) T T T F F F F F
( p π q )∨ ( p π s ) T T T F F F F F
p π ( q∧ s ) T F F F F F F F
(pπ q)∧ (pπ s) T F F F F F F F
Table 1 p T T T T F F F F
q T T F F T T F F
s T F T F T F T F
( q ∧s ) T F F F T F F F
( p π q) T T F F F F F F
( p π s) T F T F F F F F Table 2