Presentation is loading. Please wait.

Presentation is loading. Please wait.

2/12/01 Professor Richard Fikes Representing Time Computer Science Department Stanford University CS222 Winter 2001 Knowledge Systems Laboratory, Stanford.

Similar presentations


Presentation on theme: "2/12/01 Professor Richard Fikes Representing Time Computer Science Department Stanford University CS222 Winter 2001 Knowledge Systems Laboratory, Stanford."— Presentation transcript:

1 2/12/01 Professor Richard Fikes Representing Time Computer Science Department Stanford University CS222 Winter 2001 Knowledge Systems Laboratory, Stanford University

2 2 About Time A physical dimension (the Time-Dimension) Time plenum Large temporal space in which all events are located E.g., time line temporally possible worlds èAssume time is continuous and linear >Time line analogous to continuous number line Duration An amount of time E.g., a century 25 minutes as long as it takes for the kettle to boil

3 Knowledge Systems Laboratory, Stanford University3 Points and Intervals Time point Time point Position on a temporal coordinate system E.g., 2:22 p.m., February 2, 2000 Primitive object Analogous to a real number Also represented at varying granularities E.g., March 14, 1994 Time interval Time interval Set of two or more time points E.g., the 16th century 10:50 to 11:00 a.m. on May 30, 1993 noon to 1:00 p.m. every Tuesday in 2000 Primitive object Convex interval Convex interval analogous to interval on number line Has two distinguished points: Start-Point and End-Point Can be Left-Open, Left-Closed, Right-Open, and/or Right-Closed

4 Knowledge Systems Laboratory, Stanford University4 Class Hierarchy of Time Ontology Calendar- January... Time-Point Time-Interval Convex-Time-Interval Regular- Non-Convex -Time-Interval Time- Interval- Left-Open Time- Interval- Right-Open Time- Interval- Right-Closed Time- Interval- Left-Open- Right-Open Time- Interval- Left- Closed- Right- Closed Time- Interval- Left-Open- Right-Open Time- Interval-Left- Closed-Right- Closed Calendar-MonthCalendar-Day Non-Convex-Time- Interval Calendar- Sunday Calendar- Saturday Calendar-Day- 1 Calendar-Day- 31 Calendar- December Time-Quantity Time- Interval- Left-Closed

5 Knowledge Systems Laboratory, Stanford University5 Class Frame Time-Point Time-Point Subclass-Of: Thing *Location-Of Maximum-Cardinality: 1 Value-Type: Time-Quantity *Year-Of Maximum-Cardinality: 1 Value-Type: Integer *Month-Of Maximum-Cardinality: 1 Value-Type: Calendar-Month-Type *Day-Of Maximum-Cardinality: 1 Value-Type: Calendar-Day-Type *Week-Day-Of Maximum-Cardinality: 1 Value-Type: Calendar-Week-Day-Type *Hour-Of Maximum-Cardinality: 1 Value-Type: Integer *Minute-Of Maximum-Cardinality: 1 Value-Type: Integer *Second-Of Maximum-Cardinality: 1 Value-Type: Integer *Granularity-Of Slot-Cardinality: 1 Value-Type: Time-Granularity

6 Knowledge Systems Laboratory, Stanford University6 Location of Time Points Location-Of Function Location-Of Amount of time from point zero to the time-point Value is a time quantity (i.e., a duration) Point zero assumed to be midnight Jan 1, 1900 Midnight-January Instance-Of: Time-Point Location-Of: Time-Instant Time-Instant Instance-Of: Time-Quantity (=> (Time-Unit ?u) (Quantity-Magnitude Time-Instant ?u 0))

7 Knowledge Systems Laboratory, Stanford University7 Year-Of, Month-Of, Day-Of, etc. Derivable from Location-Of Year-OfHour-OfMinute-OfSecond-Of Value of Year-Of, Hour-Of, Minute-Of, & Second-Of is an integer (=> (Time-Point ?p) (= (Year-Of ?p) (+ (LINLT (Quantity-Magnitude (Location-Of ?p) Year-Unit)) 1900))) (=> (Time-Point ?p) (= (Hour-Of ?p) (Mod (LINLT (Quantity-Magnitude (Location-Of ?p) Hour-Unit)) 24))) [Note: LINLT means Largest Integer Less Than.] Month-Of Value of Month-Of is a Calendar-Month-Type Calendar-Month-Type is a class whose instances are the 12 subclasses of Calendar-Month (e.g., Calendar-January) Day-Of Value of Day-Of is a Calendar-Day-Type Calendar-Day-Type is a class whose 31 instances are classes Calendar-Day-1 through Calendar-Day-31 Week-Day-Of Value of Week-Day-Of is a Calendar-Week-Day-Type

8 Knowledge Systems Laboratory, Stanford University8 Binary Relations on Time-Points BeforeAfterEqual-Point Before, After, Equal-Point Defined in terms of Location-Of (=> (and (Time-Point ?i) (Time-Point ?j)) ( (Before ?i ?j)... (< (Location-Of ?i) (Location-Of ?j))... ) (=> (Physical-Quantity ?q1) (Physical-Dimension ?q1 ?d) (Physical-Quantity ?q2) (Physical-Dimension ?q2 ?d) (Unit-Of-Measure ?u) (Unit-Dimension ?u ?d) ( (< ?q1 ?q2) (< (Quantity-Magnitude ?q1 ?u) (Quantity-Magnitude ?q2 ?u)))) Point-In-Interval Point-In-Interval Primitive relation

9 Knowledge Systems Laboratory, Stanford University9 Class Frame Time-Interval Time-Interval Instance-Of: Class *Starting-Point: Value-Type: Time-Point Slot-Cardinality: 1 *Ending-Point: Value-Type: Time-Point Slot-Cardinality: (=> (Time-Interval ?i) (and (Before (Starting-Point ?i) (Ending-Point ?i)) (=> (Time-Point ?p) (and (=> (Before ?p (Starting-Point ?i)) (not (Point-In-Interval ?p ?i))) (=> (Before (Ending-Point ?i) ?p) (not (Point-In-Interval ?p ?i)))))))

10 Knowledge Systems Laboratory, Stanford University10 Functions on Time-Interval Starting-PointEnding-Point Starting-Point and Ending-Point (=> (and (Time-Point ?s) (Time-Interval ?i)) ( (Starting-Point ?i ?s) (and (not (exists ?j (and (Time-Point ?j) (Before ?j ?s) (Point-In-Interval ?j ?i)))) (=> (Time-Point ?p) (not (exists ?k (and (Time-Point ?k) (Before ?k ?p) (Point-In-Interval ?k ?i)))) (or (Equal-Point ?p ?s) (Before ?p ?s))))))) Duration Duration Convex time interval >Time quantity whose magnitude is the difference between the location of the intervals ending point and starting point Non-convex time interval >Sum of durations of all convex time intervals contained in it

11 Knowledge Systems Laboratory, Stanford University11 Relations on Time-Interval James Allen defined a complete set of relations on time intervals Precedes: ||End-1 < Start-2 || Meets: ||End-1 = Start-2 || Overlaps: ||Start-1 < Start-2 < End-1 || Costarts:||Start-1 = Start-2 || During: ||Start-2 < Start-1 ||End-1 < End-2 Cofinishes:||End-1 = End-2 || Equal

12 Knowledge Systems Laboratory, Stanford University12 Using the Interval Relations The reign of George VI preceded that of Elizabeth II. (Precedes (ReignOf GeorgeVI) (ReignOf ElizabethII)) The reign of Elvis overlapped with the 1950s. (Starting-Point Fifties (Starting-Point AD1950)) (Ending-Point Fifties (Ending-Point AD1959)) (Overlaps Fifties (ReignOf Elvis))

13 Knowledge Systems Laboratory, Stanford University13 A Week in January (and (Subclass-Of Week-In-January Convex-Time-Interval) (=> (Week-In-January ?w) (and (Duration ?w (The-Quantity Day 7)) (exists ?j (and (Calendar-January ?j) (or (During ?w ?j) (Costarts ?w ?j) (Cofinishes ?w ?j)))))))

14 Knowledge Systems Laboratory, Stanford University14 Class Hierarchy of Time Ontology Calendar- January... Time-Point Time-Interval Convex-Time-Interval Regular- Non-Convex -Time-Interval Time- Interval- Left-Open Time- Interval- Right-Open Time- Interval- Right-Closed Time- Interval- Left-Open- Right-Open Time- Interval- Left- Closed- Right- Closed Time- Interval- Left-Open- Right-Open Time- Interval-Left- Closed-Right- Closed Calendar-MonthCalendar-Day Non-Convex-Time- Interval Calendar- Sunday Calendar- Saturday Calendar-Day- 1 Calendar-Day- 31 Calendar- December Time-Quantity Time- Interval- Left-Closed

15 Knowledge Systems Laboratory, Stanford University15 Infinity and Density Infinite-PastInfinite-Future Infinite-Past and Infinite-Future are time points (and (Time-Point Infinite-Past) (=> (Time-Point ?p) (not (Before ?p Infinite-Past)))) The time line is considered to be dense (=> (and (Time-Point ?i) (Time-Point ?j) (Before ?i ?j)) (exists ?k (and (Before ?i ?k) (Before ?k ?j))))

16 Knowledge Systems Laboratory, Stanford University16 Class Frame Time-Point Time-Point Subclass-Of: Thing *Location-Of Maximum-Cardinality: 1 Value-Type: Time-Quantity *Year-Of Maximum-Cardinality: 1 Value-Type: Integer *Month-Of Maximum-Cardinality: 1 Value-Type: Calendar-Month-Type *Day-Of Maximum-Cardinality: 1 Value-Type: Calendar-Day-Type *Week-Day-Of Maximum-Cardinality: 1 Value-Type: Calendar-Week-Day-Type *Hour-Of Maximum-Cardinality: 1 Value-Type: Integer *Minute-Of Maximum-Cardinality: 1 Value-Type: Integer *Second-Of Maximum-Cardinality: 1 Value-Type: Integer *Granularity-Of Slot-Cardinality: 1 Value-Type: Time-Granularity

17 Knowledge Systems Laboratory, Stanford University17 Time Granularity Time cannot be measured with infinite accuracy Need a notion of abstracted time points E.g., 1984, May-1927, 12:50 p.m. February 14, 2000 Time intervals are not sufficient Specify a granularity for a time point Provides for uncertainty that a point occurs somewhere in a certain time interval E.g., The time point 1984 at granularity year occurs somewhere during the convex interval 1984

18 Knowledge Systems Laboratory, Stanford University18 Time Granularity Time-Granularity Subclass-Of: Thing *Time-Unit-Of Value-Type: Time-Unit Max-Cardinality: 1 Year-Granularity Instance-Of: Time-Granularity Time-Unit-Of: Year Infinitely-Fine-Granularity Instance-Of: Time-Granularity Time-Unit-Of: Slot-Cardinality: 0

19 Knowledge Systems Laboratory, Stanford University19Equal-Point ( (Equal-Point ?i ?j) (or (and (Granularity-Of ?i Infinitely-Fine-Granularity) (Granularity-Of ?j Infinitely-Fine-Granularity) (= (Location-Of ?i) (Location-Of ?j))) (and (Granularity-Of ?i ?gran) (Granularity-Of ?j ?gran) (= (LINLT (Quantity-Magnitude (Location-Of ?i) (Time-Unit-Of ?gran))) (LINLT (Quantity-Magnitude (Location-Of ?j) (Time-Unit-Of ?gran))))))) Two time points on two different levels of granularity cannot be said to be equal to each other

20 Knowledge Systems Laboratory, Stanford University20 Full Definition of Before (=> (and (Time-Point ?i) (Time-Point ?j)) ( (Before ?i ?j) (or (and (Granularity-Of ?i Infinitely-Fine-Granularity) (Granularity-Of ?j Infinitely-Fine-Granularity) (< (Location-Of ?i) (Location-Of ?j))) (and (Granularity-Of ?i Infinitely-Fine-Granularity) (Granularity-Of ?j ?gran-j) (< (Location-Of ?i) (The-Quantity (LINLT (Quantity-Magnitude (Location-Of ?j) (Time-Unit-Of ?gran-j))) (Time-Unit-Of ?gran-j))))... (and (Granularity-Of ?i ?gran-i) (Granularity-Of ?j ?gran-j) (< (The-Quantity (SINLT (Quantity-Magnitude (Location-Of ?i) (Time-Unit-Of ?gran-i))) (Time-Unit-Of ?gran-i)) (The-Quantity (LINLT (Quantity-Magnitude (Location-Of ?j) (Time-Unit-Of ?gran-j))) (Time-Unit-Of ?gran-j)))))))

21 Knowledge Systems Laboratory, Stanford University21 Styles of Temporal Representations Timeless Quantification Functions and relations have a time argument E.g., (Married Joe Anne 1993) >Situation calculus Objects have time intervals associated with them E.g., (contains (time-of (Marriage Joe Anne)) 1993) Sentences hold true at times E.g., (holds (Married Joe Anne) 1993) Tense logics E.g., (F (Married Joe Anne)) (F (and (not (Married Joe Anne)) (P (Married Joe Anne))))


Download ppt "2/12/01 Professor Richard Fikes Representing Time Computer Science Department Stanford University CS222 Winter 2001 Knowledge Systems Laboratory, Stanford."

Similar presentations


Ads by Google