1 Introduction
Reasoning about action and change is crucial for understanding how dynamic systems evolve over time and how actions influence those changes. Representing dynamic systems with higher resolution, such as by employing finer time units and more precise numeric variables, significantly increases the complexity of reasoning about them, posing particular challenges for logic-based approaches like Answer Set Programming (ASP; Lifschitz Reference Lifschitz, Fox and Gomes2008). To illustrate this, consider the following scenario: “A radar is positioned at the 400 km mark on a road with a speed limit of 90 km/h. A car is initially traveling at 80 km/h. At time instant 4, the car accelerates by 11.35 km/h. Subsequently, at time instant 6, it decelerates by 2.301 km/h. The problem is to determine whether the car will exceed the speed limit and thus incur a fine.” A closer look reveals several key numeric entities: the car’s position and speed, the radar’s position and speed limit, and the car’s acceleration and deceleration.
Our objective is to provide the logical foundations for extending ASP to effectively model such scenarios involving changing numeric values over time. To achieve this, we integrate two key logical formalisms that extend ASP: the linear-time logic of Here-and-There (
$\textrm {THT}$
; Aguado et al. Reference Aguado, Cabalar, DiÉguez, PÉrez, Schaub, Schuhmann and Vidal2023), with its ability to handle nonmonotonic temporal reasoning, and the logic of Here-and-There with constraints (
$\textrm {HT}_{\!c}$
; Cabalar et al. Reference Cabalar, Kaminski, Ostrowski, Schaub and Kambhampati2016), which allows us to incorporate and reason about numeric constraints, among others. Building upon standard linear temporal logic,
$\textrm {THT}$
and its nonmonotonic equilibrium extension,
$\textrm {TEL}$
, enable the expression of sophisticated temporal behaviors in dynamic systems through features like inertia and default reasoning.
$\textrm {HT}_{\!c}$
complements this by allowing us to directly reason with numeric and other constraints. Furthermore, its equilibrium extension provides solid logical foundations for tackling nonmonotonic constraint satisfaction problems, elegantly handling situations with incomplete information by using default values. With this motivation established, we now proceed to introduce the combined logical framework.
2 Temporal here-and-there with constraints
The syntax of the logic Temporal Here-and-There with constraints (
$\textrm {THT}_{\!c}$
) relies on a signature
$\langle \mathcal{X},\mathcal{D},\mathcal{A} \rangle$
, akin to constraint satisfaction problems (CSPs; Dechter Reference Dechter2003). Specifically,
$\mathcal{X}$
denotes a set of variables and
$\mathcal{D}$
represents the domain of values, often identified with their corresponding constants. The set
$\mathcal{A}$
comprises temporal constraint atoms (or simply atoms), which are defined over temporal terms.
A temporal term (or simply term) is fundamental to
$\textrm {THT}_{\!c}$
and is intended to represent the value of a variable at past, present, or future time points. We represent such a term by an expression
${\Large \circ }^ix$
where
$x\in \mathcal{X}$
and
$i\in \mathbb{Z}$
, while overloading the temporal modal operator for “next”, viz.
$\Large \circ$
. The integer
$i$
indicates a temporal offset: a positive
$i$
signifies
$i$
steps forward in time to retrieve the value of
$x$
, a negative
$i$
signifies
$|i|$
steps backward, and
$i=0$
refers to the value of
$x$
in the current state. For notational convenience, we use
$x$
and
${\Large \circ } x$
as shorthand for
${\Large \circ }^0x$
and
${\Large \circ }^1x$
, respectively. Furthermore, we overload the operator
${\Large \bullet }$
for “previous” to represent past variable values. That is,
${{\Large \bullet }}^ix$
stands for
${\Large \circ }^{-i}x$
for offset
$i$
. For example, the constraint
${\Large \circ } x + {{\Large \bullet }} y \le z$
is equivalent to
${\Large \circ }^1 x + {\Large \circ }^{-1} y \le {\Large \circ }^0 z$
.
Accordingly, an
$n$
-ary temporal constraint atom
$c\in \mathcal{A}$
is often represented as
$ c({\Large \circ }^{o_1} x_1, \dots , {\Large \circ }^{o_n} x_n)$
where
${\Large \circ }^{o_1} x_1, \dots , {\Large \circ }^{o_n} x_n$
are (possibly identical) temporal terms. To further illustrate, the atom
$({{\Large \bullet }}^3 x = 4)$
can be read as “
$x$
had value 4 three states ago”, and
$({\Large \circ } x = x)$
as “the value of
$x$
in the next state is identical to its current value”.
Then, temporal constraint formulas (or just formulas) are defined as follows:

Connectives
$\bot$
,
$\wedge$
,
$\vee$
and
$\to$
are Boolean, while the remaining connectives are temporal modalities. We use outlined operators to refer to future modalities and solid ones for past modalities. Accordingly,
$\Large \circ$
,
represent the future modalities next, until, release, respectively, while
${\Large \bullet }$
,
$\mathbin {\boldsymbol{\mathsf{S}}}$
,
$\mathbin {\boldsymbol{\mathsf{T}}}$
reflect their past counterparts: previous, since, trigger.
We also define several derived operators, including the Boolean connectives
$ \top \stackrel {\mathit{def}}{=} \neg \bot$
,
$ \neg \varphi \stackrel {\mathit{def}}{=} \varphi \to \bot$
,
$ \varphi \leftrightarrow \psi \stackrel {\mathit{def}}{=} (\varphi \to \psi ) \wedge (\psi \to \varphi )$
, and the following temporal operators:

Specifically,
$\boldsymbol{\mathsf{I}}$
and
refer to the “initial” and “final” state, respectively;
${\widehat {{{\Large \bullet }}}} \varphi$
(
${\widehat {{\Large \bullet }}}\varphi$
) refers to
$\varphi$
at the previous (next) state in case that it exists;
${\blacksquare } \varphi$
(
${\square } \varphi$
) is read as “
$\varphi$
has always been true” (“
$\varphi$
will always be true”), and
${\blacklozenge } \varphi$
(
${\Diamond } \varphi$
) is read as “
$\varphi$
has been true” (“
$\varphi$
will eventually be true”). For instance,
${\square }({\Large \circ } x \gt x)$
allows us to express informally that “the value of variable
$x$
is increasing over time”.
We define the semantics of
$\textrm {THT}_{\!c}$
in terms of
$\textrm {HT}_{\!c}$
traces, which are sequences of
$\textrm {HT}_{\!c}$
interpretations (Cabalar et al. Reference Cabalar, Kaminski, Ostrowski, Schaub and Kambhampati2016). We first present the necessary semantic concepts of
$\textrm {HT}_{\!c}$
before further elaborating on these traces.
$\textrm {HT}_{\!c}$
relies on partial valuations, that is, functions
$v : \mathcal{X} \to \mathcal{D} \cup \{ u \}$
, where the range is augmented by the special value
${u} \not \in \mathcal{D}$
representing “undefined”. We define
$\mathcal{D}_{{u}}\stackrel {\mathit{def}}{=} \mathcal{D} \cup \{ {u}\}$
and denote such valuations also by
$v : \mathcal{X} \to \mathcal{D}_{{u}}$
. Given two partial valuations
$v$
and
$v'$
, we define
$v \sqsubseteq v'$
if
$v(x) = d$
implies
$v'(x) = d$
for all
$x\in \mathcal{X}$
and
$d \in \mathcal{D}$
. Similarly, we say that
$v = v'$
if
$v \sqsubseteq v'$
and
$v'\sqsubseteq v$
, and
$v \sqsubset v'$
if
$v \sqsubseteq v'$
and
$v\neq v'$
. An
$\textrm {HT}_{\!c}$
interpretation is a pair
$\langle v_h, v_t \rangle$
of valuations such that
$v_h \sqsubseteq v_t$
.
Building upon this, we define a trace
$\boldsymbol{v}$
of length
$\lambda$
as a sequence
$\boldsymbol{v}=(v_i)_{i \in [0..\lambda )}$
of partial valuations
$v_i$
for
$i \in [0..\lambda )$
. For instance, the sequence
$ \boldsymbol{v}'= \left \{ x \mapsto 4 \right \} \cdot \left \{ x \mapsto u \right \} \cdot \left \{ x \mapsto 5 \right \}$
represents a finite trace with three valuations (separated by "
$\cdot$
") that assign different values to
$x$
except at the second state where
$x$
is undefined. The
$\sqsubseteq$
relation can be extended to cope with traces in the following way: given two traces
${\boldsymbol{v}_h} = (v_{h,i})_{{i \in {[0..\lambda )}}}$
and
$\boldsymbol{v}_t = (v_{t,i})_{{i \in {[0..\lambda )}}}$
of length
$\lambda$
, we define
${\boldsymbol{v}_h} \sqsubseteq \boldsymbol{v}_t$
if
$v_{h,i} \sqsubseteq v_{t,i}$
for all
$i \in {[0..\lambda )}$
. For instance, our previous example trace
$\boldsymbol{v}'$
satisfies
$\boldsymbol{v}' \sqsubseteq \left \{ x \mapsto 4 \right \} \cdot \left \{ x \mapsto 1 \right \} \cdot \left \{ x \mapsto 5 \right \}$
because both traces coincide in the variables defined in
$\boldsymbol{v}'$
, but the new trace assigns
$x \mapsto 1$
at the second state, while
$\boldsymbol{v}'$
left it undefined. As before, we say
${\boldsymbol{v}_h} = \boldsymbol{v}_t$
if
$v_{h,i} = v_{t,i}$
for all
$i \in {[0..\lambda )}$
and
${\boldsymbol{v}_h} \sqsubset \boldsymbol{v}_t$
if
${\boldsymbol{v}_h} \sqsubseteq \boldsymbol{v}_t$
and
${\boldsymbol{v}_h} \not = \boldsymbol{v}_t$
. All this allows us to define an
$h{\textrm {HT}_{\!c}}\ trace$
of length
$\lambda$
as a pair
$\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle$
of traces
$\boldsymbol{v}_h$
and
$\boldsymbol{v}_t$
of length
$\lambda$
such that
${\boldsymbol{v}_h} \sqsubseteq \boldsymbol{v}_t$
.
$\textrm {HT}_{\!c}$
evaluates constraint atoms using denotations, a mechanism that abstracts from the syntax and semantics of expressions originating from external theories. In
$\textrm {HT}_{\!c}$
, a valuation can be seen as a solution of a constraint. For instance the denotation
$[\![ x+y \le 5 ]\!]$
contains all valuations
$v$
such that
$v(x) + v(y) \le 5$
. Also, the satisfaction of a constraint atom corresponds in
$\textrm {HT}_{\!c}$
to checking whether a valuation belongs to a denotation or not. In
$\textrm {THT}_{\!c}$
, however, time-varying variables are handled. For instance the constraint
$x + {\Large \circ }^5 x \le 5$
is satisfied at time point
$t$
when the addition of the values of
$x$
at
$t$
and
$t+2$
is smaller or equal to
$5$
. In the temporal case, evaluating a temporal constraint atom requires the use of a finite number of valuations, for which we would need a more complex denotational approach. Therefore, we adopt a simpler approach, associating each constraint atom with a relation, where each tuple signifies a valid value assignment, as is standard in CSPs: Given a temporal constraint atom
$c$
of arity
$n$
, we define its solution relation as
$[c]\subseteq \mathcal{D}_{u}^n$
. Note that this definition tolerates undefined variables. Given a constraint atom
$c$
of arity
$n$
,
$[c]$
is said to be strict whenever
$[c] \subseteq \mathcal{D}^n$
, that is, if it leaves no variables undefined. Otherwise, we say that
$[c]$
is non-strict.
For instance, to satisfy the atom
$x + {\Large \circ }^5 x \le 5$
neither term
$x$
nor
${\Large \circ }^5 x$
can be undefined. A natural choice for its (strict) solution relation is thus

As an example of an atom with a non-strict solution, we could define an atom such as
$\mathit{some\_zero}({{\Large \bullet }} x, x, {\Large \circ } x)$
requiring that
$x$
equals zero at the previous, current, or next state, but allowing for
$x$
to be undefined in some of those states:

Given a trace
$\boldsymbol{v}=(v_i)_{i \in [0..\lambda )}$
of length
$\lambda$
, the value of a term
${\Large \circ }^ox$
at time point
$i \in [0..\lambda )$
is defined as

Given an
$\textrm {HT}_{\!c}$
trace
$\mathbf{M}= \langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle$
and a time point
$i \in [0..\lambda )$
, we define the satisfaction of a formula in
$\textrm {THT}_{\!c}$
as follows:
-
1.
$\mathbf{M},i\models c({\Large \circ }^{o_1}x_1,\dots ,{\Large \circ }^{o_n}x_n)$ if for all
$w \in \{ h,t\}$
$(v_{w,i}({\Large \circ }^{o_1} x_1),\dots ,v_{w,i}({\Large \circ }^{o_n} x_n))\in [c({\Large \circ }^{o_1}x_1,\dots ,{\Large \circ }^{o_n}x_n)]$
-
2.
$\mathbf{M},i\models \varphi \wedge \psi$ if
$\mathbf{M},i\models \varphi$ and
$\mathbf{M},i\models \psi$
-
3.
$\mathbf{M},i\models \varphi \vee \psi$ if
$\mathbf{M},i\models \varphi$ or
$\mathbf{M},i\models \psi$
-
4.
$\mathbf{M},i\models \varphi \to \psi$ if
${\langle \boldsymbol{v}_w,\boldsymbol{v}_t \rangle },i\not \models \varphi$ or
${\langle \boldsymbol{v}_w,\boldsymbol{v}_t \rangle },i\models \psi$ for all
$w \in \{ h,t\}$
-
5.
$\mathbf{M},i\models {\Large \circ }\varphi$ if
$i\lt \lambda -1$ and
$\mathbf{M} , i +1 \models \varphi$
-
6.
$\mathbf{M},i\models \varphi$
$\psi$ if there exists
$k \in [i..\lambda )$ s.t.
$\mathbf{M} , k \models \psi$ and
$\mathbf{M} , j \models \varphi$ for all
$i \le j \lt k$
-
7.
$\mathbf{M},i\models \varphi$
$\psi$ if for all
$k \in [i..\lambda )$ , either
$\textbf {M} , k \models \psi$ or
$\mathbf{M} , j \models \varphi$ for some
$i \le j \lt k$
-
8.
$\mathbf{M},i\models {{\Large \bullet }} \varphi$ if
$i\gt 0$ and
$\mathbf{M} , i -1 \models \varphi$
-
9.
$\mathbf{M},i\models \varphi \mathbin {\boldsymbol{\mathsf{S}}} \psi$ if there exists
$k \in [0..i]$ s.t.
$\mathbf{M} , k \models \psi$ and
$\mathbf{M} , j \models \varphi$ for all
$k \lt j \le i$
-
10.
$\mathbf{M},i\models \varphi \mathbin {\boldsymbol{\mathsf{T}}} \psi$ if for all
$k \in [0..i]$ , either
$\textbf {M} , k \models \psi$ or
$\mathbf{M} , j \models \varphi$ for some
$k \lt j \le i$
In fact, given a constraint atom
$c$
with a strict relation
$[c]$
, the satisfaction of
$c$
depends solely on the “here” component of the trace (Cabalar et al. Reference Cabalar, Kaminski, Ostrowski, Schaub and Kambhampati2016). In this case, Condition 1 can be replaced by:
-
1’
$\mathbf{M},i\models c({\Large \circ }^{o_1}x_1,\dots ,{\Large \circ }^{o_n}x_n)$ if
$(v_{h,i}({\Large \circ }^{o_1} x_1), \dots , v_{h,i}({\Large \circ }^{o_n} x_n))\in [c({\Large \circ }^{o_1}x_1,\dots ,{\Large \circ }^{o_n}x_n)]$ .
Proposition 1.
Given an
$\textrm {HT}_{\!c}$
trace
$\mathbf{M}= \langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle$
and a time point
$i \in [0..\lambda )$
, we have the following satisfaction relations for the derived operators:
-
1.
$\mathbf{M},i\models \blacksquare \varphi$ if for all
$j \in (0..i]$ ,
$\mathbf{M}, j \models \varphi$
-
2.
$\mathbf{M},i\models \blacklozenge \varphi$ if there exists
$j \in (0..i]$ such that
$\mathbf{M}, j \models \varphi$
-
3.
$\mathbf{M},i\models \boldsymbol{\mathsf{I}}$ if
$i=0$
-
4.
$\mathbf{M},i\models \widehat {{\Large \bullet }} \varphi$ if either
$i = 0$ or
$\mathbf{M}, i-1 \models \varphi$
-
5.
$\mathbf{M},i\models \square \varphi$ if for all
$j \in [i..\lambda )$ ,
$\mathbf{M}, j \models \varphi$
-
6.
$\mathbf{M},i\models \Diamond \varphi$ if there exists
$j \in [i..\lambda )$ such that
$\mathbf{M}, j \models \varphi$
-
7.
if
$i = \lambda -1$
-
8.
$\mathbf{M},i\models \widehat {{\Large \circ }} \varphi$ if either
$i = \lambda -1$ or
$\mathbf{M}, i+1\models \varphi$
For illustration, consider the short
$\textrm {HT}_{\!c}$
trace
$\langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle$
where

As a first example, consider the formula
$(x=4) \wedge ({\Large \circ } x \lt {\Large \circ }^3y)$
whose atoms have the solution relations
$[x=4] = \{(4) \}$
and
$[{\Large \circ } x \lt {\Large \circ }^3 y] = \{ (a,b) \in \mathbb{Z}^2 \mid a \lt b\}$
. Note that each solution relation above contains only the assignments that satisfy the constraint and they do not depend on the “next”
${\Large \circ }^k$
prefix that qualifies each variable inside a constraint. Broadly speaking, a solution for
$({\Large \circ } x \lt {\Large \circ }^3y)$
consists of two assignments, one for
$x$
and one for
$y$
that satisfy the constraint. The effect of using the term
${\Large \circ }^3 y$
is that the value for
$y$
is given by the valuation placed three states ahead in the trace, that is, the valuation of
${\Large \circ }^3 y$
depends on the sequence of valuations in the trace. Moreover, both
$[x=4]$
and
$[{\Large \circ } x \lt {\Large \circ }^3 y]$
are strict, so we can use Condition 1’ to evaluate the constraint atoms. We have therefore
${\langle {\boldsymbol{v}_h}, \boldsymbol{v}_t \rangle }, 0 \models (x=4)$
. Also, we have
${\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle },0 \models ({\Large \circ } x \lt {\Large \circ }^3 y)$
since
$v_{h,3}(y) = 6$
,
$v_{h,1}(x) = 5$
and
$(5,6) \in [{\Large \circ } x \lt {\Large \circ }^3 y]$
. Therefore,
${\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle }, 0 \models (x=4)\wedge ({\Large \circ } x \lt y)$
.
Next, consider the formula
$({{\Large \bullet }} x \lt 7)$
along withFootnote
1
$[{{\Large \bullet }} x \lt 7] = \{ a \in \mathbb{Z} \mid a \lt 7\}$
. Since there is no time point before the initial state, we get
$v_{h,0}({{\Large \bullet }} x) = {u}$
. Hence,
${\langle {\boldsymbol{v}_h}, \boldsymbol{v}_t \rangle }, 0 \not \models {{\Large \bullet }} x\lt 7$
because
${u}\notin [{{\Large \bullet }} x \lt 7]$
. However, if the constraint is evaluated at time point
$1$
, we get
${\langle {\boldsymbol{v}_h}, \boldsymbol{v}_t \rangle }, 1 \models {{\Large \bullet }} x\lt 7$
as
$v_{h,1}({{\Large \bullet }} x)=4$
and
$4\in [{{\Large \bullet }} x \lt 7]$
.
Finally, consider the equation
$y = y$
with
$[y = y] = \mathbb{Z}$
. Clearly, we have
${\langle {\boldsymbol{v}_h}, \boldsymbol{v}_t \rangle }, 3 \models y=y$
since
$v_{h,3}(y)=6$
and
$6 \in [y = y]$
. However, this is not the case at time point
$0$
because
$v_{h,0}(y)={u}$
and
${u}\notin [y = y]$
.
Next, we show that
$\textrm {THT}_{\!c}$
satisfies the characteristic properties of
$\textrm {HT}$
-based logics.
Proposition 2 (Persistence, Negation). For all
$\textrm {HT}_{\!c}$
traces
$\langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle$
of length
$\lambda$
, all formulas
$\varphi$
, and all
$i \in [0..\lambda )$
we have:
-
${\langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle }, i \models \varphi$ implies
${\langle \boldsymbol{v}_t,\boldsymbol{v}_t \rangle },i \models \varphi$ .
-
${\langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle }, i \models \neg \varphi$ if
${\langle \boldsymbol{v}_t,\boldsymbol{v}_t \rangle }, i \not \models \varphi$ .
Finally, temporal equilibrium models are defined in the traditional way.
Definition 1.
An
$\textrm {HT}_{\!c}$
trace
$\langle \boldsymbol{v}_t,\boldsymbol{v}_t \rangle$
of length
$\lambda$
is a temporal equilibrium model of a formula
$\varphi$
if
-
1.
${\langle \boldsymbol{v}_t,\boldsymbol{v}_t \rangle }, 0 \models \varphi$ and
-
2. there is no
$\textrm {HT}_{\!c}$ trace
$\langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle$ such that
${\boldsymbol{v}_h}\sqsubset \boldsymbol{v}_t$ and
${\langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle }, 0 \models \varphi$ .
Given that equilibrium models are the semantic counterpart of stable models in ASP, we may thus refer to
$\boldsymbol{v}_t$
as a stable model of
$\varphi$
in
$\textrm {THT}_{\!c}$
.
2.1
$\textrm {THT}_{\!c}$
as a conservative extension of
$\textrm {HT}_{\!c}$
$\textrm {THT}_{\!c}$
can be viewed as a temporal extension of
$\textrm {HT}_{\!c}$
(Cabalar et al. Reference Cabalar, Kaminski, Ostrowski, Schaub and Kambhampati2016). We support this in what follows by showing that both coincide on non-temporal formulas.
To achieve this, we need to establish a correspondence between the semantic concepts of denotations and solution relations. Given a signature
$\langle \mathcal{X},\mathcal{D},\mathcal{A} \rangle$
, let
$\mathcal{V}$
be the set of all partial valuations from
$\mathcal{X}$
to
$\mathcal{D}_{u}$
. A denotation is a function
$[\![ \cdot ]\!]: \mathcal{A} \to 2^{\mathcal{V}}$
assigning a set of partial valuations to each atom. In
$\textrm {HT}_{\!c}$
, one considers denotations with a closed range: if a partial valuation
$v$
satisfies an atom
$c$
,
$v\in [\![ c ]\!]$
, then any partial valuation
$v'$
that extends
$v$
,
$v \sqsubseteq v'$
, also satisfies
$c$
.

For a (non-temporal) constraint
$c(x_1,\cdots ,x_n)$
in
$\mathcal{A}$
, only referring to variable values in the current state, we define

Given this correspondence, we can show the following result, where
$\models _{\scriptscriptstyle \textrm {HT}_{\!c}}$
and
$\models _{\scriptscriptstyle \textrm {THT}_{\!c}}$
denote the satisfaction relation of
$\textrm {HT}_{\!c}$
(Cabalar et al. Reference Cabalar, Kaminski, Ostrowski, Schaub and Kambhampati2016) and
$\textrm {THT}_{\!c}$
(as given above).
Proposition 3.
For all formulas
$\varphi$
containing only Boolean connectives and all
$\textrm {HT}_{\!c}$
interpretations
$\langle v_h, v_t \rangle$
, we have
${\langle v_h, v_t \rangle } {\models _{\scriptscriptstyle \textrm {HT}_{\!c}}} \varphi$
if
$(\langle v_h, v_t \rangle ),0 \models _{\scriptscriptstyle \textrm {THT}_{\!c}} \varphi$
.
Since
$\textrm {HT}_{\!c}$
interpretations are simply
$\textrm {HT}_{\!c}$
traces of length 1, it follows that
$\textrm {HT}_{\!c}$
and
$\textrm {THT}_{\!c}$
coincide when restricted to the language of
$\textrm {HT}_{\!c}$
.
2.2
$\textrm {THT}_{\!c}$
as a conservative extension of
$\textrm {THT}_{\!f}$
$\textrm {THT}_{\!c}$
extends
$\textrm {THT}_{\!f}$
(Aguado et al. Reference Aguado, Cabalar, DiÉguez, PÉrez, Schaub, Schuhmann and Vidal2023) by including constraints. Similar to the previous section, we confirm this relationship by showing that they coincide on temporal formulas without non-Boolean constraints. To proceed, we first need to introduce basic concepts of
$\textrm {THT}_{\!f}$
.
$\textrm {THT}_{\!f}$
employs the same syntax for temporal formulas as
$\textrm {THT}_{\!c}$
, with the key distinction that constraint atoms are replaced by Boolean atoms in
$\mathcal{A}$
. The semantics of
$\textrm {THT}_{\!f}$
relies on
$\textrm {HT}$
traces. An underlying (Boolean) trace of length
$\lambda$
is a sequence
$(T_i)_{i \in [0..\lambda )}$
where
$T_i\subseteq \mathcal{A}$
for all
$i \in [0..\lambda )$
. An
$\textrm {HT}$
trace
$\langle \mathbf{H}, \mathbf{T} \rangle$
is a pair of traces
${\mathbf{H}} = (H_i)_{ i \in [0..\lambda )}$
and
${\mathbf{T}} = (T_i)_{{i \in {[0..\lambda )}}}$
satisfying
$H_i\subseteq T_i$
for all
$i \in [0..\lambda )$
. An
$\textrm {HT}$
trace
$\langle \mathbf{H}, \mathbf{T} \rangle$
satisfies a Boolean atom
$p \in \mathcal{A}$
at
$i \in [0..\lambda )$
if
$p \in H_i$
. The satisfaction conditions for more complex formulas are identical to those of
$\textrm {THT}_{\!c}$
.
To encode
$\textrm {THT}_{\!f}$
within
$\textrm {THT}_{\!c}$
, we consider the signature
$\langle \mathcal{A} ,\{\mathtt {t}\}, \lbrace p = \mathtt {t}\mid p \in \mathcal{A} \rbrace \rangle$
, where
$\mathtt {t}$
is considered as true.Footnote
2
Accordingly, we set
$[p=\mathtt {t}] = \{ \mathtt {t}\}$
for all
$p\in \mathcal{A}$
. Then, we define the bijective mapping
$\delta$
from
${\textrm {HT}}{}$
traces to
$\textrm {HT}_{\!c}$
traces as follows.Footnote
3
Given an
$\textrm {HT}$
trace
${\langle \mathbf{H}, \mathbf{T} \rangle } = \langle (H_i)_{i \in [0..\lambda )},(T_i)_{i \in [0..\lambda )} \rangle$
of length
$\lambda$
, we define the corresponding
$\textrm {HT}_{\!c}$
trace
$\delta (\langle \mathbf{H}, \mathbf{T} \rangle = \langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle$
of length
$\lambda$
where for all
$i \in [0..\lambda )$
and for all
$p \in \mathcal{A}$
, we have

Then, the following proposition can be easily proved via structural induction.
Proposition 4.
For any
$\textrm {HT}$
trace
$\langle {\mathbf{H}},{\mathbf{T}} \rangle$
, we have for all temporal formulas
$\varphi$
and all
$i \in {[0..\lambda )}$
that
${\langle {\mathbf{H}},{\mathbf{T}} \rangle },i \models \varphi$
if
$\delta ({\langle {\mathbf{H}},{\mathbf{T}} \rangle }),i \models \varphi '$
, where
$\varphi '$
is obtained from
$\varphi$
by replacing every atom
$p$
by the constraint
$p=\mathtt {t}$
.
Proposition4 can be extended to the case of equilibrium models.
Proposition 5.
For any
$\textrm {HT}$
trace
$\langle {\mathbf{H}},{\mathbf{T}} \rangle$
and for any formula
$\varphi$
,
$\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle$
is a temporal equilibrium model of
$\varphi$
if
$\delta ({\langle {\mathbf{H}},{\mathbf{T}} \rangle })$
is a temporal equilibrium model (under
$\textrm {THT}_{\!c}$
semantics) of
$\varphi$
.
3 From
$\textrm {THT}_{\!c}$
to quantified
$\textrm {HT}$
with evaluable functions
Kamp’s translation (1968) is a cornerstone result that provides a fundamental link between temporal and classical logic, offering deep theoretical insights and practical implications for the study and application of temporal reasoning.
As a step towards a similar result in our non-classical context, we define a translation from
$\textrm {THT}_{\!c}$
into QuantifiedFootnote
4
$\textrm {HT}$
with decidable equality, evaluable functions (Cabalar Reference Cabalar2011), and an order relation. We consider a first-order language with signature
$\langle \mathcal{C},\mathcal{F},\mathcal{P} \rangle$
, where
$\mathcal{C}$
and
$\mathcal{F}$
are disjoint sets of uninterpreted and evaluable function names, respectively, and
$\mathcal{P}$
is a set of predicate names including equality (
$=$
) and a strict order relation
$\lt$
(the non-strict version
$\leq$
is defined as usual). We assume that
${u}\notin \mathcal{C}\cup \mathcal{F}$
and
$+\in \mathcal{F}$
. First-order formulas are built in the usual way, defining
$\top$
,
$\neg$
,
$\leftrightarrow$
as above.
The difference of our translation to Kamp’s original one lies in the fact that our predicate names are not monadic and that we allow (partial) function symbols for simulating the valuation of a variable along time.
Given a temporal formula
$\varphi$
in
$\textrm {THT}_{\!c}$
, we define the first-order formula
$\tau _{t}(\varphi )$
with the only free variable
$t$
as follows. For constraint atoms, our translation is defined as

where
$p_c$
is a predicate that simulates the behavior of
$c$
and each
$f_{x_i}\in \mathcal{F}$
is a partial evaluable function associated with the variable
$x_i$
for
$1\leq i\leq n$
. The value of a variable
$x$
at a time point
$t$
is given by
$f_x(t)$
. To capture the temporal offset
$i$
in
${\Large \circ }^ix$
, we shift the argument of
$f_x$
, resulting in
$f_x(t+i)$
. Note that
$f_x$
is partial because its argument might extend beyond the defined time points in a trace.
The rest of the translation follows the one by Kamp (Reference Kamp1968):

The translation of derived operators can be done unfolding their definitions or using the shorter, equivalent formulas:

As an example, let us consider the formula
${\square }\blacklozenge ( {\Large \circ }^2 x= x)$
and the free variable
$t$
. The result
$\tau _{t}(\square \blacklozenge \left ( {\Large \circ }^2 x= x \right ))$
of translating this formula is as follows:

In our non-classical framework, the interpretation of first-order formulas requires Quantified
$\textrm {HT}$
Logic with evaluable functions (Cabalar Reference Cabalar2011). In preparation for establishing the correctness of our translation in Proposition6, we proceed to introduce the semantics of this logic. Given signature
$\langle \mathcal{C},\mathcal{F}, \mathcal{P} \rangle$
, we define:
-
•
$\mathcal{T}(\mathcal{C})$ as the set of all ground terms over
$\mathcal{C}$ ,
-
•
$\mathcal{T}(\mathcal{C} \cup \mathcal{F})$ as the set of all ground terms over
$\mathcal{C}$ and
$\mathcal{F}$ ,
-
•
$\mathcal{A}(\mathcal{C},\mathcal{P})$ as the set of all ground atoms over
$\mathcal{C}$ and
$\mathcal{P}$ .
A state over
$\langle \mathcal{C},\mathcal{F},\mathcal{P} \rangle$
is a pair
$(\sigma ,A)$
, where
$A \subseteq \mathcal{A}(\mathcal{C}, \mathcal{P})$
and
$\sigma : \mathcal{T}(\mathcal{C} \cup \mathcal{F}) \rightarrow \mathcal{T}(\mathcal{C}) \cup \{ {u} \}$
is a function such that
-
1.
$\sigma (s) = s$ for all
$s \in \mathcal{T}(\mathcal{C})$
-
2.
$\sigma (f(s_1,\dots ,s_n))= {\begin{cases} {u} & \text{ if } \sigma (s_i) = {u} \text{ for some } i\in \{1,\dots ,n\} \\ \sigma (f(\sigma (s_1),\dots ,\sigma (s_n))) & \text{ otherwise} \end{cases}}$
Given two states
$S=(\sigma ,A)$
and
$S'=(\sigma ',A')$
, we write
$S \preceq S'$
when both
-
1.
$A\subseteq A'$ and
-
2.
$\sigma (s) = \sigma '(s)$ or
$\sigma (s) = u$ for all
$s \in \mathcal{T}(\mathcal{C}\cup \mathcal{F})$ .
We also write
$S \prec S'$
when
$S \preceq S'$
but
$S\not = S'$
.
Following Cabalar (Reference Cabalar2011), a
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
interpretation is a structure
$\langle S_h,S_t \rangle$
, where
$S_h = (\sigma _h,I_h)$
and
$S_t = (\sigma _t, I_t)$
such that
$S_h \preceq S_t$
. Given a first-order formula
$\varphi$
and a
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
interpretation
$\mathcal{M}= \langle S_h,S_t \rangle$
, we define the satisfaction relation as follows:
-
1.
$\mathcal{M} \models \top$ and
$\mathcal{M} \not \models \bot$
-
2.
$\mathcal{M} \models p(s_1,\dots ,s_n)$ if
$p(\sigma _h(s_1),\dots ,\sigma _h(s_n)) \in I_h$
-
3.
$\mathcal{M} \models s=s'$ if
$ \sigma _h(s) = \sigma _h(s')\not = u$
-
4.
$\mathcal{M} \models s \lt s'$ if
${u} \not = \sigma _h(s) \lt \sigma _h(s')\not = u$
-
5.
$\mathcal{M} \models \varphi \wedge \psi$ if
$\mathcal{M} \models \varphi \text{ and } \mathcal{M} \models \psi$
-
6.
$\mathcal{M} \models \varphi \vee \psi$ if
$\mathcal{M} \models \varphi \text{ or } \mathcal{M} \models \psi$
-
7.
$\mathcal{M} \models \varphi \to \psi$ if
$\mathcal{M}' \not \models \varphi$ or
$\mathcal{M}' \models \psi$ for all
$\mathcal{M}'\in \{\mathcal{M}, (S_t,S_t)\}$
-
8.
$\mathcal{M} \models \exists \, x\ \varphi (x)$ if
$\mathcal{M} \models \varphi (c)$ for some
$c \in \mathcal{T}(\mathcal{C})$
-
9.
$\mathcal{M} \models \forall \, x\ \varphi (x)$ if
$\mathcal{M} \models \varphi (c)$ for all
$c\in \mathcal{T}(\mathcal{C})$ .
A
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
interpretation
$\mathcal{M}$
is a
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
model of a formula
$\varphi$
when
$\mathcal{M} \models \varphi$
. A
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
model
$\langle S_t,S_t \rangle$
is an equilibrium model for a formula
$\varphi$
, if there is no state
$S_h$
such that
$S_h \prec S_t$
and
$\langle S_h, S_t \rangle$
is a
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
model of
$\varphi$
.
We are now ready to define the model correspondence between
$\textrm {HT}_{\!c}$
traces and
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
interpretations. An
$\textrm {HT}_{\!c}$
trace
$\mathbf{M}= \langle \boldsymbol{v}_h,\boldsymbol{v}_t \rangle$
of length
$\lambda$
for signature
$\langle \mathcal{X},\mathcal{D},\mathcal{A} \rangle$
corresponds to a
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
interpretation
$\mathcal{M}= \langle (\sigma _h,I_h),(\sigma _t,I_t) \rangle$
if for each
$i \in [0..\lambda )$
and for each variable
$x \in \mathcal{X}$
, we get
$\sigma _{h} (f_{x}(i)) = v_{h,i}(x)$
,
$\sigma _{t} (f_{x}(i)) = v_{t,i}(x)$
,

where
$[c({\Large \circ }^{o_1}x_1,\dots , {\Large \circ }^{o_n}x_n)]$
is strict.
This model correspondence allows us to translate
$\textrm {THT}_{\!c}$
into
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
. We let
$\varphi [t/i]$
stand for the result of replacing each occurrence of variable
$t$
in
$\varphi$
by
$i$
.
Proposition 6.
Let
$\mathbf{M} = {\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle }$
be a
$\textrm {HT}_{\!c}$
trace and let
$\mathcal{M} = {\langle (\sigma _h,I_h),(\sigma _t,I_t) \rangle }$
be its corresponding
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
interpretation. For all
$i \in {[0..\lambda )}$
and every temporal formula
$\varphi$
, we have
$\mathbf{M}, i \models \varphi$
if
$\mathcal{M} \models \tau _{t}(\varphi )[t/i]$
.
In other words, we can consider
$\textrm {THT}_{\!c}$
as a subclass of theories in the fragment of
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
with partial evaluable functions. We show next that this correspondence is still valid when considering equilibrium models.
Proposition 7.
Let
$\mathbf{M} = {\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle }$
be a
$\textrm {HT}_{\!c}$
trace and let
$\mathcal{M} = {\langle (\sigma _h,I_h),(\sigma _t,I_t) \rangle }$
be its corresponding
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
interpretation. For every temporal formula
$\varphi$
,
$\mathbf{M}$
is an equilibrium model of
$\varphi$
if
$\mathcal{M}$
is an equilibrium model of
$\tau _{t}(\varphi )[t/0]$
.
An important consequence of our translation is that it opens the possibility of applying first-order theorem provers for solving inference problems for
$\textrm {THT}_{\!c}$
. For instance, one salient
$\textrm {THT}_{\!c}$
inference problem is deciding
$\textrm {THT}_{\!c}$
-equivalence of two temporal theories with constraints,
$\Gamma _1$
and
$\Gamma _2$
, since it is a sufficient condition for their strong equivalence (Lifschitz et al. Reference Lifschitz, Pearce, Valverde, Baral, Brewka and Schlipf2007), something that guarantees a safe replacement of
$\Gamma _1$
by
$\Gamma _2$
(or vise versa) in any arbitrary context. The translation of the
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
-formula obtained from
$\tau _{t}(\cdot )$
into classical First-Order Logic can be done in two steps: first removing the partial functions in favor of predicates (Cabalar Reference Cabalar2011), and second passing from quantified
$\textrm {HT}$
(without partial functions) into first-order classical logic (Pearce Reference Pearce2006).
4 Logic programs with temporal linear constraints
In this section, we consider the fragment of
$\textrm {THT}_{\!c}$
interpreted over linear constraints whose solution table is strict. We define a linear term as an expression of the form

where
$d_i \in \mathbb{Z}$
,
$x_i \in \mathcal{X}$
, and
$o_i\in \mathbb{Z}$
for
$0\leq i\leq n$
. Multiplication and addition are denoted by “
$\cdot$
” and “
$+$
,”, respectively. An implicit multiplicative factor of 1 is assumed for standalone numbers
$d_i$
. Negative constants are represented using “
$-$
,”, and the “
$\cdot$
” symbol may be omitted when contextually clear. Given a linear term
$\alpha$
as in (1), we define
$ {\mathit{terms}}(\alpha )=\{{\Large \circ }^{o_i} x_i\mid 0\leq i\leq n\}$
. For instance,
${\mathit{terms}}(2 \cdot {\Large \circ }^{-2} x) = \{ {\Large \circ }^{-2} x\} = \{ {{\Large \bullet }} {{\Large \bullet }} x\}$
.
A linear temporal constraint atom is a temporal constraint atom of the form
$\alpha \le \beta$
, where
$\alpha$
and
$\beta$
are linear terms. We use the abbreviation
$\alpha = \beta$
,
$\alpha \lt \beta$
, and
$\alpha \neq \beta$
for
$(\alpha \le \beta ) \wedge (\beta \le \alpha )$
,
$(\alpha \le \beta ) \wedge \neg (\beta \le \alpha )$
, and
$(\alpha \lt \beta ) \vee (\beta \lt \alpha )$
, respectively. Similarly,
${\mathit{terms}}(\alpha \otimes \beta )= {\mathit{terms}}(\alpha ) \cup {\mathit{terms}}(\beta )$
, for
$\otimes \in \lbrace \le , \lt , =, \neq \rbrace$
. Given our focus on strict solution tables, we have
$ [\alpha \le \beta ] \subseteq \mathcal{D}^n$
for all
$\alpha \le \beta$
, where
$n$
is the number of terms in
$\alpha$
and
$\beta$
. More generally, given a constraint atom
$c$
with a strict relation, we define its complement constraint as
$[\overline {c}] = \mathcal{D}^n \setminus [c]$
(which is also strict). The interaction of complementary constraints with logical negation is given in the next proposition.
Proposition 8.
For any
$\textrm {HT}_{\!c}$
trace
$\mathbf{M}={\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle }$
of length
$\lambda$
and any pair
$c$
,
$\overline {c}$
of complementary constraints, with both
$[c]$
and
$[\overline {c}]$
being strict, we have that
$\mathbf{M}, i \models c$
implies
$\mathbf{M}, i \models \neg \overline {c}$
for all
$i \in {[0..\lambda )}$
.
We thus obtain that
$\alpha = \beta$
implies
$\neg (\alpha \neq \beta )$
but not necessarily vise versa.
For illustration, consider the atoms
${\Large \circ } x = x$
and
${\Large \circ } x \not = x$
, where
$x$
takes its values in
$\mathbb{N}$
. We define the solution relation for each constraint as

We have that
$[{\Large \circ } x \not = x] = \mathbb{N}^2\setminus [{\Large \circ } x = x]$
, and therefore
$[{\Large \circ } x \not = x] = [\overline {{\Large \circ } x = x}]$
. By Proposition8,
${\Large \circ } x = x$
implies
$\neg ({\Large \circ } x \not = x)$
. Conversely, let
$\mathbf{M}={\langle {\boldsymbol{v}_h},\boldsymbol{v}_t \rangle }$
be an
$\textrm {HT}_{\!c}$
trace of length
$2$
defined as
$v_{w,i}(x) = {u}$
for
$w \in \{ h,t\}$
and
$i\in \{ 0,1\}$
. Then, we have that
$\mathbf{M}, 0 \models \neg ( {\Large \circ } x \not = x )$
but
$\mathbf{M}, 0 \not \models {\Large \circ } x = x$
.
When
$\textrm {HT}_{\!c}$
is extended with linear constraints, Cabalar et al. Reference Cabalar, Kaminski, Ostrowski, Schaub and Kambhampati(2016) introduce an interesting feature known as assignments. This assignment operator is a specialized form of equality that allows us to check if a variable has a defined value. To illustrate this, consider the two following formulas:Footnote
5

The equality
$x = y$
implies that any assignment to
$x$
must also be an assignment to
$y$
, and vise versa. Given that
$p=\mathtt {t}$
is not derivable,
$y$
appears to be undefined in this context. However, due to the strict nature of
$[x = y]$
, this allows for both
$x$
and
$y$
to take on any value, even if
$y$
seems undefined. To ensure that
$x$
is only assigned a value when
$y$
is defined, we can replace
$x = y$
in (2) with:

Because
$y\leq y$
cannot be established (due to the underivability of
$p=\mathtt {t}$
making
$y$
undefined), the resulting
$\textrm {HT}_{\!c}$
model has
$x$
,
$y$
and
$p$
all undefined. Indeed, within
$\textrm {HT}_{\!c}$
, the modified formula in (3) effectively represents the assignment
$x := y$
.
The remainder of this section focuses on extending this assignment mechanism of
$\textrm {HT}_{\!c}$
to our temporal setting in
$\textrm {THT}_{\!c}$
. For any linear expression
$\alpha$
, we define

The satisfiability of
${\mathit{df}}(\alpha )$
necessitates that all its variables are defined, as shown next.
Proposition 9.
For all
$\textrm {HT}_{\!c}$
traces
$\mathbf{M}={\langle (v_{h,i})_{{i \in {[0..\lambda )}}},(v_{t,i})_{{i \in {[0..\lambda )}}} \rangle }$
and for all linear expressions
$\alpha$
, the following statements are equivalent for all
$i \in [0..\lambda )$
-
1.
$\mathbf{M}, i \models {\mathit{df}}(\alpha )$
-
2.
$v_{h,i}({\Large \circ }^l x) = v_{t,i}({\Large \circ }^l x) \not = {u}$ for all
${\Large \circ }^l x \in {\mathit{terms}}(\alpha )$
In our context, an assignment for a variable
$x\in \mathcal{X}$
is an expression of the form
${\Large \circ }^l x := \alpha$
, where
$\alpha$
is a linear temporal term. The assignment operator can be seen as a derived operator defined as

With it, we now define a syntactic subclass that takes the form of a logic program. To ease notation, we let
$ (\varphi \leftarrow \psi ) \stackrel {\mathit{def}}{=} (\psi \to \varphi )$
and
$ (\varphi ,\psi ) \stackrel {\mathit{def}}{=} (\psi \wedge \varphi )$
. Then, a temporal linear constraint rule (or just rule) is of the form:

where
${\Large \circ }^l x := \alpha$
is an assignment and each
$\ell _i$
is a linear temporal constraint atom for
$0 \le m \le k$
. Placing Rule (4) under the
$\square$
operator ensures its satisfaction across all temporal states. As with
$\textrm {HT}_{\!c}$
, assignments appearing in rule heads can be transformed into an analogous logic programming representation.
Proposition 10. A rule of form (4) is equivalent to the rule

where
${\Large \circ }^{o_i}x_i\in {\mathit{terms}}(\alpha )$
for
$0 \le i \le n = \left |{\mathit{terms}}(\alpha )\right |$
.
The logic programming fragment of
$\textrm {THT}_{\!c}$
offers a powerful approach to modeling various aspects of dynamic systems, including the representation of inertia rules and default values. To demonstrate the expressive power of our formalism, let us reconsider our initial scenario: “A radar is positioned at the 400 km mark on a road with a speed limit of 90 km/h. A car is initially traveling at 80 km/h. At time instant 4, the car accelerates by 11.35 km/h. Subsequently, at time instant 6, it decelerates by 2.301 km/h. The problem is to determine whether the car will exceed the speed limit and thus incur a fine.”
To formalize this scenario within
$\textrm {THT}_{\!c}$
, we introduce the following variables. The numerical fluents
$p$
and
$s$
(ranging over
$\mathbb{N}$
) represent the car’s position and speed, respectively. The numerical variables
$\mathit{rdpos}$
and
$\mathit{rdlimit}$
(ranging over
$\mathbb{N}$
) refer to the radar’s position and speed limit. The numerical action
$\mathit{acc}$
(ranging over
$\mathbb{Z}$
) models the car’s acceleration (positive) or deceleration (negative). Lastly, the Boolean variable
$\mathit{fine}$
indicates whether the car’s speed exceeded
$\mathit{rdlimit}$
at
$\mathit{rdpos}$
, leading to a fine.
The subsequent set of rules formalizes our scenario in
$\textrm {THT}_{\!c}$
.Footnote
6








Rules preceded by the always operator
$\square$
in our
$\textrm {THT}_{\!c}$
formalization are enforced throughout the entire temporal evolution, contrasting with Rules (5) and (6), which are specific to the initial state. Specifically, Rules (5) and (6) set the car’s initial position to
$0$
meters and its speed to
$80\,km/h$
. The radar’s characteristics, its position at
$400\,km$
and a constant speed limit of
$90\,km/h$
, are defined by Rules (7) and (8). The dynamics of the car’s speed are captured by Rules (9) and (10): the speed remains unchanged unless an acceleration value (
$\mathit{acc}$
) is present, causing a corresponding adjustment. Rule (11) dictates that the car’s position changes based on its speed. The condition for receiving a fine is formalized in Rule (12): if the car’s speed (
$s$
) exceeds the radar’s speed limit (
$\mathit{rdlimit}$
) at or after passing the radar’s position (
$\mathit{rdpos}$
) at any time, a fine is issued. Finally, to model the acceleration of
$11.350\,km/h$
at time
$4$
and the deceleration of
$2.301\,km/h$
at time
$6$
, we include the following temporal assignments:

These two rules for acceleration and deceleration are applied specifically at time points
$4$
and
$6$
, respectively. Note that our formalization does not provide a value for
$\mathit{acc}$
in the initial state. Since no value is provided,
$\mathit{acc}$
is left undefined at the initial state, Rule (9) is inapplicable and the inertia rule in (10) keeps the speed (
$\mathit{s}$
) constant. However, at time points
$4$
and
$6$
, a value for
$\mathit{acc}$
is given, so Rule (9) applies and the value of
$\mathit{s}$
is modified.
An alternative formalization could rely on the use of the default rule

to set the value of
$\mathit{acc}$
to
$0$
in the absence of information. Under the addition of such a rule, inertia (10) could be removed, since it becomes redundant: when there is no acceleration,
$acc=0$
and we already derive
${\Large \circ } s=s$
through (9).
The following table presents an equilibrium model that satisfies the representation of our scenario. The values for
$\mathit{rdlimit}$
and
$\mathit{rdpos}$
are omitted from the table as they remain constant over time. The evolution of the remaining fluents is as follows:

Between time points
$4$
and
$5$
, the car’s speed exceeds the limit as it passes the radar’s position, resulting in the
$\mathit{fine}$
atom becoming true at time point
$5$
.
5 Discussion
We have integrated two established extensions of
$\textrm {HT}$
, namely
$\textrm {THT}$
and
$\textrm {HT}_{\!c}$
(along with their equilibrium variants), into a unified framework for temporal (nonmonotonic) reasoning with constraints. Our work is inspired by extensions of (monotonic) Linear Temporal Logic (
$\textrm {LTL}$
) interpreted over constraint systems and first-order theories, in particular the approaches taken by Demri (Reference Demri2006a) and Geatti et al. Reference Geatti, Gianola, Gigante and De Raedt(2022), which apply next and previous operators to non-Boolean variables. In many of these cases, the constraints considered are based on Presburger arithmetic (Demri Reference Demri2006b) or qualitative spatial formalisms (Vilain and Kautz Reference Vilain, Kautz and Kehler1986; Wolter and Zakharyaschev Reference Wolter, Zakharyaschev, Cohn, Giunchiglia and Selman2000; Balbiani and Condotta Reference Balbiani and Condotta2001). Within the ASP paradigm, a significant early extension of temporal answer sets with constraints was introduced by Giordano et al. Reference Giordano, Martelli, Spiotta and DuprÉ(2013a), building upon their earlier work (Giordano et al. Reference Giordano, Martelli and DuprÉ2013b). This approach utilizes logic programming syntax and semantics, which differs from our
$\textrm {HT}$
-based approach. Furthermore, their constraints typically refer to variables within individual states, unlike our approach which allows for the combination of variables across multiple temporal states.
In addition to defining and formally elaborating on the semantics of
$\textrm {THT}_{\!c}$
, we extended Kamp’s translation (Kamp Reference Kamp1968) to our approach by mapping
$\textrm {THT}_{\!c}$
formulas into
$\textrm {QHT}_{\mathcal{F}}^{=}(\lt )$
, and notably demonstrated that this correspondence extends to the respective equilibrium models. We further investigated the logic programming fragment of
$\textrm {THT}_{\!c}$
, illustrating its expressive power through modeling our initial scenario involving temporal numeric constraints. This work lays the groundwork for the future integration of constraint reasoning into other
$\textrm {HT}$
-based temporal extensions, such as dynamic and metric logics of
$\textrm {HT}$
(and their equilibrium variants) (Bosser et al. Reference Bosser, Cabalar, DiÉguez, Schaub, Thielscher, Toni and Wolter2018; Becker et al. Reference Becker, Cabalar, DiÉguez, Schaub and Schuhmann2024b). Advancing this line of research will necessitate adapting existing computational methods (Becker et al. Reference Becker, Cabalar, DiÉguez, Hahn, Romero, Schaub, Dodaro, Gupta and Martinez2024a) to operate over constraints, extending beyond solely propositional atoms.
As a first step, we have only considered linear constraints. Future work includes studying the integration of periodicity constraints (Demri Reference Demri2006b) and qualitative spatial constraints (Wolter and Zakharyaschev Reference Wolter, Zakharyaschev, Cohn, Giunchiglia and Selman2000; Balbiani and Condotta Reference Balbiani and Condotta2001). Periodicity constraints would allow for expressing congruence relations among different variables, proving particularly useful for capturing cyclical behaviors or recurring events. Integrating spatial constraints would enable us to assign spatial meaning to variables and describe their dynamics, for instance, modeling objects that change their position or size over time.
In the classical setting, the computational complexity of temporal logics interpreted over constraint systems is often highly undecidable (Demri Reference Demri2006a), with decidability strongly depending on the specific constraint system. For example, the satisfiability problem for
$\textrm {LTL}$
interpreted over constraint systems based on Presburger arithmetic (including periodicity constraints) is in PSPACE under certain completion properties (Balbiani and Condotta Reference Balbiani, Condotta and Armando2002; Demri Reference Demri2006a). When considering qualitative spatial constraints expressed using the Region Connection Calculus, the problem is decidable, with complexity ranging from NP to EXPSPACE, depending on the imposed restrictions (Wolter and Zakharyaschev Reference Wolter, Zakharyaschev, Cohn, Giunchiglia and Selman2000). Following a strategy similar to (Cabalar and Demri Reference Cabalar, Demri and Vidal2011), it may be possible to establish a bijection between classical and equilibrium models, potentially allowing us to establish a lower bound on the complexity of the satisfiability problem in
$\textrm {THT}_{\!c}$
. However, determining a corresponding upper bound remains an open challenge.
Acknowledgments
This work was supported by the DFG grant SCHA 550/15 (Germany), the Etoiles Montantes CTASP project (Region Pays de la Loire, France), and the MICIU/AEI/10.13039/501100011033 grant PID2023-148531NB-I00 (Spain).
Competing interests
The authors declare none.