\section*{Introduction}

Let $R$ be a commutative ring with unity, let $I \neq 0$ be a proper ideal of $R$ and let $a,b \in R$. In \cite{BDS} the authors introduce and study the family of quotient rings
$$R(I)_{a,b}=\frac{R[It]}{(I^2(t^2+at+b))} \ ,$$
where $R[It]=\bigoplus_{n \geq 0}(I^nt^n)$ is the Rees algebra associated with the ring $R$ with respect to $I$ and
$(I^2(t^2+at+b))$ is the contraction to $R[It]$ of the ideal
generated by $t^2+at+b$ in $R[t]$.

This family provides a unified approach to Nagata's idealization (with respect to an ideal, see \cite[pag. 2]{n}) and to amalgamated duplication (see \cite{D'A} and \cite{DF}); they can be both obtained as particular members of the family, more precisely they are isomorphic to $R(I)_{0,0}$ and $R(I)_{0,-1}$ respectively. This fact explains why these
constructions produce rings with many common properties; as a
matter of fact, it is shown, in \cite{BDS}, that many properties
of the rings in this family (like, e.g., Krull dimension,
noetherianity and local Cohen-Macaulayness) do not depend on the defining polynomial. One interesting fact about this family is that, if $R$ is an integral domain, we can always find integral domains among its members, whereas the idealization is never reduced and the amalgamated duplication is never an integral domain. Hence, this construction revealed to be useful to construct $R$-algebras (and, in particular, integral domains)
satisfying pre-assigned properties. For instance, in \cite{BDS} it is given a formula for the Hilbert function of $R(I)_{a,b}$ in the local case, that depends only on $R$ and $I$, and in \cite{OST} this formula is used to construct families of one-dimensional Gorenstein local rings with decreasing Hilbert function, solving a problem formulated by M.E. Rossi.

In a subsequent paper (cf. \cite{BDS2}), the same authors deepen the study of this family of rings in the local case, characterizing when its members are Gorenstein, complete intersection, and almost Gorenstein, proving that these properties do not depend on the particular member chosen in the family, but only on $R$ and $I$. We also notice that other properties of these quotients have been studied in \cite{F}.

In this paper we are interested in understanding the prime spectrum of the rings in the family, in relation to the prime spectrum of the original ring, and in studying the behaviour of the localizations.
More precisely, we explicitly describe the primes of $R(I)_{a,b}$ lying over a fixed prime $\mathfrak p$ of $R$,
showing that two cases can arise, depending on the reducibility of $t^2+at+b$ in $Q(R/\mathfrak p)[t]$
and (if the polynomial is reducible) on its roots. In case there is only one prime $\mathfrak q$ lying over $\mathfrak p$, then we obtain $(R(I)_{a,b})_{\mathfrak q} \cong R_{\mathfrak p}(I_{\mathfrak p})_{a,b}$, while, if there exist two primes
$\mathfrak p_1$ and $\mathfrak p_2$ lying over $\mathfrak p$, then $(R(I)_{a,b})_{\mathfrak p_i} \cong R_\mathfrak p$ for $i=1,2$ provided that a technical hypothesis holds (see Proposition \ref{localizations}).

This facts will allow to extend in a natural way some local results contained in the papers cited above and to investigate other relevant properties that depend on localizations, like Serre's conditions. We also notice that the study of localizations has an intrinsic interest and can be applied in many situations
like, e.g., the geometric contest: if we start with a finitely generated $k$-algebra $R$, all the rings in the family are finitely generated $k$-algebras and we can determine whether a prime ramifies or not.

Finally, under the hypotheses that  $t^2+at+b$ is reducible in $R[t]$ and $I$ is regular, we prove that $R(I)_{a,b}$ is quasi-Gorenstein if and only if $R$ satisfies the Serre's condition $(S_2)$ and $I$ is a canonical ideal of $R$. The concept of quasi-Gorenstein rings arises from the theory of linkage and it is a generalization of the notion of Gorenstein rings in the non-Cohen-Macaulay case. It is already known when idealization and amalgamated duplication are quasi-Gorenstein (see \cite{A2} and \cite{BSTY}) and we extend these results to the more general case $R(I)_{a,b}$.
\medskip

The structure of the paper is the following. In the first section we give a complete description of the prime spectrum of $R(I)_{a,b}$ (see Proposition \ref{minimal primes}) and describe the localizations of $R(I)_{a,b}$ at prime ideals (see Proposition \ref{localizations}); as a corollary, we characterize when $R(I)_{a,b}$ is an integral domain and when it is a Cohen-Macaulay or a Gorenstein ring.
In the second section we study Serre's conditions for $R(I)_{a,b}$ (see Propositions \ref{Sn} and \ref{Rn}).

Finally, in the last section we consider the particular case $t^2+at+b$ reducible in $R[t]$. More precisely, we study when $R(I)_{a,b}$ is isomorphic either to the idealization or to the amalgamated duplication and we characterize the properties of being reduced and quasi-Gorenstein (see Proposition \ref{reduced} and Theorem \ref{quasi Gorenstein}).

\section{Spectra and localizations}

Throughout this paper $R$ is a commutative ring with identity and $I \neq (0)$ a proper ideal of $R$;
with $Q(R)$ we will denote its total ring of fractions.
In this section we study the prime spectrum of the rings $R(I)_{a,b}$. To this aim we recall that the extensions $R \subset R(I)_{a,b} \subset R[t]/(t^2+at+b)$ are integral and, given $\mathfrak p \in \spec R$, the prime ideals of $R(I)_{a,b}$ lying over $\mathfrak p$ depend on the reducibility of $t^2+at+b$ on $Q(R/\mathfrak p)$, the field of fractions of $R/\mathfrak p$, see \cite[Proposition 1.9]{BDS}. More precisely, if $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$, there will be only one prime of $R[t]/(t^2+at+b)$ lying over $\mathfrak p$ and, thus, the same holds for $R(I)_{a,b}$; on the other hand, when $t^2+at+b$ is reducible, there are two primes of $R[t]/(t^2+at+b)$ lying over $\mathfrak p$ and they can either contract to the same prime in $R(I)_{a,b}$ or to two different primes, depending on $I$, $\mathfrak p$, and on the factorization of the polynomial.

Assuming that $t^2+at+b$ is reducible in $Q(R/\mathfrak p)[t]$ and that $\bar\alpha / \bar\gamma$ and $\bar\beta / \bar\delta$ are its roots, we can always choose a representation with $\bar\gamma=\bar\delta$. In this case, it is easy to see that in $Q(R/\mathfrak p)$ we have $\bar\gamma \bar a=-\bar\alpha-\bar\beta$ and $\bar\gamma^2 \bar b=\bar\alpha \bar\beta$ and, clearly, the same equalities hold in $R/\mathfrak p$.
We start with a preparatory lemma.

\begin{lem} \label{ideals}
Let $\mathfrak p$ be a prime ideal of $R$ and suppose that
$t^2+at+b=(t-\bar\alpha/ \bar\gamma)(t- \bar\beta/\bar\gamma)$ in $Q(R/\mathfrak p) [t]$. Let $\alpha, \beta, \gamma \in R$ such that their classes modulo $\mathfrak p$ are, respectively, $\bar\alpha, \bar\beta$ and $\bar\gamma$. Then, the two sets
$$
\mathfrak p_1:=\{r+it \ | \ r \in R, i \in I, \gamma r + \alpha i \in \mathfrak p \}
$$
$$
\mathfrak p_2:=\{r+it \ | \ r \in R, i \in I, \gamma r + \beta i \in \mathfrak p \}
$$
do not depend on the choice of $\alpha$, $\beta$, and $\gamma$ and are prime ideals of $R(I)_{a,b}$. Moreover, $\mathfrak p_1=\mathfrak p_2$
if and only if $(\alpha-\beta)I \subseteq \mathfrak p$.
\end{lem}

\begin{proof}
The fact that the sets defined above do not depend on the choice of $\alpha$, $\beta$ and $\gamma$ is an easy verification.
In order to prove that they are prime ideals, it is enough to consider $\mathfrak p_1$, since the proof for $\mathfrak p_2$ is analogous.

By definition $\gamma \notin \mathfrak p$, then, $\gamma r + \alpha i\in \mathfrak p$ if and only if $\gamma(\gamma r + \alpha i)\in \mathfrak p$. Let $r+it \in \mathfrak p_1$ and $s+jt \in R(I)_{a,b}$. We have $(r+it) (s+jt)=rs-ijb+(rj+si-aij)t$ and, since
$\gamma a +\alpha + \beta$, $\gamma^2 b - \alpha \beta$, $\gamma^2 r + \gamma\alpha i\in \mathfrak p$, we get, modulo $\mathfrak p$,
\begin{gather*}
\gamma(\gamma(rs-ijb)+ \alpha (rj+si-aij)) = \\
= \gamma^2 rs - ij \gamma^2 b+ \gamma \alpha rj + \gamma \alpha si- \gamma \alpha aij \equiv \\
\equiv \gamma^2 rs -ij \alpha \beta + \gamma \alpha rj -\gamma^2 rs + \alpha^2 ij+\alpha\beta ij = \\
= \gamma \alpha rj +\alpha^2 ij = \alpha j (\gamma r + \alpha i) \equiv 0
\end{gather*}
and this means that $(r+it)(s+jt)$ is in $\mathfrak p_1$, i.e. $\mathfrak p_1$ is an ideal.

Now we have to prove that $\mathfrak p_1$ is prime. If we suppose that $(r+it)(s+jt) \in \mathfrak p_1$, then $\gamma rs - \gamma ijb  + \alpha rj +\alpha si - \alpha ija \in \mathfrak p$ and, multiplying by $\gamma$, we get, modulo $\mathfrak p$,
\begin{gather*}
\gamma^2 rs - ij \alpha \beta + \gamma \alpha rj+\gamma \alpha si  + \alpha^2 ij+ij \alpha \beta\equiv \\
\equiv \gamma s (\gamma r+\alpha i)+ \alpha j (\gamma r+ \alpha i)\equiv
(\gamma s + \alpha j) (\gamma r + \alpha i)\in \mathfrak p.
\end{gather*}
Since $\mathfrak p$ is prime, at least one between $\gamma s + \alpha j$ and $\gamma r + \alpha i$ belongs to $\mathfrak p$, i.e. at least one between $r+it$ and $s+jt$ is in $\mathfrak p_1$.

As for the last statement, suppose first that $(\alpha-\beta)I \subseteq \mathfrak p$. If $r+it \in \mathfrak p_1$, then $\gamma r+ \beta i = \gamma r + \alpha i - (\alpha - \beta) i \in \mathfrak p$; therefore $\mathfrak p_1 \subseteq \mathfrak p_2$ and the other inclusion is analogous. Conversely, we first notice that for every $i \in I$, $- \alpha i + \gamma it \in \mathfrak p_1$. Since $\mathfrak p_1=\mathfrak p_2$, we get $- \gamma \alpha i + \beta i \gamma \in \mathfrak p$ and, therefore, $-\gamma (\alpha - \beta)i \in \mathfrak p$. Hence, $(\alpha-\beta)i \in \mathfrak p$, since $\gamma \notin \mathfrak p$ and $\mathfrak p$ is a prime ideal.
\end{proof}

\begin{prop} \label{minimal primes}
Let $\mathfrak p$ be a prime ideal of $R$.
\begin{enumerate}
\item If $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$, then the only prime ideal of $R(I)_{a,b}$ lying over $\mathfrak p$ is
$\mathfrak q:= \{p+it \ | \ p \in \mathfrak p, i \in I \cap \mathfrak p \}$.
\item If $t^2+at+b=(t-\bar \alpha / \bar\gamma)(t- \bar\beta / \bar\gamma)$ in $Q(R/\mathfrak p)[t]$, then the ideals $\mathfrak p_1$ and $\mathfrak p_2$ defined in the previous lemma are the only prime ideals of $R(I)_{a,b}$ lying over $\mathfrak p$.
\end{enumerate}
\end{prop}

\begin{proof}
The first case is straightforward, because the prime ideal of $R(I)_{a,b}$ lying over $\mathfrak p$ is
$$\mathfrak p \frac{R[t]}{(t^2+at+b)} \cap R(I)_{a,b} = \{p+it \, | \, p \in \mathfrak p, i \in I \cap \mathfrak p \}.$$
As for the second case, we easily observe that $\mathfrak p_1 \cap R = \mathfrak p = \mathfrak p_2 \cap R$ and, hence, $\mathfrak p_1$ and $\mathfrak p_2$ are prime ideals lying over $\mathfrak p$.
In fact, in the proof of \cite[Proposition 1.9]{BDS} it is proved that a prime ideal of $R(I)_{a,b}$ lying over $\mathfrak p$ is the contraction to $R(I)_{a,b}$ of the ideals $J=\varphi_{\mathfrak p}^{-1}((t-\bar\alpha / \bar\gamma))$ and $H=\varphi_{\mathfrak p}^{-1}((t-\bar\beta / \bar\gamma))$, where $\varphi_{\mathfrak p}$ is the composition of the canonical homomorphisms $R[t] \rightarrow (R/\mathfrak p)[t]
\hookrightarrow Q(R/\mathfrak p)[t]$.
Since $J$ and $H$ contain $\mathfrak p R[t]$, it is easy to see that the extensions of $\mathfrak p_1$ and $\mathfrak p_2$ in $R[t]/(t^2+at+b)$ are contained in the images $\bar J$ and $\bar H$ in the same ring of $J$ and $H$, respectively. In fact, if $r+it \in \mathfrak p_1$, then $\gamma r + \alpha i \in \mathfrak p$ and
$$
\varphi_{\mathfrak p}(r+it)=\frac{\bar r \bar\gamma}{\bar\gamma} +\bar i t = \bar i t -\frac{\bar\alpha \bar i}{\bar \gamma} + \frac{\bar\gamma \bar r + \bar\alpha \bar i}{\bar\gamma}=
\bar i\left(t-\frac{\bar\alpha}{\bar\gamma}\right)\in \left(t-\frac{\bar\alpha}{\bar\gamma}\right)Q\left(\frac{R}{\mathfrak p}\right)[t];
$$
therefore, $r+it \in \bar J\capR(I)_{a,b}$. Analogously, $\mathfrak p_2 \subset \bar H\cap R(I)_{a,b}$. By Incomparability, see \cite[Corollary 4.18]{E}, we get that $\mathfrak p_1=\bar J\cap R(I)_{a,b}$ and $\mathfrak p_2=\bar H\cap R(I)_{a,b}$ and this concludes the proof.
\end{proof}

In \cite[Remark 1.10.3]{BDS} it is noted that $R[It](I)_{a,b}$ is an integral domain, if $t^2+at+b$ is irreducible in $Q(R)[t]$ and $R$ is an integral domain; thanks to the previous proposition we can prove the converse.

\begin{cor} \label{domain}
$R(I)_{a,b}$ is an integral domain if and only if $R$ is an integral domain and $t^2+at+b$ is irreducible in $Q(R)[t]$.
\end{cor}

\begin{proof}
Since $R \subseteq R(I)_{a,b}$, we can assume that $R$ is an integral domain.
If $t^2+at+b$ is irreducible in $Q(R)[t]$, the ideal
$\mathfrak q= \{p+it \ | \ p \in (0)R, i \in I \cap (0)R \}=(0)R(I)_{a,b}$ is prime and, thus, $R(I)_{a,b}$ is an integral domain.
Conversely, suppose by contradiction that $t^2+at+b$ is reducible in $Q(R)[t]$ and let $\mathfrak p_1, \mathfrak p_2$ be the prime ideals of $R(I)_{a,b}$ lying over $(0)R$.
They are minimal primes of $R(I)_{a,b}$ and, since it is an integral domain, they are equal to $(0)R(I)_{a,b}$. On the other hand, it is easy to see that, for any $i \in I$, the element $i \alpha - i \gamma t$ is in $\mathfrak p_1$ and it is different from zero, because $R$ is an integral domain; contradiction.
\end{proof}

In order to study the behaviour of localizations, notice that, since the ideals $\mathfrak p_i$ are independent of the choice of the elements $\alpha$, $\beta$ and $\gamma$, we can choose them in such a way that $a\gamma=-\alpha-\beta$ and $b\gamma^2=\alpha \beta+p$ in $R$, where $p \in \mathfrak p$.
This choice is not unique, in fact for any $q \in \mathfrak p$, substituting $\alpha$ with $\alpha+q$ and $\beta$
with $\beta-q$, the first equality still holds and the second one is modified up to a summand in $\mathfrak p$.

\begin{prop} \label{localizations}
Let $\mathfrak p$ be a prime ideal of $R$.
\begin{enumerate}
\item Suppose that $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$ and let $\mathfrak q$ be the prime ideal of $R(I)_{a,b}$ lying over $\mathfrak p$. Then, $(R(I)_{a,b})_{\mathfrak q} \cong R_{\mathfrak p}(I_{\mathfrak p})_{a,b}$.
\item Suppose that $t^2+at+b=(t-\bar\alpha / \bar\gamma)(t- \bar\beta / \bar\gamma)$ in $Q(R/\mathfrak p)[t]$ and let $\mathfrak p_1, \mathfrak p_2$ be the prime ideals of $R(I)_{a,b}$ lying over $\mathfrak p$.
\begin{enumerate}
    \item If $(\alpha-\beta)I \subseteq \mathfrak p$ (i.e. $\mathfrak p_1=\mathfrak p_2$), then $(R(I)_{a,b})_{\mathfrak p_i} \cong R_\mathfrak p(I_\mathfrak p)_{a,b}$ for $i=1,2$.
    \item If $(\alpha-\beta)I \nsubseteq \mathfrak p$, i.e. there exists $\lambda \in I$ such that $(\alpha-\beta)\lambda \notin \mathfrak p$, then $(R(I)_{a,b})_{\mathfrak p_i} \cong R_\mathfrak p$ for $i=1,2$, provided that there exists a choice of $\alpha$, $\beta$ and $\gamma$, such that $a\gamma=-\alpha-\beta$ and $b\gamma^2=\alpha \beta+p$ in $R$, where $p \in \mathfrak p$ and $p\lambda I=0$. In particular, the last hypothesis holds if $t^2+at+b$ is reducible also in $Q(R)[t]$.
\end{enumerate}
\end{enumerate}
\end{prop}

\begin{proof}
(1) We have $s+jt \in R(I)_{a,b} \setminus \mathfrak{q}$ if and only if at least one between $s$ and $j$ is in $R \setminus \mathfrak p$.
Given an element $(r+it)/(s+jt) \in (R(I)_{a,b})_{\mathfrak q}$, we can multiply it by $(s-aj-jt)/(s-aj-jt)$; in fact, $s-aj-jt \in R(I)_{a,b} \setminus \mathfrak{q}$,
if $j \in R \setminus \mathfrak p$, but this also happens if $j \in \mathfrak p$ and $s \in R \setminus \mathfrak p$,
because in this case $s-aj \in R \setminus \mathfrak p$.
Hence, we get an injective homomorphism between
$(R(I)_{a,b})_{\mathfrak q}$ and $R_{\mathfrak p}(I_{\mathfrak p})_{a,b}$ given by
$$
\frac{r+it}{s+jt} \longmapsto \frac{r+it}{s+jt} \cdot \frac{(s-aj-jt)}{(s-aj-jt)} = \frac{rs-ajr+ijb}{s^2-ajs+bj^2}+\frac{si-rj}{s^2-ajs+bj^2}t.
$$
\indent Moreover, it is surjective because a generic element $r/s + (i/s')t$ comes from
$(rs'+ist)/(ss') \in (R(I)_{a,b})_{\mathfrak{q}}$. \\
(2) (a) We recall that in this case $\mathfrak p_1=\mathfrak p_2$. If $s+jt \in R(I)_{a,b} \setminus \mathfrak p_1$, then $ja-s+jt \notin \mathfrak p_1$, because $\gamma ja-\gamma s + \alpha j=-j\alpha -j \beta - \gamma s + \alpha j \notin \mathfrak p$, since $s+jt \notin \mathfrak p_2$. Therefore, given an element $(r+it)/(s+jt) \in (R(I)_{a,b})_{\mathfrak p_1}$, one has
$$
\frac{r+it}{s+jt} \cdot \frac{ja-s+jt}{ja-s+jt} =
\frac{rja-rs-bij}{sja-s^2-bj^2} + \frac{rj-si}{sja-s^2-bj^2}t.
$$
Clearly, $sja-s^2-bj^2 \in R \setminus \mathfrak p$, because $\mathfrak p_1 \cap R= \mathfrak p$, therefore, we get a well-defined ring homomorphism
$$
f: (R(I)_{a,b})_{\mathfrak p_1} \rightarrow R_\mathfrak p(I_\mathfrak p)_{a,b}
$$
$$
f \left( \frac{r+it}{s+jt} \right)=
\frac{rja - rs -bij}{sja-s^2-bj^2} + \frac{rj-si}{sja-s^2-bj^2}t
$$
that is injective by construction.
As for the surjectivity, if $\frac{r}{s_1}+\frac{i}{s_2}t$ is an element of $R_\mathfrak p(I_\mathfrak p)_{a,b}$,
it is easy to see that this is equal to $f(\frac{rs_2+is_1t}{s_1 s_2})$. Hence, $f$ is an isomorphism and, therefore, $(R(I)_{a,b})_{\mathfrak p_i} \cong R_{\mathfrak p}(I_{\mathfrak p})_{a,b}$ for $i=1,2$. \\
(2) (b) Consider the map $g_1 : R_\mathfrak p \rightarrow (R(I)_{a,b})_{\mathfrak p_1}, \ g_1 \left( \frac{r}{s} \right) = \frac{r}{s}$.
Clearly, this is well defined and is an injective ring homomorphism. As for the surjectivity consider a generic $\frac{r+it}{s+jt} \in (R(I)_{a,b})_{\mathfrak p_1}$ and let $\lambda$ be an element of $I$ such that $\lambda (\alpha - \beta) \notin \mathfrak p$. Then, $- \beta \lambda \gamma + \gamma^2 \lambda t \notin \mathfrak p_1$ and it is easy to see that
$(r+it)(-\beta \lambda \gamma + \gamma^2 \lambda t)=-r\beta \lambda \gamma - \alpha \beta i \lambda - pi\lambda+(r \gamma^2 \lambda-i \beta \lambda \gamma + \alpha i \gamma \lambda + \beta i \gamma \lambda)t=(r \gamma + i \alpha)(- \beta \lambda + \gamma \lambda t)$, since $pi \lambda=0$. It follows that
$$
\frac{r+it}{s+jt} \cdot \frac{-\beta \lambda \gamma + \gamma^2 \lambda t}{-\beta \lambda \gamma + \gamma^2 \lambda t} =
\frac{r \gamma +i \alpha}{s \gamma + j \alpha}.
$$
Hence, $g_1 \left(\frac{r \gamma+i \alpha}{s \gamma + j \alpha} \right) = \frac{r+it}{s+jt}$ and $(R(I)_{a,b})_{\mathfrak p_1} \cong R_{\mathfrak p}$. The same argument can be applied to $(R(I)_{a,b})_{\mathfrak p_2}$.
Finally, note that if $t^2+at+b$ is reducible in $Q(R)[t]$, then $p=0$.
\end{proof}

\begin{question}
With the notation of the previous proposition, if $(\alpha-\beta)I \nsubseteq \mathfrak p$ and $p\lambda I \neq 0$, for any possible choice of $p$ and $\lambda$, is it still true that $(R(I)_{a,b})_{\mathfrak p_i}$ is isomorphic to $R_\mathfrak p$?
\end{question}

We recall that an ideal is said to be regular if it contains a regular element.
In the light of the previous proposition, \cite[Proposition 2.7]{BDS} and \cite[Corollary 1.4]{BDS2}, we can immediately state the following corollary:

\begin{cor}
Let $R$ be a ring, let $I$ be an ideal of $R$ and let $a,b \in R$. Assume that $t^2+at+b$ is reducible in $Q(R)[t]$. Denote by $\mathbb{M}$ the set of all the maximal ideals $\mathfrak m$ of $R$ except those for which $t^2+at+b=(t-\alpha_{\mathfrak m}/\gamma_{\mathfrak m})(t-\beta_{\mathfrak m}/\gamma_{\mathfrak m})$ in $(R/\mathfrak m)[t]$ and $(\alpha_{\mathfrak m}-\beta_{\mathfrak m})I \nsubseteq \mathfrak m$. Then:
\begin{enumerate}
\item The ring $R(I)_{a,b}$ is Cohen-Macaulay if and only if $R$ is Cohen-Macaulay and $I_{\mathfrak m}$ is a maximal Cohen-Macaulay $R_{\mathfrak m}$-module for all $\mathfrak m \in \mathbb{M}$;
\item Assume that $I_\mathfrak m$ is regular for all $\mathfrak m \in \mathbb{M}$. The ring $R(I)_{a,b}$ is Gorenstein if and only if $R$ is Cohen-Macaulay, $I_{\mathfrak m}$ is a canonical ideal of $R_{\mathfrak m}$ for all $\mathfrak m \in \mathbb{M}$, and $R_{\mathfrak m}$ is Gorenstein for all $\mathfrak m \notin \mathbb{M}$.
\end{enumerate}
\end{cor}

\begin{ex} \rm Let $k$ be an algebraically closed field of characteristic different from $2$ and assume that $R \cong k[x_1,\dots,x_n]/J$ is a domain.
Let $b \in R$ such that $t^2-b$ is irreducible in $Q(R)[t]$ (it is proved in \cite[Corollary 2.6]{BDS} that we can always find infinitely many such $b$), let $I$ be an ideal of $R$ and consider the ring $R(I)_{0,-b}$.
We can present it as a quotient of $k[x_1,\dots,x_n,y_1,\dots,y_m]$, where $m$ is the cardinality of a minimal set of generators of $I$; Corollary \ref{domain} implies that this is an integral domain. For any maximal ideal $\mathfrak m_Q$ (corresponding to the point $Q$ in the affine variety $\mathcal V(J)$) the polynomial $t^2-b$ is reducible in $(R/\mathfrak m_Q)[t]\cong k[t]$, since $k$ is algebraically closed; moreover, if $b\notin \mathfrak m_Q$ and
if $\alpha \in R$ is such that $t^2-b=(t-\bar\alpha)(t+\bar{\alpha})$,
we have that $\alpha \notin \mathfrak m_Q$, i.e. the condition $2\alpha I \subset \mathfrak m_Q$ is equivalent to
$I \subset \mathfrak m_Q$. Hence, $R(I)_{0,-b}$ is the coordinate ring of an affine variety double covering $\mathcal V(J)$, with ramification points $Q$ corresponding to the roots of $b$ and to those points $Q$, such that the corresponding ideal $\mathfrak m_Q$ contains $I$.
By Proposition \ref{localizations}, the points of the double covering lying over a
ramification point are all singular, since, by \cite[Remark 2.4]{BDS}, a local ring of the form
$R(I)_{a,b}$ is regular if and only if $R$ is regular and $I=0$.
\end{ex}

\section{Serre's conditions}

A noetherian ring $R$ satisfies Serre's condition $(S_n)$ if
$\depth R_{\mathfrak p} \geq \min\{n, \dim R_{\mathfrak p}\}$ for any $\mathfrak p \in \spec R$.
In the next proposition we study Serre's condition $(S_n)$ for $R(I)_{a,b}$, generalizing the particular case of the amalgamated duplication studied in \cite{BSTY}.
In this section we assume that $t^2+at+b$ is reducible in $Q(R)[t]$ and, if it is also reducible in $Q(R/\mathfrak p)[t]$, we write $t^2+at+b=(t-\bar\alpha_\mathfrak p/\bar\gamma_\mathfrak p)(t-\bar\beta_\mathfrak p/\bar\gamma_\mathfrak p)$. We recall that $R(I)_{a,b}$ is noetherian if and only if $R$ is noetherian (cf. \cite[Proposition 1.11]{BDS}).

\begin{prop} \label{Sn}
Let $R$ be a noetherian ring. Then, $R(I)_{a,b}$ satisfies Serre's condition $(S_n)$ if and only if $R$ satisfies Serre's condition $(S_n)$ and
$\depth I_\mathfrak p \geq \min \{n, \dim R_\mathfrak p \}$ for all $\mathfrak p \in \spec R$ such that either $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$ or $(\alpha_\mathfrak p - \beta_\mathfrak p) I \subseteq \mathfrak p$.
\end{prop}

\begin{proof}
Let $\mathfrak{q}$ be a prime ideal of $R(I)_{a,b}$ and $\mathfrak p = \mathfrak{q} \cap R$.
We distinguish two cases according to Proposition \ref{localizations}.
In both cases we notice that $\dim R_{\mathfrak p}=\dim R_{\mathfrak p}(I_{\mathfrak p})_{a,b} = \dim (R(I)_{a,b})_{\mathfrak{q}}$.

\begin{itemize}
\item If $(\alpha_\mathfrak p - \beta_\mathfrak p)I \nsubseteq \mathfrak p$, we have $\depth (R(I)_{a,b})_{\mathfrak q} = \depth R_p$; then, $\depth (R(I)_{a,b})_{\mathfrak q} \geq \min \{n, \dim (R(I)_{a,b})_{\mathfrak{q}} \}$ if and only if $\depth R_p    \geq \min \{n, \dim R_{\mathfrak p}\}$.

\item If either $(\alpha_\mathfrak p - \beta_\mathfrak p)I \subseteq \mathfrak p$ or $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$, it follows that $\depth (R(I)_{a,b})_{\mathfrak{q}}=\depth R_{\mathfrak p}(I_{\mathfrak p})_{a,b} = \min\{\depth R_{\mathfrak p}, \depth I_{\mathfrak p}\}$. Consequently, we get $\depth (R(I)_{a,b})_{\mathfrak{q}} \geq \min \{n, \dim (R(I)_{a,b})_{\mathfrak{q}}\}$
    if and only if  $\min\{\depth R_\mathfrak p,\depth I_{\mathfrak p}\} \geq \min \{n, \dim R_{\mathfrak p} \}$. \qedhere
\end{itemize}
\end{proof}

A noetherian ring $R$ satisfies the condition $(R_n)$ if $R_{\mathfrak p}$ is regular for all $\mathfrak p \in \spec R$ with $\height \mathfrak p \leq n$.
Bagheri, Salimi, Tavasoli, and Yassemi ask when the condition $(R_n)$ holds for the amalgamated duplication, see \cite[Remark 3.9]{BSTY}. The next result gives the answer for the more general construction $R(I)_{a,b}$.

\begin{prop} \label{Rn}
Let $R$ be a noetherian ring. Then, $R(I)_{a,b}$ satisfies $(R_n)$ if and only if $R$ satisfies $(R_n)$ and $I_{\mathfrak p}=0$ for all $\mathfrak p \in \spec R$ with $\height \mathfrak p \leq n$ and such that either $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$ or $(\alpha_\mathfrak p - \beta_\mathfrak p) I \subseteq \mathfrak p$.
\end{prop}

\begin{proof}
Let $\mathfrak{q}$ be a prime ideal of $R(I)_{a,b}$ such that
$\height \mathfrak p \leq n$ and $\mathfrak p= \mathfrak{q} \cap R$.
As in the previous proposition there are two cases:
\begin{itemize}
\item If $(\alpha_\mathfrak p - \beta_\mathfrak p)I \nsubseteq \mathfrak p$, then $(R(I)_{a,b})_{\mathfrak{q}}$ is regular if and only if $R_{\mathfrak p}$ is regular.
\item If either $(\alpha_\mathfrak p - \beta_\mathfrak p)I \subseteq \mathfrak p$  or $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$, then $(R(I)_{a,b})_{\mathfrak{q}}$ is regular if and only if $R_{\mathfrak p}(I_{\mathfrak p})_{a,b}$ is regular and this is equivalent to $R_{\mathfrak p}$ regular and $I_{\mathfrak p}=0$, by \cite[Remark 2.4]{BDS}.
\end{itemize}
Putting together the two cases we get the thesis.
\end{proof}

If the polynomial $t^2+at+b$ is reducible in $R[t]$, as in the cases of idealization and amalgamated duplication, we can be more precise.

\begin{cor}
Let $I$ be a regular ideal of a noetherian ring $R$ and suppose that $t^2+at+b=(t-\alpha)(t-\beta)$ in $R[t]$. Then, $R(I)_{a,b}$ satisfies $(R_n)$ if and only if $R$ satisfies $(R_n)$ and $n < \height (\alpha - \beta)I$.
\end{cor}

\begin{proof}
If $R(I)_{a,b}$ satisfies $(R_n)$ it follows from the previous proposition that $R$ satisfies $(R_n)$. Suppose by contradiction that $n \geq \height (\alpha - \beta)I$ and let $\mathfrak p$ be a minimal prime of $(\alpha - \beta)I$ such that $\height(\mathfrak p)=\height((\alpha-\beta)I)$. By the previous proposition we have $I_{\mathfrak p}=0$, but, if $x \in I$ is regular, this implies that $xs=0$ for some $s \in R \setminus \mathfrak p$, a contradiction.

Conversely, we have $(\alpha - \beta)I \nsubseteq \mathfrak p$ for any prime ideal $\mathfrak p$ of $R$ of height less than or equal to $n$; hence the thesis follows from the previous proposition.
\end{proof}

The previous corollary implies that, if $I$ is regular and $\height (\alpha - \beta)I \leq n$, the rings $R(I)_{a,b}$ never satisfies condition $(R_n)$. This is the case of idealization, since $\alpha = \beta=0$. As for amalgamated duplication the factorization is $t(t-1)$, hence $R(I)_{-1,0}$ satisfies the property $(R_n)$ if and only if $R$ satisfies ${\rm R}_n$ and $n<\height(I)$.

\section{The case $t^2+at+b$ reducible in $R[t]$}

In this section we always assume that $t^2+at+b=(t - \alpha)(t- \beta)$, where
$\alpha$ and $\beta$ are elements of $R$. Particular cases of this setting are
both idealization and duplication, since the corresponding polynomials are $t^2$ and, respectively, $t(t-1)$.
Thus, we get a subfamily of the family of rings $R(I)_{a,b}$; the interest in studying this subfamily comes from the facts that it is large enough (as we will see, we can obtain elements that are not isomorphic neither to an idealizazion nor to a duplication) and, for any ring $T$ in it, $R$ is naturally a $T$ module (cf. Remark \ref{hom}).

We recall that, if $R$ is reduced, the amalgamated duplication is always reduced, while the idealization is never reduced; in particular, in these two constructions this property doesn't depend on the ideal $I$.
Despite this, in the next example we show that could be some choices of $a$ and $b$ for which $R(I)_{a,b}$ can be reduced or not depending on the ideal $I$.

\begin{ex} \label{esempio 1} \rm
Let $k$ be a field of characteristic two and set
$R:=k[X,Y]/(XY)$, that is a reduced ring.
Denote the images of $X,Y$ in $R$ by $x,y$ and
consider $R(I)_{x,y^2}=R[It]/I^2(t^2+xt+y^2)$.
Notice that $(t^2+xt+y^2)=(t+(y+x))(t+y)$, since ${\rm char} \ \! R=2$.
If $I=(y)$, then $(y)^2(t^2+xt+y^2)=(y^2)(t^2+y^2)$ in $R[t]$, so $R(I)_{x,y^2} \cong R \ltimes I$
by \cite[Proposition 1.5]{BDS} and, in particular, it is not a reduced ring. \\
On the other hand, if $I=(x)$, then $(x)^2(t^2+xt+y^2)=(x^2)(t^2+xt)$ in $R[t]$.
If $r+it$ is a nilpotent element of $R(I)_{x,y^2}$, it follows that
$0=(r+it)^n=r^n+t( \dots )$ and thus $r=0$, since $R$ is reduced. Therefore, if $i=\lambda x$ for some $\lambda \in R$, we get
$0=(it)^n=(\lambda x)^n t^n=\lambda ^n x^{2n-1} t$ and this implies $Y|\lambda$ in $k[X,Y]$, that is
$i=\lambda_1 xy=0$ in $R$. This proves that $R(I)_{x,y^2}$ is reduced.
\end{ex}

In Corollary \ref{idealization and duplication} we will see that the last ring of the previous example is an amalgamated duplication. However, in Example \ref{esempio 2} we will produce
a ring of our subfamily that is not isomorphic neither to an idealization nor to an amalgamated duplication, proving that there are also new rings in the family we are studying.

\begin{rem} \label{hom} \rm
We note that in our case there exists a ring homomorphism
$$
\frac{R[t]}{((t- \alpha)(t- \beta))} \longrightarrow \frac{R[t]}{(t-\alpha)} \cong R,
$$
If we restrict to $R(I)_{a,b}$, we get a ring homomorphism $R(I)_{a,b} \rightarrow R$, that maps $s+jt$ to $s+j\alpha$;
since there also exists a natural homomorphism $R \rightarrow R(I)_{a,b}$,
any $R$-module $M$ is an $R(I)_{a,b}$-module and vice versa; moreover
$\lambda_{R}(M)=\lambda_{R(I)_{a,b}}(M)$, where $\lambda$ denotes the length of a module.

In particular,  $R$ is an $R(I)_{a,b}$-module with the scalar multiplication $(s+jt)r=sr+j\alpha r$, where $s+jt \in R(I)_{a,b}$ and $r \in R$.
\end{rem}

We denote the minimal primes of $R$ by ${\rm Min}(R)$ and their intersection, the nilradical of $R$, by $N(R)$. Moreover, we write ${\rm Ann}(x)$ and ${\rm Ann}(I)$ to denote the annihilator of the element $x$ and the ideal $I$ respectively.

\begin{prop} \label{reduced}
$R(I)_{a,b}$ is reduced if and only if $R$ is reduced and $I \cap {\rm Ann}(\alpha - \beta)=(0)$.
\end{prop}

\begin{proof}
The set of minimal primes of $R(I)_{a,b}$ is $A=\bigcup_{\mathfrak p \in {\rm Min}(R)} \{ \mathfrak p_1,\mathfrak p_2 \}$,
therefore, $R(I)_{a,b}$ is reduced if and only if $N(R(I)_{a,b})=\bigcap A = (0)$.

Assume that $R$ is reduced and $I \cap {\rm Ann}(\alpha - \beta)=(0)$. Let $r+it$ be an element of $N(R(I)_{a,b})$ and
fix $\mathfrak p \in {\rm Min}(R)$. Since $r+it \in \mathfrak p_1 \cap \mathfrak p_2$, then $r+\alpha i$, $r+\beta i \in \mathfrak p$ and consequently $i(\alpha - \beta) \in \mathfrak p$. This holds for any $\mathfrak p \in {\rm Min}(R)$ and, thus,
$i(\alpha - \beta) \in \bigcap\limits_{\mathfrak p \in {\rm Min}(R)} \mathfrak p = (0)$. This implies that $i=0$,
since $I \cap {\rm Ann}(\alpha - \beta)=(0)$,
and then also $r=0$, since $R$ is reduced.

Conversely it is clear that $R$ is reduced if $R(I)_{a,b}$ is.
Moreover, if $i \in I \cap {\rm Ann}(\alpha - \beta)$, then
$$
(- \beta i + it)^2 = \beta ^2 i^2 - b i^2 +(-2 \beta i^2 - ai^2)t =
(\beta - \alpha) i^2 \beta + (\alpha - \beta) i^2 t = 0,
$$
hence, $-\beta i +it=0$ and consequently $i=0$.
\end{proof}

\begin{cor}
Let $R$ be a reduced ring and assume that $\alpha - \beta$ is regular, then $R(I)_{a,b}$ is reduced. Moreover, the converse holds if $I$ is regular.
In particular, if $R$ is an integral domain and $\alpha \neq \beta$, then $R(I)_{a,b}$ is reduced.
\end{cor}

\begin{proof}
The first part follows immediately from the previous proposition. Conversely, if by contradiction there exists $x \in R$ such that $x(\alpha-\beta)=0$ and $i \in I$ is regular, then $0 \neq xi \in I \cap {\rm Ann}(\alpha-\beta)$ and the previous proposition leads to a contradiction.
\end{proof}

\begin{rem} \rm
We note that, if $t^2+at+b$ is irreducible in $Q(R/\mathfrak p)[t]$ for any $\mathfrak p \in {\rm Min}(R)$, then $R$ is reduced if and only if $R(I)_{a,b}$ is reduced. In fact, if $R$ is reduced it is enough to compute the nilradical of $R(I)_{a,b}$:
$$
N(R(I)_{a,b})= \bigcap\limits_{\mathfrak q \in {\rm Min}(R(I)_{a,b})} \mathfrak q
= \bigcap\limits_{\mathfrak p \in {\rm Min}(R)} \{p+it \ | \ p \in \mathfrak p, i \in I \cap \mathfrak p \}=
$$
$$
= \{p+it \ | \ p \in N(R), i \in I \cap N(R) \} = (0)R(I)_{a,b}.
$$
\end{rem}

\subsection{Idealization and amalgamated duplication}

We have already noted that the idealization $R \ltimes I$ and the amalgamated duplication $R \!\Join\! I$ are members of our family;
in this subsection we study when $R(I)_{a,b}$ is isomorphic to them.
As consequence, we will show that it is possible to find rings in our subfamily that are not isomorphic neither to an idealization nor to an amalgamated duplication (cf. Example \ref{esempio 2}).

\begin{prop}
The following statements hold. \\
$1)$ $R(I)_{a,b} \cong R \ltimes I$ if $\alpha - \beta \in {\rm Ann}(I^2)$. \\
$2)$ $R(I)_{a,b} \cong R \Join (\alpha-\beta)I$ if ${\rm Ann}(\alpha - \beta) \cap I=(0)$.
\end{prop}

\begin{proof}
We can consider the ring automorphism of $R[t]$ given by $t \mapsto t+ \alpha$, then
$$
R(I)_{a,b} = \frac{R[It]}{I^2((t-\alpha)(t-\beta))} \cong
\frac{R[It]}{I^2(t^2+(\alpha - \beta)t)} = R(I)_{\alpha - \beta,0}.
$$
$1)$ If $\alpha - \beta \in {\rm Ann}(I^2)$, then
$$
R(I)_{a,b} \cong \frac{R[It]}{I^2(t^2+(\alpha -\beta)t)}
=\frac{R[It]}{I^2(t^2)} \cong R \ltimes I
$$
by \cite[Proposition 1.4]{BDS}. \\
$2)$ Consider the map
$\varphi: R(I)_{\alpha-\beta,0} \rightarrow R((\alpha-\beta)I)_{-1,0}$
given by $\varphi (r+it)=r + (\alpha - \beta)it$. This is a ring homomorphism, since
$$
\varphi((r+it)(s+jt))\! = \! \varphi(rs+(rj+si+ij(\alpha - \beta))t) \! = \! rs + (\alpha - \beta)(rj + si +ij(\alpha - \beta))t
$$
$$
\varphi(r+it)\varphi(s+jt) \! = \! (r+(\alpha - \beta)it)(s + (\alpha - \beta)jt) \! = \!
rs + (\alpha - \beta)(rj + si +ij(\alpha - \beta))t.
$$
Moreover, $\varphi$ is clearly surjective and, since
${\rm Ann}(\alpha - \beta) \cap I=(0)$, it is injective as well;
hence, $\varphi$ is an isomorphism and the thesis follows, because
$R((\alpha-\beta)I)_{-1,0} \cong R \Join (\alpha-\beta)I$ by \cite[Proposition 1.4]{BDS}.

\end{proof}

\begin{cor} \label{idealization and duplication}
Let $R$ be a reduced ring.
The following statements hold. \\
$1)$ $R(I)_{a,b} \cong R \ltimes I$ if and only if $\alpha - \beta \in {\rm Ann}(I)$. \\
$2)$ $R(I)_{a,b} \cong R \Join (\alpha - \beta)I$ if and only if ${\rm Ann}(\alpha - \beta) \cap I=(0)$.
\end{cor}

\begin{proof}
$1)$ If $\alpha - \beta \in {\rm Ann}(I)$, then $R(I)_{a,b} \cong R \ltimes I$ by previous proposition.
Conversely, suppose that $R(I)_{a,b} \cong R \ltimes I$.
Then, only one prime ideal of $R(I)_{a,b}$ lies over a prime ideal of $R$, and this happens if and only if
$(\alpha - \beta)I \subseteq \bigcap\limits_{\mathfrak p {\rm \ prime}} \mathfrak p = (0)$, because $R$ is reduced; hence $\alpha - \beta \in {\rm Ann}(I)$. \\
$2)$ We need to prove that, if $R(I)_{a,b} \cong R \Join (\alpha - \beta)I$, then ${\rm Ann}(\alpha - \beta) \cap I=(0)$. If this does not happen, $R(I)_{a,b}$ is not reduced by Proposition \ref{reduced} and this yields a contradiction, since the amalgamated duplication is reduced if $R$ is.
\end{proof}

The next example shows that in the subfamily studied in this section there are rings that are not isomorphic neither to an idealization nor to an amalgamated duplication.

\begin{ex} \label{esempio 2} \rm
Consider $R=k[X,Y]/(XY)$ and $I=(x,y)$, where $k$ is a field with ${\rm char} \ \! k \neq 2$ and $x,y$ denote the images of $X,Y$ in $R$.
Set $\alpha = y-r$ and $\beta = -y -r$ with $r \in R$, thus,
$(t-\alpha)(t-\beta)=t^2+2rt+r^2-y^2$.
We have $\alpha - \beta=2y \notin {\rm Ann}(I)$ and
$x \in {\rm Ann}(\alpha - \beta) \cap I$, then $R(I)_{2r,r^2-y^2}$ has two different minimal prime ideals by Lemma \ref{ideals} and Proposition \ref{minimal primes}; consequently, it cannot be isomorphic to an idealization.
Moreover, since ${\rm Ann}(\alpha - \beta) \cap I \neq (0)$, Proposition \ref{reduced} implies that $R(I)_{2r,r^2-y^2}$ is not reduced and, therefore, it is not isomorphic to an amalgamated duplication.
\end{ex}

If $R$ is not reduced, the first part of Corollary \ref{idealization and duplication} does not hold, as it is shown in the next example.

\begin{ex} \rm
Consider $R={\mathbb Z}/2^n {\mathbb Z}$. The non units of $R$ are the classes represented by $2^\alpha m$ with $\alpha \geq 1$ and $m$ odd. Then, the square of any ideal is annihilated by $2^{n-2}$. This means that for any ideal $I$ one has
$R[It]/I^2 (t^2+2^{n-2}t) = R[It]/I^2 (t^2) \cong R \ltimes I$.
Moreover, if we choose $I=(2)$ we have $2^{n-2} \notin {\rm Ann}(I)$.
\end{ex}

\subsection{Quasi-Gorenstein rings}

Let $(R, \mathfrak m)$ be a $d$-dimensional local ring. A finitely generated $R$-module $\omega_R$ is said to be a canonical module of $R$ if $\omega_R \otimes_R \widehat{R} \cong {\rm Hom}_R(H^d_{\mathfrak m}(R), E(R/\mathfrak m))$, where $H^d_{\mathfrak m}(R)$ denotes the $d$-th local cohomology module of $R$ with support in $\mathfrak m$ and $E(R/\mathfrak m)$ is the injective hull of $R/\mathfrak m$.
If the canonical module $\omega_R$ exists, it is unique up to isomorphism. In this case the ring $R$ is said to be quasi-Gorenstein if its canonical module is a rank one free $R$-module, see \cite{TT} and references therein for other characterizations and properties of quasi-Gorenstein rings.
In \cite{A2}, Aoyama characterizes when idealization is quasi-Gorenstein, while Bagheri, Salimi, Tavasoli and Yassemi do the same for amalgamated duplication in \cite{BSTY}. In this subsection we generalize these results to all the rings of the family $R(I)_{a,b}$ for which $t^2+at+b$ is reducible in $R[t]$.
We start by recalling a lemma that we will use in Theorem \ref{quasi Gorenstein}.

\begin{lem} \label{Completion} {\cite[Remark 1.7]{BDS2}}
Let $R$ be a noetherian local ring.
Then $\widehat{R(I)_{a,b}} \cong \widehat{R}(\widehat{I})_{a,b}$ as $\widehat{R}$-algebra.
\end{lem}

In this section we consider $R$ as an $R(I)_{a,b}$-module with scalar
multiplication $(s+jt)r= rs+rj \alpha $ as in Remark \ref{hom}.

\begin{lem}
If ${\rm Ann}(I)=(0)$, then
$I \cong {\rm Hom}_{R(I)_{a,b}}(R,R(I)_{a,b})$ as $R$-modules.
\end{lem}

\begin{proof}
For any $r \in R$ and $i \in I$ we set $g_i : R \rightarrow R(I)_{a,b}$ with $g_i(r)=ri \beta - rit$,
that is an homomorphism of $R(I)_{a,b}$-modules. Consider the map
$$
\varphi : I \rightarrow {\rm Hom}_{R(I)_{a,b}}(R,R(I)_{a,b}), \ i \mapsto g_i;
$$
it is easy to prove that this is an injective homomorphism of $R$-modules.

We claim that $\varphi$ is also surjective.
Consider $h \in {\rm Hom}_{R(I)_{a,b}}(R,R(I)_{a,b})$, clearly this is determined by
$h(1) = s + jt$ where $s \in R$ and $j \in I$.
Since $h$ is an homomorphism of $R(I)_{a,b}$-modules, for any $i \in I$ we have
$$
rs+rjt = r h(1)=h(r) = h(r-i \alpha + i \alpha) =
h((r-i \alpha + it) \cdot 1) =
$$
$$
=(r-i \alpha + it)h(1)=
(r-i \alpha + it)(s+jt)=
$$
$$
 = rs - i\alpha s- ij \alpha \beta +
(rj - ij \alpha + si + ij \alpha + ij \beta) t,
$$
then, $h$ is well defined only if for any $i \in I$

$$
\begin{cases}
i(-s \alpha -j \alpha \beta)=0 \\
i(s+j \beta)=0
\end{cases}
$$
and this implies that $s=-j \beta$ because ${\rm Ann}(I)=(0)$.
Hence $h=g_{-j}$ and $\varphi$ is an isomorphism.
\end{proof}

The following result is a generalization of \cite[Theorem 2.11]{A2} and \cite[Theorem 3.3]{BSTY}. The idea of the first implication is essentially the same of \cite{A2} and \cite{BSTY}, but it requires the previous two lemmas and Proposition \ref{Sn}. We recall that an ideal of $R$ is said to be a canonical ideal if it is a canonical module of $R$.

\begin{thm} \label{quasi Gorenstein}
Let $R$ be a noetherian local ring and suppose that $I$ is regular. Then, $R(I)_{a,b}$ is quasi-Gorenstein if and only if $\widehat{R}$ satisfies Serre's condition $(S_2)$ and $I$ is a canonical ideal of $R$.
\end{thm}

\begin{proof}
If $R(I)_{a,b}$ is quasi-Gorenstein, it is well known that also $\widehat{R(I)_{a,b}} \cong \widehat{R}(\widehat{I})_{a,b}$ is quasi-Gorenstein. Consequently, since a canonical module always satisfies the condition $(S_2)$ (see \cite[Theorem 12.1.18]{BS}), it follows that $\widehat{R}(\widehat{I})_{a,b}$ satifies $(S_2)$ and, in the light of Proposition \ref{Sn}, also $\widehat{R}$ satisfies $(S_2)$. Moreover, since we have an homomorphism $R(I)_{a,b} \rightarrow R$ (see Remark \ref{hom}), it follows from \cite[Satz 5.12]{HK} (or \cite[Theorem 1.2]{A2}) and the previous lemma that ${\rm Hom}_{R(I)_{a,b}}(R,R(I)_{a,b}) \cong I$ is a canonical module.

Conversely, using again \cite[Satz 5.12]{HK}, we get that a canonical modules of $R(I)_{a,b}$ is ${\rm Hom}_R(R(I)_{a,b},I)$, because $I$ is a canonical ideal of $R$. To prove that $R(I)_{a,b}$ is quasi-Gorenstein we only need to show an isomorphism $\varphi: R(I)_{a,b} \rightarrow {\rm Hom}_R(R(I)_{a,b},I)$. To this aim, we set $f_{r+it}(s+jt)=rj+i(s-ja) \in I$ and $\varphi(r+it)=f_{r+it}$. To check that this is an isomorphism, it is possible to follow the same proof of \cite[Proposition 2.1]{BDS2}, bearing in mind that for the surjectivity one can use that $(I:I) \hookrightarrow {\rm Hom}_R(I,I) \cong R$, because $\widehat{R}$ satisfies Serre's condition $(S_2)$, see \cite[Proposition 2]{A}.
\end{proof}

\begin{rem} \rm
We notice that by the proof above, if $R$ satisfies the Serre's condition $(S_2)$ and $I$ is a canonical ideal, then $R(I)_{a,b}$ is quasi-Gorenstein even if $t^2+at+b$ is not reducible in $R[t]$.
\end{rem}


\section{\@ifstar{\starsection}{\nostarsection}}
\newcommand\nostarsection[1]
{\sectionprelude\origsection{#1}\sectionpostlude}
\newcommand\starsection[1]
{\sectionprelude\origsection*{#1}\sectionpostlude}

\newcommand\sectionprelude{%
}
\newcommand\sectionpostlude{%
}

\let\origsubsection\subsection
\renewcommand\subsection{\@ifstar{\starsubsection}{\nostarsubsection}}
\newcommand\nostarsubsection[1]
{\subsectionprelude\origsubsection{#1}\subsectionpostlude}
\newcommand\starsubsection[1]
{\subsectionprelude\origsubsection*{#1}\subsectionpostlude}

\newcommand\subsectionprelude{%
}
\newcommand\subsectionpostlude{%
}
\makeatother

\setlength{\skip\footins}{6pt}

\AtBeginDocument{%
  \providecommand\BibTeX{{%
    \normalfont B\kern-0.5em{\scshape i\kern-0.25em b}\kern-0.8em\TeX}}}

\newcommand{\squishlist}{
   \begin{list}{$\bullet$}
    { \setlength{\itemsep}{0pt}      \setlength{\parsep}{3pt}
      \setlength{\topsep}{3pt}       \setlength{\partopsep}{0pt}
      \setlength{\leftmargin}{1.3em} \setlength{\labelwidth}{1.3em}
      \setlength{\labelsep}{0.5em} } }

\newcommand{\squishend}{
  \end{list}  }

\renewcommand\floatpagefraction{.99}
\renewcommand\topfraction{.99}
\renewcommand\bottomfraction{.99}
\renewcommand\textfraction{.01}
\renewcommand\dblfloatpagefraction{.95}
\renewcommand\dbltopfraction{.95}

\renewcommand{\theenumi}{\Alph{enumi}}

\newcommand{\mathbb{B}}{\mathbb{B}}
\newcommand{\mathbf{m}}{\mathbf{m}}
\newcommand{\mathbf{m}^\prime}{\mathbf{m}^\prime}
\newcommand{\mathbf{m}^{new}}{\mathbf{m}^{new}}
\newcommand{\mathbb{N}}{\mathbb{N}}
\newcommand{\ensuremath{\overline{A}}}{\ensuremath{\overline{A}}}
\newcommand{\lbrack \!\, \shortmid \!}{\lbrack \!\, \shortmid \!}
\newcommand{\! \shortmid  \!\, \rbrack}{\! \shortmid  \!\, \rbrack}
\newcommand{\eval}[1]{[\![ #1 ]\!]}

\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\ding{55}}{\ding{55}}

\newcommand{\mathbb{R}}{\mathbb{R}}
\newcommand{\mathbb{Q}}{\mathbb{Q}}
\newcommand{\mathbb{Z}}{\mathbb{Z}}
\newcommand{\N}{{\mathbb{N}}}
\usepackage{amsmath}
\DeclareMathOperator*{\textnormal{arg}\max}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

\newcommand{\vspace{-0.15cm}}{\vspace{-0.15cm}}

\copyrightyear{2020}
\acmYear{2020}
\setcopyright{acmcopyright}\acmConference[SEAMS '20]{IEEE/ACM 15th International Symposium on Software Engineering for Adaptive and Self-Managing Systems}{October 7--8, 2020}{Seoul, Republic of Korea}
\acmBooktitle{IEEE/ACM 15th International Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS '20), October 7--8, 2020, Seoul, Republic of Korea}
\acmPrice{15.00}
\acmDOI{10.1145/3387939.3391568}
\acmISBN{978-1-4503-7962-5/20/05}

\begin{document}

\title{Towards Bridging the Gap between\\Control and Self-Adaptive System Properties}

\author{Javier C\'amara}
\affiliation{ \institution{University of York, UK}}
\email{<EMAIL>}
\author{Alessandro V. Papadopoulos}
\affiliation{ \institution{M\"alardalen University, Sweden}}
\email{<EMAIL>}
\author{Thomas Vogel}
\affiliation{ \institution{Humboldt University Berlin, Germany}}
\email{<EMAIL>}
\author{Danny Weyns}
\affiliation{ \institution{\mbox{KU Leuven, Belgium; Linnaeus, Sweden}}}
\email{<EMAIL>}
\author{David Garlan}
\affiliation{ \institution{Carnegie Mellon University, USA}}
\email{<EMAIL>}
\author{Shihong Huang}
\affiliation{ \institution{Florida Atlantic University, USA}}
\email{<EMAIL>}
\author{Kenji Tei}
\affiliation{ \institution{Waseda University, Japan}}
\email{<EMAIL>}

\renewcommand{\shortauthors}{C\'amara et al.}

\begin{abstract}
Two of the main paradigms used to build adaptive software employ different types of properties to capture relevant aspects of the system's run-time behavior. On the one hand, control systems consider properties that concern static aspects like stability, as well as dynamic properties that capture the transient evolution of variables such as settling time. On the other hand, self-adaptive systems consider mostly non-functional properties that capture concerns such as performance, reliability, and cost. In general, it is not easy to reconcile these two types of properties or identify under which conditions they constitute a good fit to provide run-time guarantees. There is a need of identifying the key properties in the areas of control and self-adaptation, as well as of characterizing and mapping them to better understand how they relate and possibly complement each other. In this paper, we take a first step to tackle this problem by: (1)~identifying a set of key properties in control theory, (2)~illustrating the formalization of some of these properties employing temporal logic languages commonly used to engineer self-adaptive software systems, and (3)~illustrating how to map key properties that characterize self-adaptive software systems into control properties, leveraging their formalization in temporal logics. We illustrate the different steps of the mapping on an exemplar case in the cloud computing domain and conclude with identifying open challenges in the area.
 \end{abstract}

\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10011007.10010940.10011003</concept_id>
<concept_desc>Software and its engineering~Extra-functional properties</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10011007.10011074.10011099.10011692</concept_id>
<concept_desc>Software and its engineering~Formal software verification</concept_desc>
<concept_significance>300</concept_significance>
</concept>
</ccs2012>
\end{CCSXML}

\ccsdesc[500]{Software and its engineering~Extra-functional properties}
\ccsdesc[300]{Software and its engineering~Formal software verification}
\keywords{self-adaptation, control theory, nonfunctional requirements}

\maketitle

\section{Introduction}

Two of the main paradigms used to build adaptive software employ different types of properties to capture relevant aspects of the system's run-time behavior. On the one hand, control systems consider properties that concern static aspects like stability, as well as dynamic properties that capture transient aspects such as settling time. On the other hand, self-adaptive systems consider mostly non-functional properties that include concerns such as performance, cost, and reliability.

Self-adaptive software can clearly benefit from the potential that control theory provides in terms of enabling better analyzability and enforcement of constraints on run-time system behavior.
Being able to formally reason about the non-functional concerns of a system (e.g., security, energy, performance) in terms of control properties in the presence of an unpredictable environment can optimize operation and improve the level of assurances that engineers can provide about the systems they build.

However, applying control theory to software systems poses a set of challenges that do not exist in other domains~\cite{Filieri:2017,TSE.2017.2704579}.
One of the main challenges is that control-based solutions demand the availability of precise mathematical models that capture both the dynamics of the system under control, as well as the properties that engineers want to impose and reason about.
When control is applied to physical plants, the laws that govern the system are captured by accurate mathematical models that are well-understood, and relevant properties like stability or performance are formally characterized by definitions that are precise and standard in the control community~\cite{astrom2010feedback}.

While obtaining accurate models of non-functional aspects of software behavior can to some extent be achieved using different methods like {\em system identification}~\cite{6213241}, the self-adaptive software systems community still lacks a standard repertoire of run-time properties formally characterized in a way that makes them amenable to formal analysis using techniques applied by software engineers in self-adaptive systems (e.g., run-time verification, model checking). Having such a repertoire would not only help individual system designers express and check certain common fundamental properties, but also help promote norms for system assurance across the community of adaptive systems developers.

Solving in software the kind of problems that control theory solves in other domains entails understanding how control properties relate to software requirements and formally characterizing such properties in a way that facilitates their instantiation and automated analysis using standard tools.

To advance the understanding of how self-adaptive system requirements relate to control properties, in this paper we: (1)~identify a set of key properties in control theory, (2)~illustrate the formalization of some of these properties employing temporal logic languages commonly used to engineer self-adaptive software systems, and (3)~indicate how to map key properties that characterize self-adaptive software systems into control properties, leveraging their formalization in temporal logics. We illustrate the different steps of the mapping on an exemplar case in the cloud computing domain and conclude with identifying open challenges in the area.

\section{Background}
\label{sec:background}

In this section, we first present a basic set of concepts in control systems, followed by a description of a general class of discrete abstractions which are employed to capture the non-functional behavior of self-adaptive systems at run time.

\subsection{Control Terminology}
In this paper, we focus mainly on continuous-time signals and systems, but equivalent definitions are present in the case of discrete-time~\cite{astrom2010feedback}.

\begin{figure}[h]
\centering
\resizebox{0.95\columnwidth}{!}{
\input{./img/controlSynthesisScheme.tex}
}
\caption{Control scheme.}
\label{fig:controlSynthesisScheme}
\end{figure}

First, consider the control scheme represented in Figure~\ref{fig:controlSynthesisScheme}. The two main blocks represent the \textbf{Controller} and the \textbf{Plant} respectively. The Plant is the object that we want to control. Let $t\in \mathbb{R}$ be the continuous-time, where $\mathbb{R}$ indicates the real numbers; all the signals that are introduced next are functions of the time $t$. The $m$ \textbf{inputs} of the plant are represented as $u(t) \in \mathbb{R}^m$, and in computing systems are typically referred as \emph{control parameters}, or \emph{tuning parameters}. The $p$ \textbf{outputs} of the plant are typically represented as $y(t) \in \mathbb{R}^p$, and in computing systems are typically referred as \emph{measurements} or \emph{sensors data}.

For every output $y(t)$ of the plant, one defines a desired behavior for it, which in control terms is called a \textbf{setpoint} or \textbf{reference signal}, and is represented by $y^{\circ}(t) \in \mathbb{R}^p$.

The difference between the desired behavior and the actual behavior of the plant is called \textbf{error}, and is represented as $e(t) \in \mathbb{R}^p$:
\centerline{
$ e(t) = y^{\circ}(t) - y(t).$
}

The controller is a decision-making mechanism that given the error, decides what is the value of the \textbf{control signal} $\tilde{u}(t) \in \mathbb{R}^m$ in order to make the error converge to zero. In principle, the control signal and the plant input should be the same, i.e., $\tilde{u}(t) = u(t)$, but in practice, there might be a \textbf{load disturbance} $l(t) \in \mathbb{R}^m$, that affects the controller decision. Therefore, it holds that\\
\centerline{
$u(t) = \tilde{u}(t) + l(t).$
}
The load disturbance is one of the main disturbances that affect the performance of control systems.

In addition, there might be a disturbance that is acting directly on the output of the plant, which is called \textbf{output disturbance}, and it is represented as $d(t) \in \mathbb{R}^p$. Finally, there is  \textbf{noise} $n(t) \in \mathbb{R}^p$ that affects the measurements that one takes of the output. These two last sources of disturbances are typically ``high-frequency'' disturbances, and can be counteracted by a suitable filtering at design time of the controller.

As a main reference to these concepts, the interested reader can refer to the publicly available book by {\AA}str{\"o}m and Murray~\cite{astrom2010feedback}.

\subsection{Discrete Models}
\label{sec:discretemodel}
We {\it consider the self-adaptive system as a black-box on which a set of output variables can be monitored over time}. Concretely, we model the non-functional run-time behavior of a self-adaptive system as a transition system that captures the evolution over time of a set of relevant variables (i.e., state is characterized by a collection of $n$ real-valued random variables $Y=\{y_1, \ldots, y_n\}$).
{\it These variables can be considered to be analogous to the outputs $y(t)$ in a control system}.
Sampling these variables in space and time results in their quantization and time discretization.

Let $[\alpha_i, \beta_i]$ be the range of $y_i$, with $\alpha_i, \beta_i \in \mathbb{R}$, and $\eta_i \in \mathbb{R}^+$ be its quantization parameter. Then, $y_i$ takes its values in the set:
\begin{center}
$ [\mathbb{R}]_{y_i}=\left\{r : \mathbb{R} \,\,\left| \; r=k \eta_i ,\; k \in\mathbb{Z} , \; \alpha_i \leq r \leq \beta_i \right.\right\}$.
\end{center}

Hence, given an observed value of $y_i$ at time $t$ (denoted as $y_i(t))$, the corresponding quantized value is obtained as:

\centerline{$quant(y_i(t))= \min (\displaystyle \argmin_{r \in [\mathbb{R}]_{y_i}   }(|y_i(t) - r|)$).}
Variables in $Y$ define a state-space $ [\mathbb{R}^n]_{Y}=[\mathbb{R}]_{y_1} \times \ldots \times [\mathbb{R}]_{y_n}$.
Furthermore, we assume a time discretization parameter $\tau \in \mathbb{R}^+$ associated with the sampling period established for the observation of variables, determining the transition time.

\begin{figure}[h]
\centering
\resizebox{0.9\columnwidth}{!}{
\input{img/discretemodel}
}
\caption{Discrete quantized vs continuous output.}
\label{fig:discretemodel}
\end{figure}

Figure~\ref{fig:discretemodel} compares an arbitrary continuous system output $y(t)$ with its quantized counterpart $y_q(t)$\footnote{For convenience, we write in the following $y_q(t)$ instead of $quant(y(t))$.} in the discrete timeline.
$y_q(t)$ takes values only in multiples of $\eta_y$, and is represented in the figure as constant for intervals of duration $\tau$.

Discrete models can be enriched with rewards and costs that help capture quantitative aspects of system behavior (e.g., elapsed time, energy consumption, cost) in a precise manner.
These rewards can be employed as building blocks to reason about properties that capture quantitative aspects of system behavior over time.

A {\it reward structure} is a pair $(\rho,\iota)$, where $\iota :  [\mathbb{R}^n]_{Y} \rightarrow \mathds{R}_{\geq 0}$ is a function that assigns rewards to system states, and $\rho:  [\mathbb{R}^n]_{Y} \times  [\mathbb{R}^n]_{Y} \rightarrow \mathds{R}_{\geq 0}$ is a function assigning rewards to transitions.

State reward $\iota(s)$ is acquired in state $s \in  [\mathbb{R}^n]_{Y}$ per time step, that is, each time that the system spends one time step in $s$, the reward accrues $\iota(s)$. In contrast, $\rho(s,s')$ is the reward acquired every time that a transition between $s$ and $s'$ occurs.

For illustration purposes, we assume that rewards are defined as sets of pairs  $(pd, r)$, where $pd$ is a predicate over states $[\mathbb{R}^n]_{Y}$, and $r \in \mathds{R}_{\geq 0}$ is the accrued reward when $s \in  [\mathbb{R}^n]_{Y} \models pd$.
If the pair  $(pd, r)$ corresponds to a transition reward, the reward is accrued when a transition from a source state $s \in  [\mathbb{R}^n]_{Y} \models pd$ occurs.

\section{Illustration Exemplar: {RUBiS}}
\label{sec:example}

We illustrate our formalization of properties on RUBiS~\cite{rubis}, an open-source application that implements the functionality of an auctions website.
Figure~\ref{fig:rubis-arch} depicts the architecture of RUBiS, which consists of a web server tier that receives requests from clients using browsers, and a database tier that acts as a data provider for the web tier.
The system also includes a load balancer to distribute requests among web servers using a round-robin policy.
When a web server receives a page request from the load balancer, it accesses the database to obtain the data required to render dynamic page content.
The only relevant property of the operating environment that we consider in this scenario is the request arrival rate prescribed by the workload induced on the system.

\begin{figure}[!htbp]
    \centering
    \psfrag{c0}{$c_0$} \includegraphics[width=0.8\linewidth]{img/arch}
    \caption{RUBiS architecture.}
    \label{fig:rubis-arch}
\end{figure}

The system includes two actuation points that can be operationalized by a controller to make the system self-adaptive and deal with the changing request arrival rate:

\noindent $\bullet$ {\em Server Addition/Removal}. Server addition has an associated latency, whereas the latency for server removal is assumed to be negligible.

\noindent $\bullet$ {\em Dimmer}. The version of RUBiS used for our comparison follows the {\em brownout} paradigm~\cite{DBLP:conf/icse/KleinMAH14}, in which the response to a request includes mandatory content (e.g., the details of a product), and optional content such as recommendations of related products.
A {\em dimmer} parameter (taking values in the interval $[0,1]$) can be set to control the proportion of responses that include optional content.
The goals of the target system are summarized in two functional and three
non-functional requirements (Table~\ref{tab:reqs}).

\begin{table}[!h]
\centering
{\footnotesize
\caption{Requirements for RUBiS.}
\label{tab:reqs}
\setlength\tabcolsep{1pt}
{
\begin{tabular}{lp{7.8cm}}
\hline
\multicolumn{2}{c}{\bf Functional Requirements} \\
\hline
{\bf R1} & The target system shall respond to every request for serving its content. \\
{\bf R2}& The target system shall serve optional content to the connected clients.  \\
\hline
\multicolumn{2}{c}{\bf Non-Functional Requirements} \\
\hline
{\bf NFR1}& The target system shall demonstrate high performance. The average
response time $r$ should not exceed $T$. \\

{\bf NFR2}& The target system shall provide high availability of the optional content.
Subject to NFR1, the percentage of requests with optional content (i.e., the dimmer
value $d$) should be maximized. \\

{\bf NFR3}& The target operating system shall operate under low cost. Subject to NFR1
and NFR2, the cost (i.e., the number of servers $s$) should be minimized. \\
\hline
\end{tabular}
}
}
\vspace{-0.15cm}
\end{table}

There is a strict preference order among the non-functional requirements that deal with
optimization, so trade-offs among different dimensions to be optimized are not
possible (i.e., no solution should compromise maximizing the percentage
of requests with optional content to reduce cost).
The imposition of a preference order is aimed at better capturing real scenarios and is not a limitation imposed by any of the compared approaches, which are also able to capture non-strict preference orders among requirements.

\section{Characterizing Control Properties}
\label{sec:ctprops}

Control systems are usually concerned about four main objectives~\cite{Filieri:2017}, namely: (a)~{\em setpoint tracking}, which is related to achieving the specified setpoint whenever it is reachable, (b)~{\em transient behavior}, concerned about how setpoints are reached, in particular in the presence of abrupt changes, (c)~{\em robustness to inaccurate or delayed measurements}, related to the ability of a controller to behave correctly even when transient errors or delayed data is provided to it, and (d)~ {\em disturbance rejection}, related to the ability of avoiding any effect of external interferences on system goals.
These high level objectives can be mapped in control theory into the satisfaction {\em by design} of properties like {\em stability}, {\em guaranteed settling time}, {\em integrated squared error}, that relate to the achievable runtime performance of the control system.
In this section, we describe these properties, going from their mathematical formulation into their characterization in temporal logics commonly used in formal verification like LTL~\cite{DBLP:conf/focs/Pnueli77}, CTL~\cite{DBLP:conf/lop/ClarkeE81}, and PCTL~\cite{DBLP:journals/fac/HanssonJ94}. Other properties exist in control theory, but having a complete catalogue here is beyond the scope of this paper, and it is left as future work.

\subsection{Stability}

The concept of \textit{stability} in control theory differs from the notion of stability used in self-adaptive software. A control system is stable even if the error $e(t)$ is not converging to zero, but it is bounded. More specifically, in control terms, if the initial value of system output $y(0)$ is ``close'' to the equilibrium value $y^{\circ}$, then the evolution over time of the output $y(t)$ will be bounded (and not diverge) from $y^{\circ}$. More formally:
\begin{equation}
stby \equiv \forall \epsilon>0 \; \exists\delta(\epsilon) \; | \; \| y(0) - y^{\circ} \|<\delta(\epsilon) \Rightarrow \| y(t) - y^{\circ} \|<\epsilon, \forall t > 0  \label{eqn:stability}
\end{equation}
A system is \textit{asymptotically stable}, if it is stable (as per the previous definition), and also if the evolution over time of the system output will eventually converge to $y^{\circ}$. More formally:
\begin{equation}
    as\_stby \equiv stby \land \lim_{t \to \infty} \| y(t) - y^{\circ} \| = 0
\end{equation}

\begin{figure}[h]
\centering
\resizebox{0.9\columnwidth}{!}{
\input{img/stability}
}
\caption{Example of system output stabilization.}
\label{fig:stability}
\end{figure}
Figure~\ref{fig:stability} shows the response of a system that eventually stabilizes within an error band (gray box) of width $2\epsilon$.

\medskip
\noindent{\bf Characterization in Temporal Logic}. Characterizing stability in temporal logic requires capturing the constraints imposed by the definition of stability given in Expression~\ref{eqn:stability}.
Such characterization can be given on a quantized version of the variables and constants required to define stability:
\begin{equation}
[stby] \equiv \| y_q - y^{\circ}_q \| < \delta_q \Rightarrow \Box (\| y_q - y^{\circ}_q \| < \epsilon_q)
\label{tl:stability}
\end{equation}
In Expression~\ref{tl:stability}, the subscript $q$ indicates that the constant or variable on which it appears is the quantized version of its continuous counterpart (i.e., $y_q(t) \equiv quant(y(t))$, cf. Section~\ref{sec:discretemodel}).
It is worth noticing that variables in a software system are quantized by definition, and requiring a notion of asymptotic stability may be too restrictive. The current definition captures the same concept with $\epsilon_q$ being the resolution of the quantization or a tolerance parameter.
Moreover, the absence of explicit time indexes is consistent with the implicit notion of time introduced by the temporal operators.
For instance, when $y_q$ is not within the scope of any temporal operator (like in the antecedent of the implication given in the formula), the expression refers to the value of the variable in the first state of the trace (i.e.,  $y_q \equiv y_q(0)$).
However, if the same term is within the scope of a temporal operator as it happens with the $\Box$ on the right-hand side of the expression, then the same $y_q$ refers to the value of $y_q(t)$ in all subsequent states of the discrete temporal line (i.e., $y_q(t)$ when $t=0, \tau, 2\tau, \dots$). The non-probabilistic version of this property is directly expressible in LTL and CTL (as ${\sf \bf A}[stby]$), whereas its probabilistic version can employ the probability quantifier of PCTL (e.g., $P_{=?}[stby]$, $P_{\leq b}[stby]$).

\noindent {\bf Instantiation in RUBiS.} Expression~\ref{tl:stabilityrub} instantiates $[stby]$, in a straightforward manner for the response time variable $r$, assuming a setpoint equivalent to the threshold $T$. It states that when the error becomes smaller than $\delta^r_q$ it will stay within the band $[T-\epsilon^r_q,T+\epsilon^r_q]$.
\begin{equation}
 \| r_q - T \| < \delta^r_q \Rightarrow \Box (\| r_q - T \| < \epsilon^r_q)
\label{tl:stabilityrub}
\end{equation}

\subsection{Settling Time}
\label{sec:settlingtime}
One of the key indicators of how the system reaches its goals is \textit{settling time} $t_s$, which is the time needed by the system to reach a new steady-state equilibrium.

For an arbitrary $\epsilon \in \mathds{R}^+$, the \textit{$\epsilon$-settling time} is defined by:
\begin{equation}
t_{s,\epsilon} \equiv \inf \{\delta \; {\text s.t.} \; \|y(t) - y^{\circ}\| < \epsilon, \forall t \in [\delta, \infty]\}
\label{eqn:settlingtime}
\end{equation}

In Expression~\ref{eqn:settlingtime}, the settling time is captured as the infimum of the set of time values in the continuous timeline for which the error is bounded by $\epsilon$ in the following.
Note that the infimum is the greatest lowest bound that always exists, meaning that it takes the value $\infty$ if the stability condition is never satisfied.

\noindent{\bf Characterization in Temporal Logic}. In contrast with stability, which is a boolean property that is either satisfied by the system or not (Expression~\ref{tl:stability}), settling time is a quantitative property and therefore we characterize it as a temporal logic expression that employs a reward quantifier.
Since in this case the reward captures time, we assume the existence of a transition reward function ${\sf [time]} \equiv (true, \tau)$ that accrues the time quantum employed for time in the discrete model whenever a transition in the discrete timeline is taken:
\begin{equation}
[t_{s,\epsilon}] \equiv {\sf R^{[time]}_{=?}}[\Diamond \Box  \| y_q - y^{\circ}_q \| < \epsilon_q]
\label{tl:settlingtime}
\end{equation}
Expression~\ref{tl:settlingtime} characterizes the settling time as the time reward accrued until the system reaches a state from which the error is bounded by $\epsilon_q$.
There are two aspects of this characterization that are important to highlight.
First, the reachability formula accrues reward until it reaches a state that satisfies the reachability predicate, but the reward in the latter state is not included.
Second, when the reachability predicate is not satisfied, the semantics of the reward quantifier assign an infinite reward as the value that is obtained when the expression is quantified (e.g., in PCTL, co-safe LTL with rewards).
These two aspects make this characterization consistent with the definition given in Expression~\ref{eqn:settlingtime}, which defines the settling time as the time instant immediately prior to the one in which the error is already bound by $\epsilon$, and becomes infinite if the error is not always bound by $\epsilon$, starting at some arbitrary point in the timeline.
Note that, due to the nesting of temporal operators including $\Box$, this property is not (currently) directly expressible in temporal logics with Markovian rewards as implemented in probabilistic model checkers like PRISM~\cite{DBLP:conf/cav/KwiatkowskaNP11} and Storm~\cite{DBLP:conf/cav/DehnertJK017}. However, assuming finite traces in our discrete models, we can perform a preprocessing step on the traces, labeling explicitly states from which $\Box \| y_q - y^{\circ}_q \| < \epsilon_q$ as $p$, and then model check the property as:
\begin{equation}
{\sf R^{[time]}_{=?}}[\Diamond p] \label{tl:simpler}
\end{equation}

\noindent {\bf Instantiation in RUBiS.} Expression~\ref{tl:settlingtimerubis} instantiates $[t_{s,\epsilon}] $ with similar assumptions to those adopted for Expression~\ref{tl:stabilityrub}.
\begin{equation}
{\sf R^{[time]}_{=?}}[\Diamond \Box  \| r_q - T \| < \epsilon^r_q]
\label{tl:settlingtimerubis}
\end{equation}

\subsection{Integrated Squared Error}
\label{sec:ise}
Relevant quantitative measures of a system's performance are also often based on the behavior of the error $e(t)$.
We consider here as a representative index the {\em integrated squared of the error} (ISE):
\begin{equation}
\text{ISE} \equiv \int_{0}^T e^2(t) \mathrm{d}t
\label{eqn:ise}
\end{equation}
The ISE integrates the square of the error over time (see Figure~\ref{fig:ise}), penalizing large errors more than smaller ones (the square of a large error will be much bigger).
Control systems specified to minimize ISE of the tracking error $e(t)$, e.g., MPC or LQG~\cite{camacho2004model}, tend to eliminate large errors quickly, but tolerate small ones persisting for a long period of time. This often leads to fast responses, but with considerably low-amplitude oscillation.

\begin{figure}[!h]
\centering
\resizebox{0.9\columnwidth}{!}{
\input{img/ise}
}
\caption{Illustration of the integrated squared error.}
\label{fig:ise}
\end{figure}

\medskip
\noindent{\bf Characterization in Temporal Logic}. Similar to the settling time, the ISE is a quantitative property and therefore we characterize it making use of a reward quantifier.
Since in this case the reward has to capture accrued error over time, we assume the existence of a transition reward function ${\sf [error]} \equiv (true, (\| y_q - y^{\circ}_q\|)^2)$ that accrues the square of the instantaneous error whenever a transition in the discrete temporal line is taken.

Then, we can write an expression that accrues the error reward over the discrete timeline before stability is achieved:
\begin{equation}
[ISE]  \equiv {\sf R^{[error]}_{=?}}[\Diamond \Box  \| y_q - y^{\circ}_q \| < \epsilon_q]
\label{tl:ise}
\end{equation}
Due to the nesting of $\Diamond \Box$, this property is not directly expressible in PCTL/Co-safe LTL with rewards. However, under the same assumptions described for the settling time property, a similar model preprocessing step can enable its practical verification through a simpler probabilistic reachability property (cf. Expression~\ref{tl:simpler}).

\noindent {\bf Instantiation in RUBiS}. We assume that RUBiS is working on steady state, but suddenly receives a spike on request arrival rate, causing the average response time $r$ to go above threshold $T$ (Figure~\ref{fig:iserubis}).
After violating the threshold, the system adds a server to drive down the response time below $T$.
Before the system stabilizes, its response time may experience some oscillations that make $r$ go above and below $T$ several times.
For simplicity, we assume $y^{\circ}=T$.

\begin{figure}[h]
\centering
\resizebox{0.9\columnwidth}{!}{
\input{img/iserubis}
}
\caption{Example of RUBiS performance response with accrued positive squared error.}
\label{fig:iserubis}
\end{figure}

To obtain an indication of how well the system is adapting, we can employ a modified version of the $[ISE]$ property (Expression~\ref{tl:ise}).
In this case, we are only interested in accruing a penalty whenever the output of the system is above the threshold $T$, therefore we adapt the reward structure for the error, constraining it to accrue reward only whenever $r>T$, i.e., ${\sf [penalty]} \equiv (r>T, (r-T)^2)$:
\begin{equation}
{\sf R^{[penalty]}_{=?}}[\Diamond \Box  \| r-T \| < \epsilon_q] \label{tl:iserubis}
\end{equation}
We can observe that the accrued error corresponds to the colored areas enclosed by $T$ and $r(t)$ in Figure~\ref{fig:iserubis}.
Since negative error (i.e., when $r<T$) does not constitute a violation of the response time threshold, we do not accrue it, in contrast with the more general property described in Expressions~\ref{eqn:ise} and~\ref{tl:ise}.

\section{Formalizing Non-Functional Requirements}

The non-functional run-time behavior of self-adaptive systems can be captured by an external observer as a set of quantitative indicators that represent attributes of different concerns such as performance, cost, or availability. In this section, we employ the characterization of control properties in temporal logic introduced in the previous section as building blocks to formalize non-functional requirements in RUBiS.

\noindent {\bf NFR1}. {\em The target system shall demonstrate high performance. The average response time $r$ should not exceed $T$.} This requirement can be captured by combining temporal logic properties of: (i)~stability as described by Expression~\ref{tl:stabilityrub}, (ii)~settling time as captured by Expression~\ref{tl:settlingtimerubis}, and (iii)~an integrated error property analogous to Expression~\ref{tl:iserubis} using the penalty,  ${\sf [penalty]} \equiv (r>T, r-T)$  which should be guaranteed to be always less or equal to zero, i.e.:
\begin{equation}
{\sf R^{[penalty]}_{=?}}[\Diamond \Box  \| r-y^{\circ}_r \| < \epsilon_q] \leq 0 \label{tl:iserubisnfr1}
\end{equation}
Note that in the expression above, the error term $\| r-y^{\circ}_r \|$ does not make the simplifying assumption included in Expression~\ref{tl:iserubis}, and incorporates an arbitrary setpoint different from $T$. This makes sense in a realistic setting because, if $y^{\circ}_r=T$, oscillations around the setpoint during transients would always result in response time threshold violations. This is also applicable to properties (i) and (ii) for this requirement.

\noindent {\bf NFR2}.{\em The target system shall provide high availability of the optional content. Subject to NFR1, the percentage of requests with optional content (i.e., the dimmer value $d$) should be maximized.} Capturing this requirement requires instantiating the integrated error property on variable $d$, which should be always as close as possible to 1 (maximum optional content):
\begin{equation}
{\sf R^{[optional]}_{=?}}[\Diamond \Box  \| 1-d_q  \| < \epsilon^ d_q]
\label{tl:ised}
\end{equation}
where ${\sf [optional]} \equiv (true, d)$. Note that in this case, the magnitude of the error is always below 1, so minimizing the non-squared error is a more sensible choice.

 \noindent {\bf NFR3}. {\em The target operating system shall operate under low cost. Subject to NFR1 and NFR2, the cost (i.e., the number of servers $s$) should be minimized.} The formalization of this requirement can be captured using the following properties defined over the response time variable $r$: (i)~stability as described by Expression~\ref{tl:stabilityrub}, (ii)~settling time as captured by Expression~\ref{tl:settlingtimerubis}. Finally, we can capture the penalty of using extra servers during the transient by employing an integral error property which should minimize the use of servers according to ${\sf [penalty]} \equiv (r>T, s^2)$:
 \begin{equation}
 {\sf R^{[penalty]}_{=?}}[\Diamond \Box  \| r_q-T  \| < \epsilon^ r_q]
 \label{tl:ised}
 \end{equation}
 Note that in this case, stability and settling time properties are defined over response time $r$, whereas penalty is defined over the number of servers employed $s$, making an interesting case in which formalizing a single requirement involves combining different control properties across variables.

All variables might present similar patterns in terms of control properties, but the composition of the self-adaptive properties is non-trivial and might be realized in different ways. As a consequence, there is a need to incorporate high-level compositional operators to enable joint evaluation of the requirements. Alternatively, we might want to express priorities in how specific properties should be achieved.

\section{Related Work}
\label{sec:related}

We have grouped related work in four parts: control applied to computing systems, automatically generated control solutions, verification of control properties, and evaluation of quality properties.

\vspace{2pt}\noindent\textbf{Control Applied to Computing System.} In 2004, Hellerstein et al. wrote a pioneering book on applying control theory to computing systems~\cite{Hellerstein:2004}.
Over the years, control-based approaches have been applied extensively to computing systems, mostly focussing on controlling lower-level resources. Abdelzaher et al. apply different types of controller models (e.g., PI and PID) to deal with performance requirements of servers~\cite{1200252}. Wang et al. present DEUCON that allocates local controllers to computing units that only coordinate with neighbors~\cite{4218578}. Stability analysis is based on the location of poles of the composite system's transfer function. Imes et al. present CoPPer, a control-theoretic approach that applies adaptive control to meet soft performance goals by manipulating hardware power limits~\cite{8831193}. In contrast, our work targets a mapping between classic control properties and typical software qualities.

\vspace{2pt}\noindent\textbf{Automatically Generated Control Solutions.}
To deal with the complexity of control theory, researchers have started investigating automatic generation of control solutions to adapt software~\cite{Filieri:2017, ShevtsovWM19,Weyns:2018}.
Filieri et al. introduce the push-button methodology (PBM) that automatically constructs a linear model of a software system for a PI controller to adapt the system for one setpoint goal~\cite{Filieri:2012}.
Shevtsov et al. propose a solution to control a software system for multiple goals, including an optimization goal~\cite{Shevtsov:2016}.
Maggio et al. apply model-predictive control (MPC) to software adaptation~\cite{Maggio:2017}, while Anagelopoulos et al. apply a requirements-driven approach with MPC~\cite{Angelopoulos:2018}. These approaches highlight properties that are important from a control-theoretic viewpoint, but this accounts for only one side of the problem we target in this paper, namely, a rigorous specification and verification of classic control properties.

\vspace{2pt}\noindent\textbf{Verification of Control Properties.} Some work exits on the formalisation and verification of properties of control systems. We highlight two representative examples.
Preuse and Hanisch apply model checking to verify safety, liveliness and deadlock properties of manufacturing control systems that are specified in temporal logic~\cite{5970316}.
Yan et al. use approximate bisimulation for comparing the similarity between a complex (continuous) cyber-physical system and a (discretized) higher level model of it~\cite{YanJLWZ16}. The authors illustrate the approach for a safety property. Our work complements these approaches by focusing on typical software quality properties and the formal mapping of these with control properties.

\vspace{2pt}\noindent\textbf{Evaluation of Quality Properties.}
A number of approaches zoom in on the evaluation of quality properties in self-adaptive systems.
Weyns and Ahmad~\cite{Weyns:2013} performed a systematic literature review identifying the  main quality properties considered in self-adaptation: efficiency/performance of the system (55\% of the studies), reliability (41\%), and flexibility (28\%).
Reinecke et al.~\cite{Reinecke:2010} propose a payoff metric to measure the ``success'' of adaptation. This metric is a user-defined function aggregating QoS metrics observed on the running system similarly to a utility function.
Villegas et al.~\cite{Villegas:2011} present a framework to evaluate adaptation properties, i.e., stability, accuracy, settling time, overshoot, robustness, termination of adaptation, consistency, scalability, and security.
The properties are informally defined and mapped to software qualities based on examples from literature.
Raibulet et al.~\cite{Raibulet:2017} focus on quality attributes to evaluate the utility of a self-adaptive system, and software metrics to evaluate the quality of the adaptation at runtime, whereas C\'amara and de Lemos~\cite{DBLP:conf/icse/CamaraL12} evaluate resilience properties formalized in PCTL.
Each of these approaches contributes to a better understanding of quality properties and their evaluation from a software engineering point of view. However, this only accounts for one side of the mapping problem we target in this paper, i.e., a traditional software engineering perspective.

\vspace{2pt}\noindent\textbf{Conclusion.}
While control theory and self-adaptive systems contribute knowledge about properties in their domain, there is little understanding on the mapping between the two types of properties, which is precisely the target of the research presented in this paper.

\section{Conclusions and Future Work}
\label{sec:roadmap}

In this paper, we have taken the first step in bridging the gap between control and self-adaptive system properties.
We have (1)~identified key properties in control theory (stability, settling time, and integral error),
(2)~formalized these properties in temporal logic languages, which are typically used to specify properties (requirements) of software systems,
and (3)~illustrated how non-functional properties of self-adaptive systems (performance, availability, and costs) can be mapped into these control properties by using this formalization and the RUBiS exemplar.
To achieve the formalization and mapping, we have discussed the abstraction of transition systems describing discrete state spaces on which self-adaptive system attributes are measured and how this abstraction is able to represent continuous system dynamics in which control properties are typically characterized.
Models of such transition systems and control properties formalized in a temporal logic can serve as input for off-the-shelf run-time verification tools and model checkers.

This approach advances the understanding of how non-functional requirements relate to control properties (e.g., which requirements can be characterized by which control properties) and paves the way for an improved operation and assurance of self-adaptive systems via formal reasoning (e.g., by run-time verification) based on control.
Our approach is currently limited by the set of control properties that we have formalized, requirements that we have mapped into control properties (cf. previous paragraph), and the expressiveness of temporal logics, which might not be able to fully capture the nuances of some control properties (cf. Section~\ref{sec:settlingtime}).

Our long-term goal is to understand whether control theory can be used as a formal foundation for specifying and analyzing self-adaptive systems, and if so, under which conditions. Towards that goal, work is needed to identify further corresponding and complementing properties between self-adaptive and control systems (e.g., whether real-time or security requirements can be mapped into control properties), and to leverage the formalization of properties for a formal assessment of controllers in self-adaptive systems (e.g., to provide guarantees for the correctness of controllers).

\balance
\bibliographystyle{ACM-Reference-Format}


\section{I. Experimental setup}

The experimental setup we used was a minor modification of the system used for our past studies \cite{Fukai.Takeuchi-PRL2017,*Fukai.Takeuchi-PRL2020} (see also \cite{Takeuchi.Sano-JSP2012}).
The convection cell consisted of a nematic liquid crystal sample, sandwiched between two parallel glass plates with transparent electrodes.
The material was $N$-(4-methoxybenzylidene)-4-butylaniline (TCI Chemicals), doped with 0.01~wt.\% of tetra-$n$-butylammonium bromide.
It was confined between two parallel glass plates coated with transparent electrodes (indium tin oxide), separated by spacers of thickness $12\unit{\mu{}m}$, which enclosed an observation area of roughly $17\unit{mm} \times 17\unit{mm}$.
The electrodes were coated with $N$,$N$-dimethyl-$N$-octadecyl-3-aminopropyltrimethoxysilyl chloride to realize the homeotropic alignment.
During the experiments, the temperature of the convection cell was kept constant at $25\unit{^\circ{}C}$, by using a hand-made thermocontroller and a thermally insulating chamber.
The thermally insulating chamber encloses the entire experimental setup and stabilizes the temperature inside roughly, by circulating water of a constant temperature.
The thermocontroller contains the convection cell and operates by a feedback-controlled Peltier element.
As a result, typical fluctuations of the temperature inside the thermocontroller were $0.01\unit{^\circ{}C}$ or smaller.

\begin{figure}[tb]
 \centering
 \includegraphics[clip,width=\hsize]{figS1.pdf}
 \caption{
Schematics of the optical systems for the flat (a) and Brownian (b) experiments.
1: ultraviolet band-pass filter.
2-5: mirror.
6: cylindrical lens.
7: dichroic mirror.
8: plano-convex lens and dichroic mirror (visible light pass).
9: plano-convex lens.
Nd:YAG pulsed laser (MiniLase, New Wave Research).
SLM: spatial light modulator (LCOS-SLM, X10468-05, Hamamatsu).
LED: light-emitting diode.
Convection cell: see the text.
Thermocontroller: hand-made, operating by feedback control of a Peltier element.
Objective (UplanFLN4x, Olympus).
CCD camera: charge-coupled device camera.
Note that the entire setup is contained in a thermally insulating chamber and the temperature inside is controlled to be constant.
}
 \label{fig-exp}
\end{figure}%

In the present work, we generated the growing DSM2 turbulence by shooting ultraviolet laser pulses to the convection cell, in the shape of a straight line (flat experiments) or a Brownian trajectory (Brownian experiments).
The schematics of the optical systems are shown in \figref{fig-exp}(a) and (b), respectively.
In both cases, the third harmonics ($355\unit{nm}$) of the Nd:YAG laser (MiniLase, New Wave Research) was used.
After the beam was attenuated and expanded, for the flat experiments, it was focused on a line by a cylindrical lens [6 in \figref{fig-exp}(a)].
For the Brownian experiments, the beam was sent to a spatial light modulator (LCOS-SLM, X10468-05, Hamamatsu) and to a plano-convex lens (9) to generate a holographic image on the focal plane [\figref{fig-exp}(b)].

\section{II. Finite-time corrections}

Here we test agreement with the Baik-Rains distribution quantitatively, by analyzing time dependence of the cumulants of the rescaled height.
The rescaled height $q(x,t)$ is defined by
\begin{equation}
    q(x,t) \equiv \frac{h(x,t) - v_\infty t}{(\Gamma t)^{1/3}} \simeq \chi + \mathcal{O}(t^{-1/3}).  \label{eq:q}
\end{equation}
Figure~\ref{fig-cum}(a) shows the difference between its $n$th-order cumulant $\cum{q^n}$ and that of the Baik-Rains distribution, $\cum{\chi_0^n}$, as functions of time, up to $n=4$.
We can see that the data for the third- and fourth-order cumulants (yellow diamonds and purple triangles, respectively) agree with those of the Baik-Rains distribution at late times, within the range of statistical errors (shades).
In contrast, the mean $\expct{q}$ (blue open circles) and the variance $\cum{q^2}$ (red squares) do not reach $\expct{\chi_0}$ and $\cum{\chi_0^2}$, respectively, though the difference is decreasing with increasing time.
Those differences are plotted in \figref{fig-cum}(b) and (c), respectively, in the log-log scales, with the same colors and symbols.
For the variance, we find $\cum{q^2} \simeq \cum{\chi_0^2} + \mathcal{O}(t^{-2/3})$ [\figref{fig-cum}(c)], which indicates convergence to the Baik-Rains variance in the limit $t\to\infty$.
Note that the finite-time correction of the variance was previously studied for the circular and flat KPZ subclasses, both experimentally \cite{Takeuchi.Sano-JSP2012} and theoretically \cite{Ferrari.Frings-JSP2011}, and the same exponent was obtained.

In contrast, the finite-time correction in the mean $\expct{q}$ [blue open circles in \figref{fig-cum}(b)] seems to show unusual behavior, decreasing significantly more slowly than the power law $t^{-1/3}$ expected from \eqref{eq:q}.
In fact, this can be understood by considering the next subleading term.
Suppose
\begin{equation}
 \expct{h(x,t)} \simeq v_\infty t + (\Gamma t)^{1/3} \expct{\chi} + A_1 + A_2 t^{-1/3}  \label{eq:Mean}
\end{equation}
The coefficient $A_2$ can be evaluated by the time dependence of the growth speed $\diff{\expct{h}}{t}$.
Hypothesizing that $\expct{\chi} = \expct{\chi_0} = 0$, we have
\begin{equation}
 \diff{\expct{h}}{t} \simeq v_\infty - \frac{A_2}{3}t^{-4/3}.  \label{eq:dhdt}
\end{equation}
This is exactly what we have seen in Fig.~3(b).
Therefore, we can estimate $A_2$ from the slope of the linear regression in Fig.~3(b), which gives $A_2 = 6.4(2)\unit{\mu{}m\cdot s^{1/3}}$.
Using this, we define the following, refined rescaled height:
\begin{equation}
    q'(x,t) \equiv \frac{h(x,t) - v_\infty t - A_2 t^{-1/3}}{(\Gamma t)^{1/3}} \simeq \chi + \mathcal{O}(t^{-1/3}). \label{eq:qprime}
\end{equation}
The difference between its mean $\expct{q'}$ and that of the Baik-Rains distribution $\expct{\chi_0}=0$ is shown by green solid disks in \figref{fig-cum}(a) and (b), which turns out to differ considerably from that of the usual rescaled height $\expct{q}$ (blue open circles).
Remarkably, with this refined rescaled height, the difference is found to decay as $t^{-1/3}$ over sufficiently long times [\figref{fig-cum}(b)].
Although the data at latest times seem to deviate slightly from this power law, we consider that this is probably due to small errors in the estimates of the rescaling parameters, in particular that of $\Gamma$, for which the value from the flat experiments was used.
Under this expectation, we can conclude that our experimental data clearly show convergence to the Baik-Rains distribution, at least up to the fourth-order cumulants.

\begin{figure}[tb]
 \centering
 \includegraphics[clip,width=\hsize]{figS2.pdf}
 \caption{
Results on finite-time corrections to the Baik-Rains distribution for the Brownian interfaces.
(a) Difference between the $n$th-order cumulant of the rescaled height, $\cum{q^n}$, and that of the Baik-Rains distribution, $\cum{\chi_0^n}$, as functions of time. For the green solid disks, the mean of the refined rescaled height $q'$ [\eqref{eq:qprime}] is used instead.
The shades indicate the standard errors, evaluated by dividing the set of the realizations into 10 groups and computing the cumulants in each group.
The dashed line indicates zero, i.e., agreement with the Baik-Rains distribution.
}
 \label{fig-cum}
\end{figure}%

\section{III. Two-Time Correlation}

In this section we test agreement with Ferrari and Spohn's exact solution \cite{Ferrari.Spohn-SIG2016} on the two-time correlation function, defined by $C_\mathrm{t}(t_1,t_2)\equiv\expct{\delta{}h(x,t_1)\delta{}h(x,t_2)}$ with $\delta{}h(x,t)\equiv{}h(x,t)-\expct{h(x,t)}$.
Ferrari and Spohn's exact solution reads, with $\tau\equiv t_1/t_2$ (hence $0 \leq \tau \leq 1$) and in the limit $t_1,t_2 \to \infty$,
\begin{equation}
\frac{C_\mathrm{t}(t_1,t_2)}{C_\mathrm{t}(t_2,t_2)} \to F_\mathrm{t}^\text{FBM}(\tau) \equiv \frac{1}{2}\[1+\tau^{2/3}-(1-\tau)^{2/3}\],  \label{eq:FS1}
\end{equation}
 which is identical to the two-time correlation function of the fractional Brownian motion with Hurst exponent $1/3$ (abbreviated to FBM$_{1/3}$).
The experimental data from the Brownian experiments are found to be close to this exact solution, and approaching it with increasing $t_2$ [\figref{fig-twotime}(a)].

To test whether the data obtained at finite times converge to this exact solution or not, we first note that the asymptotic behavior of \eqref{eq:FS1} in the limit $\tau \to 1$ ($t_2 \to t_1$) has been known since long before \cite{Kallabis.Krug-EL1999}.
The nontrivial limit is therefore $\tau \to 0$, corresponding to $t_1 \ll t_2$.
To study this limit with $t_1,t_2$ kept large, it is more convenient to fix $t_1$ and vary $t_2$, and normalize $C_\mathrm{t}(t_1,t_2)$ by the variance at $t_1$.
We therefore define
\begin{equation}
    G_\mathrm{t}(t_1,t_2) \equiv \frac{C_\mathrm{t}(t_1,t_2)}{C_\mathrm{t}(t_1,t_1)}
\end{equation}
and, following the convention adopted in Ref.~\cite{DeNardis.etal-PRL2017}, $\Delta \equiv (t_2-t_1)/t_1 = \tfrac{1}{\tau}-1$ as a time variable.
In this notation, Ferrari and Spohn's solution reads:
\begin{align}
    \frac{C_\mathrm{t}(t_1,t_2)}{C_\mathrm{t}(t_1,t_1)} \to G_\mathrm{t}^\text{FBM}(\Delta) \equiv \frac{1}{2}\[(\Delta+1)^{2/3} + 1 - \Delta^{2/3} \].  \label{eq:FS2}
\end{align}
This tends to $G_\mathrm{t}^\text{FBM}(\Delta) \simeq \frac{1}{2} + \frac{1}{3}\Delta^{-1/3}$ for large $\Delta$.
Note that the correlation remains strictly positive in the limit $\Delta\to\infty$, the property called the persistent correlation in Ref.~\cite{DeNardis.etal-PRL2017}.
Figure~\ref{fig-twotime} shows the solution \pref{eq:FS2}, together with the experimental data, plotted against $\Delta^{-1/3}$.
We can see that the data approach the theoretical curve with increasing $t_1$.
Interestingly, the finite-time data can be approximated by simply translating the theoretical curve downward.
We therefore fit the data by $G_\mathrm{t}(t_1,t_2) = G_\mathrm{t}^\text{FBM}(\Delta) - \Delta G(t_1)$ and plot $\Delta G(t_1)$ in the inset of \figref{fig-twotime}.
The result suggests $\Delta G(t_1) \sim t_1^{-2/3}$ for large $t_1$, indicating that the experimental data on the two-time correlation indeed seem to converge to Ferrari and Spohn's exact solution.

\section{Supplementary Movie Captions}

\subsection{Movie S1}

A typical realization of a flat interface, separating the metastable DSM1 (gray) and growing DSM2 regions (black).
The movie is played five times as fast.
The frame size is $3820\unit{\mu{}m} \times 3300\unit{\mu{}m}$.

\subsection{Movie S2}

A typical realization of a Brownian interface, separating the metastable DSM1 (gray) and growing DSM2 regions (black).
The movie is played five times as fast.
The frame size is $2730\unit{\mu{}m} \times 3300\unit{\mu{}m}$.

\pagebreak

\begin{figure}[t]
 \centering
 \includegraphics[clip,width=0.8\hsize]{figS3.pdf}
 \caption{
Results on the two-time correlation for the Brownian interfaces.
(a) The two-time function normalized by the variance at time $t_2$, $F_\mathrm{t}(t_1,t_2)=C_\mathrm{t}(t_1,t_2)/C_\mathrm{t}(t_2,t_2)$, for different $t_2$ (legend), shown against $t_1/t_2$.
The same data as Fig.~4(c) in the main article are used, with more data points shown.
The black curve indicates Ferrari and Spohn's exact solution \cite{Ferrari.Spohn-SIG2016} $F_\mathrm{t}^\text{FBM}(t_1/t_2)$.
(b) The two-time function normalized by the variance at time $t_1$, $G_\mathrm{t}(t_1,t_2)=C_\mathrm{t}(t_1,t_2)/C_\mathrm{t}(t_1,t_1)$, for different $t_1$ (legend), shown against $\Delta^{-1/3}$ with $\Delta \equiv (t_2-t_1)/t_1$.
The black curve indicates Ferrari and Spohn's exact solution \cite{Ferrari.Spohn-SIG2016} $G_\mathrm{t}^\text{FBM}(\Delta^{-1/3})$.
The inset shows the deviation of the ordinates of the experimental data from the exact solution $G_\mathrm{t}^\text{FBM}(\Delta)$, as a function of $t_1$.
The dashed line is a guide for eyes indicating a power law $t_1^{-2/3}$.
}
 \label{fig-twotime}
\end{figure}%