Foundations of Artificial Intelligence
A temporal situation can be described at different levels of abstraction depending on the accuracy required or the available knowledge. Time granularity can be defined as the resolution power of the temporal qualification of a statement. Providing a formalism with the concept of time granularity makes it possible to model time information with respect to differently grained temporal domains. This does not merely mean that one can use different time units, e.g., months and days, to represent
... quantities in a unique flat temporal model, but it involves more difficult semantic issues related to the problem of assigning a proper meaning to the association of statements with the different temporal domains of a layered temporal model and of switching from one domain to a coarser/finer one. Such an ability of providing and relating temporal representations at different "grain levels" of the same reality is both an active research theme and a major requirement for many applications (e.g., integration of layered specifications and agent communication). After a presentation of the general requirements of a multi-granular temporal formalism, we discuss the various issues and approaches to time granularity proposed in the literature. We focus our attention on the main existing formalisms for representing and reasoning about quantitative and qualitative time granularity: the set-theoretic framework developed by Bettini et al. [Bettini et al., 2000] and the logical approach systematically investigated by for quantitative time granularity, and Euzenat's relational algebra granularity conversion operators [Euzenat, 2001] for qualitative time granularity. We present in detail the achieved results, we outline the open issues, and we point out the links that connect the different approaches. In the last part of the chapter, we describe some applications exploiting time granularity, and we briefly discuss related work in the areas of formal methods, temporal databases, and data mining. Thus, if the sentence is claimed at 1 a.m., it will be true that "I eat" at some hours t whose distance d from the current hour is such that 23 ≤ d < 47. Instead, if the same sentence is claimed at 10 p.m. of the same day, d will be such that 2 ≤ d < 26. Consider now the sentence "dinner will be ready in one hour". If it is interpreted in the domain of minutes, its meaning is that dinner will be ready in 60 minutes starting from the minute when it is claimed. Therefore, if the sentence is claimed at minute, say, 10, or 55, of a given hour, it will be always true that "dinner is ready" at a minute t whose distance d from the current minute is exactly 60 minutes. Clearly, the two examples require two different semantics. Thus, when the granularity concept is applied to time, we generally assume a set of differently-grained domains (or layers) with respect to which the situations are described and some operators relating the components of the multi-level description. The resulting system will depend on the language in which situations are modeled, the properties of the layers, and the operators. Although these elements are not fully independent, we first take into consideration each of them separately. Languages, layers, operators The distinctive features of a formal system for time granularity depend on some basic decisions about the way in which one models the relationships between the representations of a given situation with respect to different granularity layers. Languages. The first choice concerns the language. One possibility is to use the same language to describe a situation with respect to different granularity layers. As an example, the representations associated with the different layers can use the same temporal logic or the same algebra of relations. In such a way, the representations of the same situation at different abstraction levels turn out to be homogeneous. Another possibility is to use different languages at different levels of abstraction, thus providing a set of hybrid representations of the same situation. As an example, one can adopt a metric representation at the finer layers and a qualitative one at the coarser ones. Layers. Any formal system for time granularity must feature a number of different (granularity) layers. They can be either explicitly introduced by means of suitable linguistic primitives or implicitly associated with the different representations of a given situation. Operators. Another choice concerns the operators that the formal system must encompass to deal with the layered structure. In this respect, one must make provision for at least two basic operators: contextualization to select a layer; projection to move across layers. These operators are independent of the specific formalism one can adopt to represent and to reason about time granularity, that is, each formalism must somehow support such operators. They are sufficient for expressing fundamental questions one would like to ask to a granular representation: hal-00922282, version 1 -25 Dec 2013 Most formal systems for time granularity assume layers to be discrete, with the possible exception of the most detailed layer, if any, whose temporal structure can be dense, or even continuous (an exception is [Endriss, 2003]). The reason of this choice is that each dense layer is already at the finest level of granularity, and it allows any degree of precision in measuring time. As a consequence, for dense layers one must distinguish granularity from metric, while, for discrete layers, one can define granularity in terms of set cardinality and assimilate it to a natural notion of metric. Mapping, say, a set of rational numbers into another set of rational numbers would only mean changing the unit of measure with no semantic effect, just in the same way one can decide to describe geometric facts by using, say, kilometers or centimeters. If kilometers are measured by rational numbers, indeed, the same level of precision as with centimeters can be achieved. On the contrary, the key point in time granularity is that saying that something holds for all days in a given interval does not imply that it holds at every second belonging to the interval [Corsetti et al., 1991a] . For the sake of simplicity, in the following we assume each layer to be discrete. Global organization of layers. Further conditions can be added to constrain the global organization of the set of layers. So far, layers have been considered as independent representation spaces. However, we are actually interested in comparing their grains, that is, we want to be able to establish whether the grain of a given layer is finer or coarser than the grain of another one. It is thus natural to define an order relation ≺, called granularity relation, on the set of layers of T based on their grains: we say that a layer T is finer (resp. coarser) than a layer T , denoted by T ≺ T (resp. T ≺ T ), if the grain of T is finer (resp. coarser) than that of T . There exist at least three meaningful cases: partial order ≺ is a reflexive, transitive, and anti-symmetric relation over layers; (semi-)lattice We shall see that the set of admissible operations on layers depends on the structure of ≺. Beside the order relation ≺, one must consider the cardinality of the set T . Even though a finite number of layers suffices for many applications, there exist significant properties that can be expressed only using an infinite number of layers (cf. Section 3.4.2). As an example, an infinite number of arbitrarily fine (discrete) layers makes it possible to express properties related to temporal density, e.g., the fact that two states are distinct, but arbitrarily close. Pairwise organization of layers. Even in the case in which layers are totally ordered, their organization can be made more precise. For instance, consider the case of a situation described with respect to the totally ordered set of granularities including years, months, weeks, and days. The relationships between these layers differ a lot. Such differences can be described through the following notions: homogeneity when the (temporal) entities of the coarser layer consist of the same number of entities of the finer one; alignment when the entities of the finer layer are mapped in only one entity of the coarser one. These two notions allow us to distinguish four different cases: year-month the situation is very neat between years and months since each year contains the same number of months (homogeneity) and each month is mapped onto only one year (alignment); year-week a year contains a various number of weeks (non homogeneity) and a week can be mapped into more than one year (non alignment); month-day while every day is mapped into exactly one month (alignment), the number of days in a month is variable (non homogeneity); working week-day one can easily imagine working weeks beginning at 5 o'clock on Mondays (this kind of weeks exists in industrial plants): while every week is made of the same duration or amount of days (homogeneity), some days are mapped into two weeks (non alignment). How the objects behave. There are several options with regard to the behavior of the objects considered by the theories. The objects can persist when they remain the same across layers (in the logical setting, this is modeled by the Barcan formula); change category when, moving from one layer to another one, they are transformed into objects of different size (e.g., transforming intervals into points, or vice versa, or changing an object into another of a bigger/lower dimension, see Section 3.6.4); vanish when an object associated with a fine layer disappears in a coarser one. Properties of operators The operator that models the change of granularity is the projection operator. It relates the temporal entities of a given layer to the corresponding entities of a finer/coarser layer. In some formal systems, it also models the change of the interpretation context from one layer to another. The projection operator is characterized by a number of distinctive properties, including: reflexivity (see Section 3.5.2 self-conservation p. 105 and Section 3.4.1 p. 85) constrains an entity to be able to be converted into itself; symmetry (see Section 3.5.2 inverse compatibility p. 106 and Section 3.4.1 p. 85) states that if an entity can be converted into another one, then this latter entity can be converted back into the original one; hal-00922282, version 1 -25 Dec 2013 3.2. GENERAL SETTING FOR TIME GRANULARITY 67 order-preservation (for vectorial systems, see Section 3.3 p. 69, Section 3.5.2 p. 105, and Section 3.4.1 p. 86) constrains the projection operators to preserve the order of entities among layers; transitivity (see below) constrains consecutive applications of projection operators in any "direction" to yield the same result as a direct projection; oriented transitivity (see Section 3.5.2 p. 106 and Section 3.4.1 downward transitivity p. 85 and upward transitivity p. 86) constrains successive applications of projection operators in the same "direction" to yield the same result as a direct projection; downward/upward transitivity (see Section 3.4.1 pp. 85-86 and [Euzenat, 1993]) constrains two consecutive applications of the projection operators (first downward, then upward) to yield the same result as a direct downward or upward projection; Some properties of projection operators are related to pairwise properties of layers: contiguity (see Section 3.4.1 p. 86), or "contiguity-preservation", constrains the projections of two contiguous entities to be either two contiguous (sets of) entities or the same entity (set of entities); total covering (see Section 3.3 p. 69 and Section 3.4.1 p. 86) constrains each layer to be totally accessible from any other layer by projection; convexity (see Section 3.4.1 p. 86) constrains the coarse equivalent of an entity belonging to a given layer to cover a convex set of entities of such a layer; synchronization (see Sections 3.3 and 3.4.1), or "origin alignment", constrains the origin of a layer to be projected on the origin of the other layers. It is called synchronization because it is related to "synchronicity" which binds all the layers to the same clock; homogeneity (see Section 3.4.1 p. 86) constrains the temporal entities of a given layer to be projected on the same number of entities of a finer layer; Such properties are satisfied when they are satisfied by all pairs of layers. ); any coarser layer is defined as a suitable partition of this basic layer. To operate on elements belonging to the same layer, the familiar Boolean algebra of subsets suffices. Operations between elements belonging to different layers require a preliminary mapping to a common layer. Such an approach, originally proposed by Clifford and Rao in [Clifford and Rao, 1988] , has been successively refined and generalized by Bettini et al. in a number of papers [Bettini et al., 2000]. In Section 3.3, we shall describe the evolution of the set-theoretic approach to time granularity from its original formulation up to its more recent developments. According to the logical approach, the single temporal domain of (metric) temporal logic is replaced by a temporal universe consisting of a possibly infinite set of inter-related differently-grained layers and logical tools are provided to qualify temporal statements with respect to the temporal universe and to switch temporal statements across layers. Logics for time granularities have been given both non-classical and classical formalizations. In the non-classical setting, they have been obtained by extending metric temporal logics with operators for temporal contextualization and projection [Ciapessoni et al., 1993; Montanari, 1996; Montanari and de Rijke, 1997], as well as by combining linear and branching temporal logics in a suitable way Franceschet and Montanari, 2004] . In the classical one, they have been characterized in terms of (extensions of) the well-known monadic second-order theories of k successors and of their fragments [Montanari and Policriti, 1996; Montanari et al., 1999; . In Section 3.4, we shall present in detail both approaches. The study of granularity in a qualitative context is presented in Section 3.5. It amounts to characterize the variation of relations between temporal entities that are induced by granularity changes. A number of axioms for characterizing granularity conversion operators have been provided in [Euzenat, 1993; Euzenat, 1995a] , which have been later shown to be consistent and independent [Euzenat, 2001] . Granularity operators for the usual algebras of temporal relations have been derived from these axioms. Another approach to characterizing granularity in qualitative relations, associated with a new way of generating systems of relations, has recently come to light [Bittner, 2002] . The relations between two entities are characterized by the relation (in a simpler relation set) between the intersection of the two entities and each of them. Temporal locations of entities are then approximated by subsets of a partition of the temporal domain, so that the relation between the two entities can itself be approximated by the relation holding between their approximated locations. This relation (that corresponds to the original relation under the coarser granularity) is obtained directly by maximizing and minimizing the set of possible relations. Proposition 3.3.1. ∀h, g(g h ⇒ g h ⇒ g ⊆h) It also appears that the shift-equivalence is indeed the congruence relation induced by the subgranularity relation. Proposition 3.3.2. ∀h, g(g ↔ h iff g h and h g) It is an equivalence relation and if we consider the quotient set of granularity modulo shiftequivalence, then but also and define partial orders (and thus partition as well) and ⊆ is still a pre-order.