Calo Ontology

Time

Description
The Time ontology specifies Calo's representation for temporal entities, relations and predicates (KM operators).

References

Classes

Operators

Entity

Description

The top-level class of "things that are" (as opposed to "things that happen"). Entity is not part of the Calo Time ontology, but all Entities have a time-of-existence.

Syntax

(a Entity with (<slot> (<value> ...)))
(<Entity-instance> has (<slot> (<value> ...)))

Slots

slotcardvalueslot inverse
time-of-existence
1
(a Time-Interval)
time-of-existence-of
+ slots not relevant to time

Examples

(a Entity with
   (time-of-existence ((a Time-Interval with
                          (time-begins ((a Time-Instant with
                                           (time-value ((:pair 2001 *year)
                                                        (:pair 2 *month)
                                                        (:pair 5 *day)
                                                        (:pair 17 *hour)
                                                        *CST
                                                        *Monday
                                           ))
                          )))
                          (time-ends   ((a Time-Instant with
                                           (time-value ((:pair 2003 *year)
                                                        (:pair 2 *month)
                                                        (:pair 4 *day)
                                                        (:pair 16 *hour)
                                                        (:pair 59 *minute)
                                                        *CST
                                                        *Wednesday
                                           ))
                          )))
   )))
)

Event

Description

The top-level class of "things that happen" (as opposed to "things that are"). Event is not part of the Calo Time ontology, but all Events have a time-at.

Syntax

(a Event with (<slot> (<value> ...)))
(<Event-instance> has (<slot> (<value> ...)))

Slots

slotcardvalueslot inverse
duration
1
(a Duration-Value)
duration-of
time-at
1
(a Time-Instant)
time-of
time-during
1
(a Time-Interval)
time-contains
+ slots not relevant to time

Examples

(a Event with
   (time-during ((a Time-Interval with
                    (time-begins ((a Time-Instant with
                                     (time-value ((:pair 1999 *year)
                                                  (:pair 12 *month)
                                                  (:pair 31 *day)
                                                  (:pair 23 *hour)
                                                  (:pair 59 *hour)
                                                  (:pair 50 *second)
                                                  *PST
                                 ))
                    )))
                    (time-ends   ((a Time-Instant with
                                     (time-value ((:pair 2000 *year)
                                                  (:pair 1 *month)
                                                  (:pair 1 *day)
                                                  (:pair 0 *hour)
                                                  *PST
                                 ))
                    )))
   )))
   (duration ((a Duration-Value with
                 (value ((:pair 10 *second)
                         (:pair *brief Event)))
   )))
)
 
(a Event with
   (time-at ((a Time-Instant with
                (time-value ((:pair 0 *hour)
                             (:pair 0 *minute)
                             *Saturday
                ))
   )))
)

Day-Constant

Description

Named instances for the days of the week.

Instances

*Sunday
*Monday
*Tuesday
*Wednesday
*Thursday
*Friday
*Saturday

Time-Zone-Constant

Description

Named instances for the common time zones.

Instances

*IDLW     ; -12
*HST      ; -10
*AKST     ; -9
*AKDT     ; -8
*PST      ; -8
*PDT      ; -7
*MST      ; -7
*MDT      ; -6
*CST      ; -6
*CDT      ; -5
*EST      ; -5
*EDT      ; -4
*AST      ; -4
*ADT      ; -3
*NST      ; -3.5
*NDT      ; -2.5
*UTC      ; +0
*GMT      ; +0
*WET      ; +0
*IST      ; +1
*WEST     ; +1
*CET      ; +1
*CEST     ; +2
*EET      ; +2
*EEST     ; +3
*MSK      ; +3
*MSD      ; +4
*GET      ; +4
*GEST     ; +5
*KGT      ; +5
*KGST     ; +6
*CXT      ; +7
*AWST     ; +8
*JST      ; +9
*KST      ; +9
*KDT      ; +10
*ACST     ; +9.5
*ACDT     ; +10.5
*AEST     ; +10
*AEDT     ; +11
*IDLE     ; +12
*NZST     ; +12
*NZDT     ; +13

Duration-Value

Description

A Property-Value for time durations.

Syntax

(a Duration-Value with (<slot> (<value> ...)))
(<Duration-Value-instance> has (<slot> (<value> ...)))

Slots

The time-iCalendar-duration-string slot can be queried for an iCalendar-format duration string (P[wwW][ddD]T[hhH][mmM][ssS]). The infix "T" only appears if at least one of the hours, minutes and seconds parts is non-NIL. The minutes part appears as "0M" if it is NIL and the hours and seconds parts are non-NIL.

The time-iCalendar-duration-string slot should only be queried, as its value is computed from the Duration-Value structure.

slotcardvalue
time-iCalendar-duration-string
1
(a String)

Examples

(a Duration-Value with (value ((:pair 7 *week))))

KM> (the time-iCalendar-duration-string of (thelast Duration-Value))
("P7W")
 
(a Duration-Value with (value ((:pair 15 *day) 
                               (:pair 5 *hour) 
                               (:pair 20 *second)
)))

KM> (the time-iCalendar-duration-string of (thelast Duration-Value))
("P15DT5H0M20S")

UoM-Duration

Description

Named instances for legal units of measure within descriptions of duration. Note that for unit conversion *year is equal to 365 *day and a *month is equal to 1/12 *year.

Instances

*year
*month
*week
*day
*hour
*minute
*second

UoM-Time

Description

Named instances for legal units of measure within descriptions of Time-Instants.

Instances

*year
*month
*day
*hour
*minute
*second

Temporal-Entity

Description

The top-level class of temporal "things" (time intervals and instances). The subclasses Time-Interval and Time-Instant are almost always used in favor of the more general Temporal-Entity class.

Syntax

(a Temporal-Entity with (<slot> (<value> ...)))
(<Temporal-Entity-instance> has (<slot> (<value> ...)))

Slots

slotcardvalueslot inverse
time-begins
1
(a Time-Instant)
time-beginning-of
time-ends
1
(a Time-Instant)     ;; for Time-Instant, time-ends = time-begins
time-end-of

Examples

(a Temporal-Entity with
   (time-begins ((a Time-Instant with
                    (time-value ((:pair 1900 *year)
                                 (:pair 7 *month)
                                 (:pair 1 *day)
                    ))
   )))
   (time-ends   ((a Time-Instant with
                    (time-value ((:pair 1901 *year)
                                 (:pair 1 *month)
                                 (:pair 1 *day)
                    ))
   )))
)

Time-Instant

Description

A Temporal-Entity of zero duration or one that can be considered "point-like" for its application.

Syntax

(a Time-Instant with (<slot> (<value> ...)))
(<Time-Instant-instance> has (<slot> (<value> ...)))

Slots

There must be at most one (:pair) for each UoM-Time, at most one Day-Constant and at most one Time-Zone-Constant in each time-value structure. The times must also be "normalized": years are integers, months are the integers 1-12, days are integers 1-31, hours are integers 0-23, minutes are integers 0-59 and seconds are real numbers < 60.

The time-year, time-month, etc. slots can be used along with or instead of the time-value structure. Values are copied automatically between the time-value structure and the more specific accessor slots.

The time-iCalendar-date-time-string slot can be queried for an iCalendar-format date-time string (yyyymmddThhmmssZ). This slot should only be queried, as its value is computed from the time-value structure. The slot deviates from the iCalendar spec in two important ways: first, fields with unknown values appear as zeros; second, the trailing Z always appears and does not reflect any time zone information (as currently required by the Action group's Task Manager).

The time-xmls-date-time-string slot can be queried for an XML Schema-format date-time string (yyyy-mm-ddThh:mm:ss). This slot should only be queried, as its value is computed from the time-value structure. In keeping with the XML Schema dateTime type, date fields with unknown values appear as 1 and time fields with unknown values appear as 0. Time zone information is not recorded (all times are considered "local").

slotcardvalueslot inverse
time-value
8
(:pair (a Number) (a UoM-Time))
...
(a Day-Constant)
(a Time-Zone-Constant)
time-value-of
time-year
1
(a Number)
time-year-of
time-month
1
(a Number)
time-month-of
time-day
1
(a Number)
time-day-of
time-day-of-week
1
(a Day-Constant)
time-day-of-week-of
time-hour
1
(a Number)
time-hour-of
time-minute
1
(a Number)
time-minute-of
time-second
1
(a Number)
time-second-of
time-zone
1
(a Time-Zone-Constant)
time-zone-of
time-iCalendar-date-time-string
1
(a String)
 
time-xmls-date-time-string
1
(a String)
 
+ slots inherited from Temporal-Entity

Examples

(a Time-Instant with
   (time-value ((:pair 2003 *year)
                (:pair 12 *month)
                (:pair 18 *day)
                (:pair 15 *hour)
                (:pair 5 *minute)
                (:pair 45 *second)
                *Thursday
                *CST
   ))
)

KM> (the time-iCalendar-date-time-string of (thelast Time-Instant))
("20031218T150545Z")

KM> (the time-xmls-date-time-string of (thelast Time-Instant))
("2003-12-18T15:05:45")
 
(a Time-Instant with
   (time-year        (2003))
   (time-month       (12))
   (time-day         (18))
   (time-hour        (15))
   (time-minute      (5))
   (time-second      (45))
   (time-day-of-week (*Thursday))
   (time-zone        (*CST))
)
 
(a Time-Instant with
   (time-value ((:pair 2 *month)))
   (time-day   (27))
)

KM> (the time-iCalendar-date-time-string of (thelast Time-Instant))
("00000227T000000Z")

KM> (the time-iCalendar-date-time-string of (thelast Time-Instant))
("0001-02-27T00:00:00")

Time-Interval

Description

A Temporal-Entity of non-zero duration; a Temporal-Entity with "extent".

Syntax

(a Time-Interval with (<slot> (<value> ...)))
(<Time-Interval-instance> has (<slot> (<value> ...)))

Slots

slotcardvalueslot inverse
time-inside
n
(a Time-Instant)            ;; [  *  ]
time-is-inside
time-begins-or-in
n
(a Time-Instant)
time-is-beginning-or-inside
time-between
2
(:args (a Time-Instant)     ;; = time-begins
       (a Time-Instant))    ;; = time-ends
--
time-int-before
n
(a Time-Interval)           ;; [...]
                            ;;         [...]
time-int-after
time-int-meets
n
(a Time-Interval)           ;; [...]
                            ;;     [...]
time-int-met-by
time-int-overlaps
n
(a Time-Interval)           ;; [...]
                            ;;   [...]
time-int-overlapped-by
time-int-starts
n
(a Time-Interval)           ;; [..]
                            ;; [....]
time-int-started-by
time-int-during
n
(a Time-Interval)           ;;   [..]
                            ;; [......]
time-int-contains
time-int-finishes
n
(a Time-Interval)           ;;   [..]
                            ;; [....]
time-int-finished-by
time-int-equals
n
(a Time-Interval)           ;; [...]
                            ;; [...]
time-int-equals
+ slots inherited from Temporal-Entity

Examples

(a Time-Interval with
   (time-begins ((a Time-Instant with
                    (time-value ((:pair 16 *hour)
                                 (:pair 0 *minute)
                    ))
   )))
   (time-ends   ((a Time-Instant with
                    (time-value ((:pair 16 *hour)
                                 (:pair 30 *minute)
                    ))
   )))
   (time-before ((a Time-Interval with
                    (time-begins ((a Time-Instant with
                                     (time-value ((:pair 17 *hour)))
                                  )
                    ))
   )))
   (time-meets  ((a Time-Interval with
                    (time-begins ((a Time-Instant with
                                     (time-value ((:pair 16 *hour)
                                                  (:pair 30 *minute)
                                     ))
                                  )
                    ))
   )))
)
 
(*Lunchtime has
   (instance-of (Time-Interval))
   (time-begins ((a Time-Instant with
                    (time-value ((:pair 12 *hour)))
   )))
   (time-ends   ((a Time-Instant with
                    (time-value ((:pair 13 *hour)))
   )))
)

(TodaysMeeting has
   (instance-of (Meeting))
   (time-begins ((a Time-Instant with
                    (time-value ((:pair 11 *hour)
                                 (:pair 30 *minute)
                    ))
   )))
   (time-ends   ((a Time-Instant with
                    (time-value ((:pair 12 *hour)
                                 (:pair 30 *minute)
                    ))
   )))
   (time-int-overlaps (*Lunchtime))
)

Operators

Description

The following boolean binary infix operators are defined for Temporal-Entities. It is possible to use the operators with underspecified Temporal-Entities but certain underspecified times are considered ill-formed for comparison. The operators will return NIL for these ill-formed times. For example, (t1 time-lt t2) will evaluate to true if t1 can be proven to be earlier than t2. It will evaluate to NIL if t1 can be proven to be equal to or later than t2 or if it is inappropriate to compare t1 and t2.

Conversion of time zones is not yet implemented.

Syntax

(<Temporal-Entity-instance> <operator> <Temporal-Entity-instance>)

Slots

operatorarg1 typearg2 typesemantics
time-eq
(a Time-Instant)
(a Time-Instant)
arg1 is equal to (same time as) arg2
time-gt
(a Time-Instant)
(a Time-Instant)
arg1 is greater than (later than) arg2
time-lt
(a Time-Instant)
(a Time-Instant)
arg1 is less than (earlier than) arg2
time-gte
(a Time-Instant)
(a Time-Instant)
arg1 is greater than or equal to (same time as or later than) arg2
time-lte
(a Time-Instant)
(a Time-Instant)
arg1 is less than or equal to (same time as or earlier than) arg2
time-starts-or-during
(a Time-Interval)
(a Time-Interval)
the beginning of arg1 is later than or equal to the beginning of arg2;
the end of arg1 is earlier than the end of arg2
time-non-overlap
(a Time-Interval)
(a Time-Interval)
the end of arg1 is earlier than the beginning of arg2

Examples

KM> ((a Time-Instant with (time-value ((:pair 17 *hour) *Friday)))
     time-eq
     (a Time-Instant with (time-value ((:pair 17 *hour) *Friday)))
    )
(t)

KM> ((a Time-Instant with (time-value ((:pair 3 *month) (:pair 17 *day))))
     time-eq
     (a Time-Instant with (time-value ((:pair 3 *month))))
    )
NIL

KM> ((a Time-Instant with (time-value ((:pair 2000 *year) (:pair 1 *month) (:pair 1 *day))))
     time-gt
     (a Time-Instant with (time-value ((:pair 1999 *year) (:pair 12 *month) (:pair 31 *day))))
    )
(t)

KM> ((a Time-Instant with (time-value ((:pair 4 *hour))))
     time-lt
     (a Time-Instant with (time-value ((:pair 4 *hour) (:pair 30 *minute))))
    )
(t)

KM> ((a Time-Instant with (time-value ((:pair 4 *hour) (:pair 10 *second))))
     time-lt
     (a Time-Instant with (time-value ((:pair 4 *hour) (:pair 1 *minute))))
    )
(t)

KM> ((a Time-Instant with (time-value (*Wednesday (:pair 16 *hour))))
     time-lt
     (a Time-Instant with (time-value (*Thursday (:pair 15 *hour))))
    )
(t)

KM> ((a Time-Instant with (time-value (*Monday)))                      ;; inappropriate underspecification 
     time-lt
     (a Time-Instant with (time-value (*Monday (:pair 1 *hour))))
    )
NIL

KM> ((a Time-Instant with (time-value ((:pair 2 *month) (:pair 5 *day))))
     time-lt
     (a Time-Instant with (time-value ((:pair 2 *month) *Saturday)))   ;; inappropriate underspecification 
    )
NIL


Return to Calo Ontologies Page