We have chosen to specify the semantics of CML by providing a translation into logic. One important aspect of this translation is the representation of time.
A time-quantity is a numeric everywhere continuous quantity whose dimension is the time-dimension. This is the only choice that is consistent with the standard mathematics for ODEs. Other representations of time, such as Allen's temporal relations, can be constructed from this one.
All time dependent quantities and relations in CML have a time-quantity as an implicit argument. To provide a translation into logic, this implicit dependence must be made explicit. In the formalization, we have chosen to make the dependence of functions and relations on time explicit by augmenting them with a first argument that is a time-quantity. Thus, the time dependent relation q becomes where t is a time-quantity.
This is not, however, sufficient to provide a correct translation for time dependent quantities. Consider the following examples:
CML syntax | Inadequate translation | |
1. | (= q1 (+ q2 q3)) | (= (q1 ?t) (+ (q2 ?t) (q3 ?t))) |
2. | (= q1 (d/dt q2)) | (= (q1 ?t) (d/dt (q2 ?t))) |
Within the logic defined by KIF, the derivative case could be handled by replacing
q2 with the function:
In the translation of CML into logic, time is handled in three steps:
(lambda (?t1) \+(if (= ?t1 ?t) \+
(value-at q ?t1)))
The correct translation of our example is thus:
(+ (lambda (?t1)(if (= ?t1 ?t)(value-at q2 ?t1)))
(lambda (?t1)(if (= ?t1 ?t)(value-at q1 ?t1)))
(d/dt (lambda (?t1)(if (= ?t1 ?t)(value-at q2 ?t1)))
(= (lambda (?t1)(if (= ?t1 ?t)(value-at q1 ?t1)))
and
(= (lambda (?t1)(if (= ?t1 ?t)(value-at q1 ?t1)))
We can extend the definition of + with an axiom such as:
(=> (and (+ ?x ?y ?z) (function-quantity ?x) (function-quantity ?y) (function-quantity ?z)) (forall ?t (+ (value-at ?x ?t) (value-at ?y ?t) (value-at ?z ?t))))Every mathematical operation that typically applies to numbers must be extended similarly. Note that such a mathematical relation is false when any of its arguments is undefined.