5.6 Implementing the STAR Model
5.6.3 Explicitly Asserting Derived Facts
There are certain cases in which deriving implicit facts from other existing ones requires performing costly spatial calculations. Therefore these inferences are not suitable to be made at runtime (i.e., query time). For this reason, Progress includes mechanisms for explicitly asserting certain derived facts in the KB, allowing them to be quickly recovered at runtime.
In the current version of the STAR model implementation within Progress, the fol- lowing elements are explicitly asserted in the KB after being inferred from other existing facts.
• Star facts describing spatial extensions of geographic features at particular time
instants. These facts are produced by performing Derivation Rules DR2 or DR6, and then DR4 (presented in Chapter 3).
• Star facts produced by the Derivation Rule DR3 (presented in Chapter 3), which
deals with the principle of inertia.
• Facts describing geographic features and their lives.
Beyond the fact that these elements require significant time to be inferred, they have been chosen to be explicitly asserted in the KB because they can be finitely produced by
9Predicates specified in Prolog are described in the formpredicate name/arity. Therefore,
star/3refers to the predicatestar(A,G,S), whose arity is 3. VariablesA,G, andSdenote, respec-
the derivation rules. Contrastingly, derivation rules which can produce an infinite number of elements are only used in the system to check whether a given hypothesis is true. However, inferences performed by the latter usually requires a small amount of time to be performed.
For instance, since a certain region may contain an infinite number of sub- regions, DR1 is only used in the system to evaluate propositions in which the variable representing the sub-region is instantiated. To illustrate, sup- pose the proposition star(’hot’, ’POLYGON((6 6, 9 6, 9 9, 6 9, 6 6))’,
[’2012-01-01T00:00:00’]) (where ‘hot’ is a homogeneous coverage attribute) is
given to the system and suppose it can derivestar(’hot’, ’POLYGON((2 2, 11 2,
11 9, 2 9, 2 2))’, [’2012-01-01T00:00:00’]), such that the first polygon is
part of the second. Thus, once the latter is derived, the system can prove the given proposi- tion is true considerably quickly by a single execution of DR1. Nevertheless, deriving the latter might require significant amount of time. Hence, if the latter is explicitly asserted in the KB, the whole proof could be quickly completed.
Therefore, by explicitly asserting derived Stars representing extensions of geographic features at particular time instants, the system can efficiently derive Stars via DR5. Then these implicit Stars can be used to derive other Stars via DR1 (also quite efficiently). The reasoning performed by the system is similar for facts describing extensions of simple or compound features. However, facts describing homogeneous regions used to derive extensions of simple features can be removed from the KB after asserting derived facts explicitly. This is possible because the originating facts can be derived back from the new fact. However, the same does not applies to compound features, since it is not possible to infer (from a single fact representing the extension of the feature) the exact extensions of their constituent regions with different types of coverages.
Given the fact that derived Stars representing spatial extensions of geographic features are explicitly asserted in the KB, it should be noted that, according to Axiom 3.18, when the inference is made from the left-hand side to the rigt-hand side (DR5), the Star fact which appears in the body of the rule can also be considered as expressed in the form
A-Star(a, g, s), meaning that the fact is explicitly asserted in the KB.
According to the axioms presented in Chapter 3, it can be noticed that DR3 could derive an infinite number of Stars from an existing Star, since there are an infinite number of time instants within any given interval. However, in Progress, this derivation rule is also used to derive Stars which will be explicitly asserted in the KB. But the system only derives Stars for timestamps already associated with other existing facts. That is, for each existing timestamp in the initial KB, the system applies DR3 to derive new elements by
instantiating the timestamp variable. Once the elements derived by DR3 are explicitly asserted in the KB, the system only uses this rule for evaluating propositions where the timestamp variable is instantiated. Therefore, since the inference mechanism has to con- sider only the last known timestamp before the specified one, these inferences are rapidly performed.
Furthermore, elements derived by DR3 should be asserted in the KB before execut- ing the mechanism for deriving (and then explicitly asserting) spatial extensions of geo- graphic features. To illustrate this need, suppose a Star associated with attribute a and timestamp s2 is derived via DR3 from an existing Star associated with the timestamp s1
(where s1< s2) and with the same attribute a. Then suppose the initial KB contains a Star
fact associated with s2whose geometry is externally connected to the geometry associated
with the derived Star. Therefore, it is clear that these geometries should be considered in conjunction for deriving a Star representing the maximal extension of regions (at s2)
whose coverages are both denoted by attribute a.
Another important aspect of the STAR model implementation is that, in some situa- tions, derived facts which were explicitly asserted in the KB have to be deleted in case additional data are to be input to the system. This is needed when new facts include Stars associated with timestamps within the range of timestamps already known by the system (i.e., new timestamps might either match an existing one or be between other two already presented in the KB). This is specially important due the principle of inertia that is con- sidered here. That is, a new fact may invalidate the assumption that something has not changed between two time instants.