Zum Inhalt
Erschienen in:

Open Access 2025 | OriginalPaper | Buchkapitel

Efficient Synthesis of Tight Polynomial Upper-Bounds for Systems of Conditional Polynomial Recurrences

verfasst von : Amir K. Goharshady, S. Hitarth, Sergei Novozhilov

Erschienen in: Programming Languages and Systems

Verlag: Springer Nature Switzerland

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Dieses Kapitel untersucht die effiziente Synthese enger polynomaler Obergrenzen für Systeme bedingter polynomaler Rezidive und adressiert die Beschränkungen traditioneller Methoden wie des Meistertheorems und der Akra-Bazzi-Methode. Sie führt Generalized Polynomial Recurrence Systems (GPRS) ein, die multivariable, bedingte und polynomische Wiederholungsbeziehungen ermöglichen und einen ausdrucksvolleren Rahmen bieten. Das Kapitel stellt einen templatebasierten Algorithmus vor, der die Synthese polynomaler Obergrenzen automatisiert und so für Solidität und Halbvollständigkeit sorgt. Dieser Algorithmus reduziert das Problem auf lineare oder semi-definitive Programmierung, die in polynomialer Zeit lösbar sind, was es sowohl theoretisch robust als auch praktisch skalierbar macht. In diesem Kapitel wird auch die Anwendung dieses Ansatzes auf verschiedene Benchmarks diskutiert, was seine Effektivität im Umgang mit komplexen Rückfallsystemen und das Erreichen enger Grenzen demonstriert. Darüber hinaus hebt er die Fähigkeit des Algorithmus hervor, sich durch standardmäßige variable Substitutionstechniken auf nichtpolynome Grenzen auszudehnen, was seine Vielseitigkeit und praktische Nützlichkeit unterstreicht.

1 Introduction

Recurrence Relations. A recurrence relation is any equation expressing the n-th element of a sequence in terms of its previous elements. A system of recurrence relations is a family of recurrence relations for multiple sequences, where the n-th element of each sequence is expressed in terms of previous elements of not only that sequence, but also the other sequences in the family. For example, consider the following system: \(x_n = 2 \cdot x_{n-1} + y_{n-1} \wedge y_n = x_{n-1} + 2 \cdot y_{n-1}.\) This is an example of a system of linear recurrences, since each element is a linear combination of previous elements.
Recurrence Relations for Runtime Analysis. Recurrence relations are the most classical and standard formalism to capture the worst-case runtime behavior of recursive or divide-and-conquer algorithms with respect to the size n of their input [38]. When analyzing the asymptotic worst-case runtime of a recursive algorithm, the goal is to obtain an asymptotic upper-bound on the value of the n-th term of the recurrence. The two classical approaches here are the master theorem (MT) and the Akra-Bazzi method (AB).
Master Theorem (MT). First introduced in 1980 [12], the master theorem considers recurrences of the form \(\textstyle T(n) = a \cdot T\left( {n}/{b}\right) + f(n)\) and provides a recipe-like formula for an asymptotic solution in several cases with respect to ab and f. For example, the solution is \(O(n^{\log _b a})\) when \(f(n) \in O(n^{\log _b a - \epsilon })\) for some \(\epsilon > 0\) and \(O(n^{\log _b a} \cdot \log n)\) when \(f(n) \in \varTheta (n^{\log _b a}).\) Given its ability to easily obtain bounds on the runtime of many common algorithms, MT is often included in undergraduate algorithms courses and textbooks [38].
Akra-Bazzi Method (AB). A significant limitation in MT is that it can only handle divide-and-conquer algorithms in which every instance is divided into a fixed number a of sub-instances of the same size n/b. The Akra-Bazzi method [1] extends MT by allowing sub-instances of differing sizes. Specifically, it handles recurrences of the form
$$ \textstyle \forall n \ge n_0 \quad \quad T(n) = f(n) + \sum _{i=1}^k a_i \cdot T(b_i \cdot n + g_i(n)), $$
in which
(1)
\(a_i > 0\) and \(0 < b_i < 1\) are constants for each i.
 
(2)
\(\vert f'(n) \vert \in O(n^c)\) for a fixed constant c and \(g_i(n) \in O(n/\log ^2 n).\)
 
For such recurrences, AB first finds a value p such that \(\sum _{i=1}^k a_i \cdot b_i^p = 1\) and then proves the asymptotic upper-bound
$$ \textstyle T(n) \in O\left( n^p \cdot \left( 1 + \int _{1}^{n} {g(x)}/{x^{p+1}} \text {d}x\right) \right) . $$
Both MT and AB can only handle linear recurrences.
Recurrence Solving in Static Analysis. Recurrence relations are also utilized as a way to summarize loops [47, 70, 75] and generate invariants [15, 72, 74]. Invariant generation is an essential first step in a wide variety of static program analyses [64, 76, 85]. Similarly, loop summarization enables the application of powerful methods such as algebraic [31, 34, 71] and Newtonian [45, 84] program analysis. A crucial difference between this kind of recurrence solving and the one in MT/AB is that worst-case runtime analysis aims to obtain an upper-bound on the n-th element T(n) of the recurrence. This upper-bound is often asymptotic, i.e. ignoring constant factors. In contrast, loop summarization and invariant generation methods need an exact closed-form formula for the n-th element. This leads to a harder problem, especially since the recurrence might not have a closed-form solution, and thus the tradeoff for these approaches is that they often handle a more restricted family of recurrences. In this work, we follow MT and AB and focus on finding upper-bounds, but our upper-bounds are not asymptotic and do not ignore constant factors.
Systems of Recurrences. A major limitation in AB and MT is that they can only handle a single recurrence relation. However, it is easy and natural to write programs consisting of several procedures with non-trivial recursive calls between them. In these cases, we will have several sequences \(T_1, T_2, \ldots , T_k,\) each corresponding to the runtime of one of the procedures, and the n-th element in each of them can depend on previous elements in the other sequences, as well.
Multi-variate Recurrences. Another limitation of MT and AB is that they only consider recurrences with a single variable n,  which is intuitively a measure of the size of the instance passed to the underlying recursive algorithm. However, there are many cases in which the size of an instance is not adequately captured by a single parameter. For example, the runtime of an algorithm that works with graphs is often dependent on both the number of vertices \(\vert V\vert \) and the number of edges \(\vert E \vert \) in the input graph. If we simply merge the two and define \(n := \vert V \vert + \vert E \vert ,\) this might lead to a gross over-approximation of the actual worst-case runtime of the algorithm. Indeed, the entire field of parameterized algorithms and complexity [39, 44] is based on studying the worst-case runtime of algorithms using more than one parameter. In such cases, MT and AB are not applicable and the runtimes are analyzed manually.
Conditional Recurrence Relations. A further challenge in solving recurrences is that many applications lead to so-called conditional recurrence relations [91]. These are recurrences in which there is no fixed formula for each element of the sequence, but we instead have several formulas and different conditions for the application of each. As a simple example, we might have two parameters n and m and different formulas for T(nm) depending on whether n is larger than m or not. In such cases, neither AB nor MT can be applied. The state-of-the-art for conditional recurrences is [91] which can only handle periodic linear recurrences.
Probabilistic Recurrence Relations. Another related family of works are those that consider probabilistic recurrence relations, thus bounding the expected runtime of a randomized recursive algorithm such as Quick Sort or the probability that its runtime exceeds a certain threshold. In their setting, the size of the sub-instances is not necessarily deterministic but can instead be probabilistic. However, the number of sub-instances is fixed. For example, Quick Sort breaks down an array of size n into two arrays of size i and \(n-i-1,\) where each value of i is equally likely. The standard approach in this area is known as Karp’s cookbook [68, 69]. and resembles MT. Extensions of Karp’s cookbook include [35, 89, 90].
Sketch of Our Approach. In this work, we consider systems of multi-variate recurrence relations, in which the number of sub-instances is not necessarily fixed. Our approach is template-based. Before getting into formal details in the coming sections, we first illustrate the main ideas of our method using a simple example.
  • Consider the following toy recurrence relation:
    $$x_0 = 1 \quad \quad \forall n \ge 1,~~x_n = x_{n-1} + n.$$
    Using repeated substitution, we can obtain \(x_n = 1 + 1 + 2 + \ldots + n = 0.5 \cdot n^2 + 0.5 \cdot n + 1\). We would like to find upper-bounds automatically and without such manual analysis.
  • Suppose \(f(n) := a \cdot n^2 + b \cdot n + c\) is a polynomial such that \(f(n) \ge f(n-1) + n\) when \(n\ge 1\) and \(f(0) = 1\). It is straightforward to see that f(n) will be a valid upper-bound on \(x_n\). Our goal is to find concrete values for abc.
  • Thus, our problem is reduced to finding values for abc that witness the satisfiability of the following formula in the first-order theory of the reals:
    $$\exists a, b, c ~~ \forall n ~~ (n \ge 1 \Rightarrow f(n) \ge f(n-1) + n) \wedge f(0) = 1.$$
    With a simple substitution we obtain:
    $$\begin{aligned} \exists a, b, c ~~ \forall n ~~ (n \ge 1 \Rightarrow (2 \cdot a - 1) \cdot n - a + b \ge 0) \wedge c = 1 \end{aligned}$$
    (1)
    While this particular example is easy to solve, the formula at this point would generally contain polynomials of higher degrees. It is a formula in the first-order theory of the reals, which also has an \(\exists \forall \) quantifier alternation. Thus, a direct solution is not viable even for small instances [11, 18, 77].
  • Depending on the degree of polynomials appearing in the constraint, we use various theorems from polyhedral or real algebraic geometry to eliminate the quantifier alternation and reduce our problem to either linear programming (LP) or semi-definite programming (SDP). Both LP and SDP are known to be PTIME-solvable and there are many practically scalable tools able to handle large LP and SDP instances. Here, we know we have to set \(c=1,\) leading to
    $$\exists a, b ~~ \forall n ~~ (n -1 \ge 0 \implies (2 \cdot a - 1) \cdot n - a + b \ge 0).$$
    Since all the polynomials involved are linear, we apply the well-known Farkas’ lemma [46].
  • The idea behind Farkas’ lemma is to try to write the RHS of the implication as a linear combination with non-negative coefficients of \(1 \ge 0\) and the LHS. In other words, we would like to find \(\lambda _0, \lambda _1 \ge 0\) such that
    $$ \forall n~~(2 \cdot a - 1) \cdot n - a + b = \lambda _0 + \lambda _1 \cdot (n-1). $$
    Since the polynomial identity above should hold for all values of n,  we must have the same corresponding coefficients, i.e. the constant term and the coefficient of n should be equal on both sides of the equation. Thus, we obtain \(2 \cdot a - 1 = \lambda _1\) and \(-a+b = \lambda _0 - \lambda _1.\) We also had \(c=1\) from before. Hence, our problem is now reduced to an LP instance over \(a, b, c, \lambda _0\) and \(\lambda _1.\) It is now easy to verify that \(a = b = 0.5, c = 1, \lambda _0 = \lambda _1 = 0\) is a solution. Plugging the values for abc back into the template for f,  we obtain \(f(n) = 0.5 \cdot n^2 + 0.5 \cdot n + 1,\) which is a tight polynomial bound on \(x_n.\) Crucially, every step of this algorithm is entirely automated and does not require any manual analysis.
Our Contribution. In this work, we define an expressive class of recurrences called Generalized Polynomial Recurrence Systems (GPRS). Our GPRS setting is more expressive than that of MT and AB in the following dimensions:
  • We allow multi-variate recurrences.
  • We handle systems of recurrences instead of a single one.
  • The recurrence relations need not be linear and can instead be polynomial. For example, we can have \(T(n) = p(n) \cdot T({q(n)}) + r(n)\) where pq and r are polynomials1.
  • Our recurrence relations can be conditional.
We present the following results based on GPRS:
  • Decidability. We prove that the problem of finding a polynomial upper-bound of any fixed degree d is decidable, assuming the GPRS represents a well-defined family of positive sequences. This is achieved by a reduction of the problem to a formula in the first-order theory of the reals, similar to (1). In Theorem 1, we prove that this reduction is both sound and complete. We then apply the well-known Tarski-Seidenberg theorem [86, 87] for decidability.
  • Template-based Algorithm. Formulas in the first-order theory of the reals are notoriously hard to decide, especially when they involve quantifier alternation. The general techniques for such constraints take doubly-exponential time [52]. To avoid this, we utilize several theorems from polyhedral and algebraic geometry, including Farkas’ lemma [46], Handelman’s Theorem [51] and Putinar’s Positivstellensatz [83], to eliminate the quantifier alternation and reduce the problem to either linear programming (LP) or semi-definite programming (SDP). There are many modern scalable solvers for LP/SDP and both are in PTIME.
  • Completeness and Tightness. Assuming that the GPRS has a polynomial upper-bound of the desired degree, and that polynomial templates of high enough degree are used in the algorithm, our approach is guaranteed to find such a polynomial upper-bound. Moreover, every upper-bound polynomial corresponds to a unique solution of the LP/SDP instance. Thus, our approach can find the tightest possible bound with respect to any user-defined objective.
In short, we provide automated sound and complete algorithms that, for any fixed degree of the templates, can find the tightest polynomial bound for a given GPRS by means of a reduction to LP/SDP. As argued above, our setting is more general than the classical methods of MT and AB in several dimensions. We also provide an extensive set of illustrative examples, showcasing that our approach is applicable to recurrence relations that cannot be handled by MT or AB.
Limitations. The main limitation of our approach is that it requires everything to be polynomial. More specifically, all parts of the input GPRS, as well as the synthesized upper-bound have to be polynomial. This is a natural and inherent limitation due to our dependence on theorems in real algebraic geometry, which is the study of systems of polynomials and their real solutions. This being said, we can still apply the classical techniques of polynomial substitution and logarithmic substitution [38], to obtain exponential bounds such as \(3^n\) or bounds that have rational non-integral degrees, such as \(n^{2.83}\). We provide examples of such bounds in Sections 6 and 7. Moreover, we focus on the problem of solving systems of recurrence relations and do not consider how the system was obtained in the first place. This is natural in our main use-case, i.e. worst-case runtime analysis of algorithms, in which there is no implementation of the algorithm and instead the algorithm designer manually finds the recurrences and uses them to analyze asymptotic/exact runtimes [48]. In comparison, there are several previous works, such as [15, 65, 70], that extract systems of recurrences from programs. For such scenarios, our algorithm can only be applied to find the tightest possible polynomial bound of a given degree after the system of recurrences is generated by a separate tool.
Stellensatz-based Program Analysis. Our approach is a template-based algorithm using Farkas’ Lemma, Handelman’s Theorem and Putinar’s Positivstellensatz. These three theorems are classical and well-known results in polyhedral and real algebraic geometry. They have also been used in several previous works in static analysis, especially for invariant generation [26, 36], quantifier elimination [3], LTL model-checking [29] and program synthesis [2, 50]. These works reduce the respective static analysis problems to Quadratically-Constrained Quadratic Programming (QCQP) and rely on the Real Nullstellensatz for their completeness. In contrast, we do not use the Nullstellensatz and our reduction is to Linear Programming (LP) or Semi-definite Programming (SDP). QCQP is an NP-hard problem whereas both LP and SDP have PTIME solutions. Thus, for any fixed degree of template polynomials, our approach takes polynomial time. This indicates that, unsurprisingly, template-based recurrence solving is an easier problem in terms of complexity than both invariant generation and program synthesis. Similar approaches have also been used in the context of termination analysis, e.g. for the synthesis of ranking functions and ranking supermartingales [2325, 27, 28, 32, 63, 82, 93]. For any fixed degree of template polynomials, if tight program invariants are given as part of the input, then these approaches find ranking functions/supermartingales in PTIME. However, generating the required invariants themselves is not PTIME as mentioned above. We also remark that our algorithms do not depend on invariants or any input other than the system of recurrences.
Other Recurrence Solving Approaches. The closest previous work is a template-based recurrence solving approach and tool called CHORA [15], which builds upon [47]. In our experiments (Section 7), the outputs of the two approaches often coincide. However, in contrast to our approach, CHORA does not provide any completeness guarantees. Thus, there are instances in which our approach is able to synthesize a bound but CHORA fails. There are also instances in which our approach’s polynomial bound is tighter than CHORA’s. On the other hand, CHORA’s setting is more general since we focus only on polynomial templates and solutions, whereas CHORA creates templates in which arbitrary functions can serve as unknowns. For example, it is able to find a non-polynomial bound of \(O(n \cdot \lg n)\) for merge sort. Therefore, neither approach is subsumed by the other. A recent related work is [40], which also focuses on generality, i.e. being able to soundly synthesize bounds of different forms, rather than completeness for a particular type of bound. It takes a program as input and applies abstractions to enable the application of algebraic program analysis [30, 33, 37, 71] and methods for generating all polynomial invariants. Note that, as mentioned above, this is a strictly harder problem than the one considered in our setting. Another related work is [70], which automatically infers recurrences from programs and then provides a highly efficient compositional method to solve them. This method is efficient but not complete. An interesting direction of future work would be to combine [70] with our approach, i.e. first use [70] to obtain recurrence systems from programs and then use a combination of our complete method for polynomial bounds and [70]’s method for non-polynomial bounds to solve the resulting recurrences. Finally, there are many recurrence-solving methods developed as subroutines in the context of automated (amortized) resource analysis [7, 16, 17, 1922, 4143, 53, 56, 57, 5962, 66, 67, 92, 94]. Similar to the works above, these approaches consider a program directly, extract recurrence relations modeling its resource usage and then use sound but incomplete solution methods based on a variety of techniques, such as type systems or separation logic, for general non-polynomial bounds. See [58] for an excellent survey.

2 Polynomial Recurrence Systems

In this work, we use a formalism called Generalized Polynomial Recurrence Systems (GPRS), which only employs polynomials in the recurrence relations. We allow recurrence relations such as \(T(n) = 2 \cdot T(n/2) + n^2\) but not \(T(n) = 2 \cdot T(n/2) + 2^n\). In this section, we formally define the concept of a GPRS, its syntax and its semantics.
Recurrence Variables and Valuations. We assume the recurrence relations are defined over a finite set of variables \(\textbf{n}= \{n_1, \ldots , n_k\}\), called recurrence variables. The set of polynomials in the variables \(\textbf{n}\) over the reals is denoted by \(\mathbb {R}[\textbf{n}]\). The domain of our recurrence variables is the set \(\mathbb {R^+}\) of non-negative real numbers. A valuation is a map \(\sigma : \textbf{n}\rightarrow \mathbb {R^+}\). We evaluate a polynomial \(p(\textbf{n})\in \mathbb {R}[\textbf{n}]\) at a valuation \(\sigma \) by substituting each variable n with the value \(\sigma (n)\) and computing p with the usual meaning of multiplication and addition. This evaluation is denoted by either \(\sigma (p(\textbf{n}))\) or \(p(\sigma (\textbf{n}))\).
Recurrence Symbols and Polynomial Calls. A recurrence symbol over \(\textbf{n}\) is simply a function symbol \(T(\textbf{n})\). We denote the set of all recurrence symbols by \(\mathcal {T}\). A polynomial substitution map \(\delta : \textbf{n}\rightarrow \mathbb {R}[\textbf{n}]\) is a function that assigns a polynomial \(p(\textbf{n}) \in \mathbb {R}[\textbf{n}]\) to each variable \(n\in \textbf{n}\). A polynomial substitution map can be applied to a recurrence symbol to get \(\delta (T(\textbf{n})) = T(\delta (\textbf{n}))\). We call \(T(\delta (\textbf{n}))\) the polynomial call of \(T(\textbf{n})\) with respect to \(\delta \). For example, let T(nm) be a recurrence symbol over \(\textbf{n}= \{n, m\}\) and \(\delta \) a polynomial substitution map with \(\delta (n) = n+m\) and \(\delta (m) = m - 1\). The polynomial call of T(nm) with respect to \(\delta \) is \(\delta (T(n,m)) = T(\delta (n), \delta (m)) = T(n+m, m-1)\).
Syntax. A Generalized Polynomial Recurrence System (GPRS) is generated from the non-terminal S in the grammar of Figure 1. To make the system more human-readable, we also explicitly write the recurrence variables and symbols at the top of the system as shown in Figure 2.
Fig. 1:
Our Syntax
Example 1
An example GPRS is given in Figure 2. In line 1, we define that our recurrences will use two variables n and m. In line 2, we define a recurrence symbol T over these variables. Finally, in lines 3 and 4, we describe the equations of our recurrence using if-then blocks. Our grammar allows a system of multiple recurrences containing arbitrary polynomials over the recurrence variables.
Fig. 2:
An Example GPRS
Monomials and Coefficients. An \(\mathcal {M}\text {-} \texttt {monomial}\) is any expression generated from the non-terminal \(\mathcal {M}\) in the grammar of Figure 1, and an \(\mathcal {R}\text {-} \texttt {expression}\) R is any expression generated from the non-terminal \(\mathcal {R}\). If an \(\mathcal {R}\text {-} \texttt {expression}\) is of the form \(R := f\cdot M + R'\), where M is an \(\mathcal {M}\text {-} \texttt {monomial}\), then f is said to be the coefficient of M. We can evaluate an \(\mathcal {R}\text {-} \texttt {expression}\) R at any valuation \(\sigma \) by applying the substitution \(n \rightarrow \sigma (n)\) in R and simplifying it. We denote this evaluation by \(\sigma (R)\).
GPRS Notation. Based on the discussion above, let \(\mathcal {T}\) be the set of recurrence symbols and \(\textbf{n}\) the set of recurrence variables. A GPRS \(\mathcal {F}(\mathcal {T}, \textbf{n}) = \{\phi _1, \ldots , \phi _m\}\) is a set of https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Figc_HTML.gif blocks with each https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Figd_HTML.gif where each \(R_i\) is an \(\mathcal {R}\text {-} \texttt {expression}\). \(\phi _i.\)
Semantics. Let \(\sigma :\textbf{n}\rightarrow \mathbb {R^+}\) be a valuation. Given a GPRS \(\mathcal {F}\), we interpret each \(\phi \in \mathcal {F}\) as a conditional rewriting rule for \(T(\textbf{n})\). We call \(G(\phi ):= \varphi \) the guard of \(\phi \) and \(\mathcal {R}(\phi ):= (T(\textbf{n}) = R)\) the rewrite rule of \(\phi \). If the valuation \(\sigma \) satisfies the guard \(G(\phi )\), we can invoke the rewrite rule \(\mathcal {R}(\phi )\) of \(\phi \) on \(T(\sigma (\textbf{n}))\) and rewrite \(T(\sigma (\textbf{n})) \rightarrow \sigma (R)\). A rewrite \(R \rightarrow R'\) such that \(R' \ne R\) is called non-trivial.
To be more formal, we define the application of a conditional rewrite rule https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Fige_HTML.gif on an \(\mathcal {R}\text {-} \texttt {expression}\) by structural induction:
$$\begin{aligned} \phi [\mathcal {R} + \mathcal {R}] &:= \phi [\mathcal {R}] + \phi [\mathcal {R}] \\ \phi [f \cdot \mathcal {M}] &:= \phi [f] \cdot \phi [\mathcal {M}] \\ \phi [f(\sigma (\textbf{n}))] &:= f(\sigma (\textbf{n})) \\ \phi [T(\sigma (\delta (\textbf{n})))] &:= {\left\{ \begin{array}{ll} \sigma (R), & \textit{if } T = G \textit{ and } \sigma \models \varphi \\ T(\sigma (\delta (\textbf{n}))), & \textit{otherwise} \end{array}\right. } \end{aligned}$$
Evaluations. An evaluation of an \(\mathcal {R}\text {-} \texttt {expression}\) R,  such as \(T(\textbf{n}),\) at a valuation \(\sigma \) in the GPRS \(\mathcal {F}\) is a finite sequence \(\mathcal {E} := R_0 \xrightarrow {\phi _1} R_1 \xrightarrow {\phi _2} \ldots \xrightarrow {\phi _n} R_n\) of non-trivial rewrites such that \(R_0 := \sigma (R),\) \(R_i = \phi _i[R_{i-1}]\) for each \(i \ge 1\), and \(R_n\) is a numerical expression which does not contain any non-terminals and thus can be evaluated to a real number. \(\mathcal {E}(\sigma (R)) := R_n\) is called the value of \(\sigma (R)\) under the evaluation \(\mathcal {E}\). The evaluations are not necessarily unique and we do allow non-determinism. A GPRS \(\mathcal {F}\) is non-deterministic if there are two rules \(\phi , \psi \in \mathcal {F}\) for \(T(\textbf{n})\) and a valuation \(\sigma \) such that \(\sigma \models \phi \) and \(\sigma \models \psi \).
Example 2
Consider the GRPS given in Example 1. It consists of the following two rewrite rules:
Take the valuation \(n \mapsto 5, m \mapsto 2\). An evaluation of T(5, 2) is \( T(5,2) \xrightarrow {\phi _1} T(7,1) +2\xrightarrow {\phi _1} T(8,0)+1+2 \xrightarrow {\phi _2} 8+1+2 = 11. \)
Example 3
Consider the following GPRS:
If we try to evaluate T(2) by rewriting, we get \(T(2) \xrightarrow T(3) + 2 \xrightarrow (T(4) + 3) + 2 \xrightarrow \ldots \) and the sequence never ends. Indeed, it is impossible to evaluate T(n) for any n, as the rewriting sequence never stops. Such systems are not well-defined, as they do not allow us to evaluate the recurrence symbols on all valuations. We now formalize this point.
Well-defined GPRS. A GPRS \(\mathcal {F}(\mathcal {T}, \textbf{n})\) is said to be well-defined if for all \(T\in \mathcal {T}\) and valuation \(\sigma : \textbf{n}\rightarrow \mathbb {R^+}\), https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Figh_HTML.gif can be evaluated and every sequence of non-trivial rewrites of \(T(\sigma (\textbf{n}))\) terminates, resulting in a real value.
Apart from being well-defined, we require an additional natural property, called positivity. Intuitively speaking, positivity ensures that (i) the final value of any evaluation is positive, and (ii) no instance is ever divided into negatively-many sub-instances, as that makes no sense. Any real-world recurrence system modeling the runtime of a recursive divide-and-conquer algorithm will surely satisfy our positivity requirement.
Positivity. A GPRS \(\mathcal {F}(\mathcal {T},\textbf{n})\) is positive if it has the following two properties:
(1)
For every \(T \in \mathcal {T}\) and \(\sigma : \textbf{n}\rightarrow \mathbb {R^+}\), every evaluation of \(T(\sigma (\textbf{n}))\) results in a non-negative real value;
 
(2)
Let https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Figi_HTML.gif be a rewrite rule in \(\mathcal {F}\) and \(f(\textbf{n})\) be coefficient of any \(\mathcal {M}\text {-} \texttt {monomial}\) in R. For all valuations \(\sigma :\textbf{n}\rightarrow \mathbb {R^+}\) s.t. \( \sigma \models \varphi \), we have \(f(\sigma (\textbf{n})) \ge 0\). Equivalently, \(\varphi \implies f(\textbf{n}) \ge 0\) must always hold.
 
Example 4
Consider the following GPRS:
It is positive because:
(1)
Every evaluation leads to a non-negative value.
 
(2)
The implications \(0 \le n < 5 \Rightarrow n \ge 0\) and \(n \ge 5 \Rightarrow n^2 - 25 \ge 0\) are valid.
 
We do not have any restriction on the polynomial \(-n\) present in the second \(\mathcal {R}\text {-} \texttt {expression}\), as it is not the coefficient of any \(\mathcal {M}\text {-} \texttt {monomial}\).

3 Polynomial Upper-bounds / Templates

We now formally define the concept of polynomial bounds.
Polynomial Upper-bound. A polynomial upper-bound of a GPRS \(\mathcal {F}(\mathcal {T}, \textbf{n})\) is a map \(\mathcal {U}: \mathcal {T}\rightarrow \mathbb {R}[\textbf{n}]\) that associates a polynomial \(u_T(\textbf{n})\) to each recurrence symbol \(T \in \mathcal {T}\) such that for every valuation \(\sigma :\textbf{n}\rightarrow \mathbb {R^+}\) and every evaluation \(\mathcal {E}\) of \(T(\sigma (\textbf{n}))\), we have \(u_T(\sigma (\textbf{n})) \ge \mathcal {E}(T(\sigma (\textbf{n})))\). To simplify notation, we would use \(f(\sigma (\textbf{n}))\) and \(f(\sigma )\) interchangeably.
Example 5
Consider the following GPRS:
A possible polynomial upper-bound for \(\mathcal {F}\) is the map \(\mathcal {U}: T \mapsto n^2\) since \(n^2 \ge \mathcal {E}(T(n))\) for any evaluation of any n.
Our goal in this section is to reduce the problem of synthesizing a polynomial upper-bound to solving a system of polynomial constraints in Nonlinear Real Arithmetic (NRA). This corresponds to deciding a formula in the first-order theory of the reals. We first define a polynomial constraint system \(\mathcal {P}\) associated to our GPRS \(\mathcal {F}\). Then, in Theorem 1, we prove that if \(\mathcal {F}\) is well-defined and positive, then any solution of this polynomial constraint system is a valid upper-bound for \(\mathcal {F}\).
Templates. Let \(\mathbb {T}\) be a finite set of variables called template variables. A symbolic polynomial p in \((\textbf{n}, \mathbb {T})\) is a polynomial using the variables in \(\textbf{n}\) in which each coefficient is itself a real polynomial in \(\mathbb {R}[\mathbb {T}]\). Formally, \(p \in \mathbb {R}[\mathbb {T}][\textbf{n}]\). A polynomial template of degree d is a symbolic polynomial p of degree d when seen as a polynomial in \(\textbf{n}.\) A template is canonical if the coefficient of every \(n \in \textbf{n}\) is a distinct template variable \(t_n \in \mathbb T.\) degree 0 or 1 in the variables \(\mathbb {T}\).
Example 6
Let \(\textbf{n}= \{n, m\}\) and \(\mathbb T = \{t_i ~|~ 1 \le i \le 6\}\). The polynomial \(p = t_1 \cdot n^2 + t_2 \cdot n \cdot m + t_3 \cdot m^2 + t_4 \cdot n + t_5 \cdot m + t_6\) is a canonical polynomial template of degree 2 in \((\textbf{n}, \mathbb {T}).\)
Substitution. A symbolic polynomial substitution map \(\mathcal {S}: \mathcal {T}\rightarrow \mathbb {R}[\mathbb {T}][\textbf{n}]\) is a function that maps each recurrence symbol to a polynomial template of degree d. Given an \(\mathcal {R}\text {-} \texttt {expression}\) R, we define \(\mathcal {S}(R)\) as the expression obtained by substituting every T in R with the polynomial \(\mathcal {S}(T)\) and evaluating it.
Example 5
(Continued). Consider the \(\mathcal {R}\text {-} \texttt {expression}\) \(R := 2 \cdot T(n/2) + n\) and let \(\mathcal {S}: T \mapsto a \cdot n^2 + b \cdot n + c\) be a symbolic polynomial substitution map. Then, \(\mathcal {S}(R) = 2 \cdot \left( a \cdot {n^2}/{4} + b \cdot {n}/{2} + c \right) + n.\)
Polynomial Constraint Systems. Given a symbolic polynomial substitution map \(\mathcal {S}\), the polynomial constraint system \(\mathcal {P}\) of a GPRS \(\mathcal {F}\) with respect to \(\mathcal {S}\) is defined as:
Example 5
(Continued). We have the following polynomial constraint system for \(\mathcal {F}\) with respect to \(\mathcal {S}\):
We observe that \(\mathcal {P}\) is simply a constraint system in the first-order theory of the reals.
Models. A model or solution of a polynomial constraint system \(\mathcal {P} = \{\phi _1, \ldots , \phi _n\}\) is any valuation \(\varGamma : \mathbb {T} \rightarrow \mathbb {R}\) for the template variables such that \(\varGamma \models \forall \textbf{n}~~ \wedge _{i=1}^{n} \phi _i\).
Example 5
(Continued). A model for \(\mathcal P\) is any valuation \(\varGamma \) for \(\{a, b, c\}\) satisfying the following constraint:
$$ \begin{array}{c} \forall n ~~ ( n\ge 1 \Rightarrow \varGamma (a) \cdot n^2 + \varGamma (b) \cdot n + \varGamma (c) \ge \frac{\varGamma (a)}{2} \cdot n^2 + (\varGamma (b) + 1) \cdot n + 2 \cdot \varGamma (c) ) \\ \wedge \left( n < 1 \Rightarrow \varGamma (a) \cdot n^2 + \varGamma (b) \cdot n + \varGamma (c) \ge 1 \right) . \end{array} $$
Suppose the polynomial substitution map \(\mathcal S\) maps every \(T \in \mathcal {T}\) to a canonical template of degree d with fresh template variables. It is easy to verify by definition-chasing that the coefficients in every polynomial upper-bound \(\mathcal U\) of \(\mathcal F\) would then provide a solution for the polynomial constraint system \(\mathcal P.\) For a recurrence variable \(T \in \mathcal {T}\), let us denote the associated polynomial upper bound \(\mathcal {U}(T)\) by \(\mathcal {U}_T.\) We now prove the converse, i.e. that every model of \(\mathcal {P}\) yields a polynomial upper-bound of \(\mathcal {F},\) assuming that our GPRS is both well-defined and positive.
Theorem 1
Let \(\mathcal {P}\) be the polynomial constraint system of a well-defined and positive GPRS \(\mathcal {F}\) with respect to symbolic polynomial substitution map \(\mathcal {S}: \mathcal {T}\rightarrow \mathbb {R}[\mathbb {T}][\textbf{n}]\). If \(\varGamma :\mathbb {T} \rightarrow \mathbb {R}\) is a model of \(\mathcal {P}\), then \(\mathcal {U} := \varGamma (S)\) is a polynomial upper-bound of \(\mathcal {F}\).
Proof
We prove that \( \mathcal {U}_T(\sigma ) \ge \mathcal {E}(T(\sigma )) \) for every \(T \in \mathcal {T},\) \(\sigma :\textbf{n}\rightarrow \mathbb {R^+}\) and evaluation \(\mathcal {E}\) of \(T(\sigma ).\) Our proof is by induction on the length of the evaluation \(\mathcal E.\)
Base Case (\(|\mathcal {E}| = 1\) ). For any \(T(\sigma )\), if the evaluation ends in one step, then this must happen by application of a rewrite rule of the form
  https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Fign_HTML.gif such that \(\sigma \models \varphi \) and R does not contain any non-terminal, i.e. R is a polynomial in \(\textbf{n}\). In other words, https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Figo_HTML.gif . As the polynomial constraint corresponding to https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Figp_HTML.gif is valid, we have \(u_T(\sigma ) \ge f(\sigma ) = \mathcal {E}(T(\sigma ))\), given that \(u_T = \mathcal {U}_T\).
Induction Hypothesis. For every valuation \(\sigma \) and symbol \(T \in \mathcal {T}\), if \(\mathcal {E}\) is an evaluation of \(T(\sigma )\) of length \(|\mathcal {E}| \le k\), then we have \(\mathcal {U}_T(\sigma ) \ge \mathcal {E}(T(\sigma ))\).
Induction Step. Consider an evaluation \(\mathcal {E}\) of \(T(\sigma )\) of length \(|\mathcal {E}| = k+1\). Let \(\mathcal {E} := R_0 \xrightarrow {\phi _1} R_1 \xrightarrow \ldots \xrightarrow {\phi _{k+1}} R_{k+1} \). Let \(\mathcal {C} := \{V_1(\sigma _1), \ldots , V_l(\sigma _l)\}\) be the set of all non-terminals in \(R_1\) where each \(V_i \in \mathcal {T}\). Since the evaluation \(\mathcal {E}\) ends at a real number \(R_{k+1}\), each of the terms \(G_i(\sigma _i(\textbf{n})) \in \mathcal {C}\) must have the evaluation \(\mathcal {E'} = \mathcal {E}\setminus {\phi _1}\) of length \(|\mathcal {E'}| = k\). Thus, by induction hypothesis \(\mathcal {U}(V_i)(\sigma _i) \ge \mathcal {E'}(V_i(\sigma _i))\). Now, we just need to apply the positivity properties of GPRS to finish the proof. Let \(\textstyle \phi _1[T(\sigma )] = R_1 := \sigma \left( \sum _{i=1}^{t} f_i(\textbf{n}) \cdot M_i + q(\textbf{n})\right) \), where each \(M_i\) is an \(\mathcal {M}\text {-} \texttt {monomial}\). We make two observations:
(1)
Let \(M = V_1(\sigma _1)\cdots V_l(\sigma _l)\) be any \(\mathcal {M}\text {-} \texttt {monomial}\) in \(R_1\). For each \(V_i\), we have \(\mathcal {U}(V_i)(\sigma _i) \ge \mathcal {E'}(V_i(\sigma _i)) \ge 0\) where the last inequality follows from the positivity property. Therefore, it immediately follows by multiplication of such inequalities that \(\mathcal {U}(\sigma (M)) \ge \mathcal {E'}(\sigma (M))\).
 
(2)
The rewrite rule \(\phi \) could have been applied only if \(\sigma \models \varphi \). Based on the positivity property, we know that every \(f_i(\sigma )\) is non-negative.
 
Based on these two observations, we have:
This holds for every evaluation \(\mathcal {E}\).
Corollary 1
If we use a polynomial substitution map \(\mathcal S\) that maps every \(T \in \mathcal {T}\) to a canonical template of degree d with new template variables, then the solutions of \(\mathcal P\) are in one-to-one correspondence with the upper-bounds of \(\mathcal F.\) In other words, the reduction from synthesizing an upper-bound of \(\mathcal F\) of degree d to obtaining a solution of \(\mathcal P\) is both sound and complete.
Corollary 2
The problem of synthesis of a polynomial upper-bound of any fixed degree d for an input GPRS \(\mathcal F\) is decidable.
Proof
Let \(\mathcal {P} = \{\phi _1, \ldots , \phi _n\}.\) The requirement \(\textstyle \left( \forall \textbf{n}~~ \wedge _{i=1}^{n} \phi _i \right) \) is a formula in the first-order theory of the reals, which can be decided by the Tarski-Seidenberg procedure [52, 86, 87].

4 Our Synthesis Algorithm

In this section, we describe our sound and semi-complete algorithm for automating the synthesis of polynomial upper bounds for a given GPRS. Our algorithm uses theorems from polyhedral and real algebraic geometry. To improve readability, we first provide the overall algorithm and then fill in the mathematical details in the next section. We assume that the input to our algorithm is a GPRS \(\mathcal F\). Our algorithm consists of the following four steps, which we illustrate by a running example:
Step 1. Initializing a Symbolic Polynomial Substitution Map \(\mathcal {S}\) . The input to our algorithm is a well-defined and positive GPRS \(\mathcal {F}(\mathcal {T}, \textbf{n})\) and a degree bound d. For each recurrence symbol \(T \in \mathcal {T},\) we create a fresh canonical polynomial template \(g_T\) of degree d, where by being fresh we mean that no two polynomial templates share any coefficients in \(\mathbb {T}\). Let \(\mathcal {S}\) be the corresponding symbolic polynomial substitution map.
Example 7
Suppose the input GPRS \(\mathcal {F}\) is the following and the degree bound is \(d = 2\).
The symbolic polynomial substitution map \(\mathcal {S}\) would consist of the following canonical template of degree 2 for T.
$$ \mathcal {S}(T) := a_1 \cdot n^2 + a_2 \cdot n \cdot m + a_3 \cdot m^2 + a_4 \cdot n + a_5 \cdot m + a_6 $$
Here, we have \(\mathbb {T} = \{a_1, \ldots , a_6\}\).
Step 2. Constructing the Polynomial Constraint System \(\mathcal {P}\) . We compute the polynomial constraint system of \(\mathcal {F}\) with respect to \(\mathcal {S}\) by substituting each recurrence symbol T with its corresponding polynomial \(\mathcal {S}(T)\). Our problem is now reduced to solving a set of constraints of the form
$$\exists \mathbb {T} \;~\;~ \forall \textbf{n}\;~\;~ f_1 \ge 0 \wedge \ldots \wedge f_r \ge 0 \implies g \ge 0$$
Example 7
(Continued). Our algorithm computes the following two constraints that define \(\mathcal {P}:= \{\psi _1, \psi _2\}\).
Step 3. Eliminating Quantifier Alternation. This is the main step of our algorithm where we apply various tools from polyhedral and real algebraic geometry to reduce our problem to LP/SDP. The techniques in our arsenal are Putinar’s Positivstellensatz [83], Handelman’s Theorem [51] and the well-known Farkas’ Lemma [46]. Note that to apply Handelman’s Theorem and Putinar’s Postivstellensatz, we have to assume that the set of valuations that satisfy the guard of the constraint forms a compact set2. To satisfy this requirement, we can add a constraint of the form \(\sum _{n\in \textbf{n}} n^2 \le N\) to every guard, where \(N \in \mathbb {N}\) is a large number. For example, if all of our parameters are at most \(2^{32},\) we can use \(N = \vert \textbf{n}\vert \cdot 2^{64}.\) This will later come in handy for our completeness result, but our approach is sound even without this modification.
Let \(\exists \mathbb {T} \; \forall \textbf{n}\cdot \varphi \implies g \ge 0\) with \(\varphi = f_1 \ge 0 \wedge \ldots \wedge f_r \ge 0 \) be one of our polynomial constraints with quantifier alternation. Depending upon the degree of the polynomials appearing in this constraint, we apply one of the following cases:
Case 1: \(\varphi \) and g are linear. In this case we use Farkas’ Lemma to reduce this problem to LP. We illustrate this with an example.
Example 8
(Application of Farkas’ Lemma). Consider the following constraint:
Let us define a template function \( f(x, y) = a \cdot x + b \cdot y + c. \) The RHS becomes: \( f(x, y) - f(2 \cdot x, y - 1) - f(y, x - 1) + 1 = 2 \cdot b - c + 1 -(a+b) \cdot x - a \cdot y. \)
By Farkas’ lemma, there must exist \(\lambda _0, \lambda _1, \lambda _2 \in \mathbb {R}^+ \cup \{0\}\) s.t.
$$ \lambda _0 + \lambda _1 \cdot (2 - x + 6 \cdot y) + \lambda _2 \cdot (1 - x - 2 \cdot y) = 2 \cdot b - c + 1 -(a+b) \cdot x - a \cdot y. $$
Intuitively, we are trying to write the RHS of the entailment as a non-negative linear combination of the polynomials in its LHS. After rearranging we get \( (\lambda _0 + 2 \cdot \lambda _1 + \lambda _2 - 2 \cdot b + c - 1) - (\lambda _1 + \lambda _2 - a - b) \cdot x + (6 \cdot \lambda _1 - 2 \cdot \lambda _2 + a) \cdot y = 0.\) Since this polynomial is identically zero, every one of its coefficients have to be zero, leading to the following LP instance:
$$\begin{aligned} \lambda _0 + 2 \cdot \lambda _1 + \lambda _2 &= 2 \cdot b - c + 1, \\ \lambda _1 + \lambda _2 &= a + b, \\ 6 \cdot \lambda _1 - 2 \cdot \lambda _2 + a &= 0 \\ \lambda _0, \lambda _1, \lambda _2 &\ge 0 \end{aligned}$$
A possible solution would be \(\varGamma = \{\lambda _0 \mapsto 0, \lambda _1 \mapsto 1, \lambda _2 \mapsto 4, a \mapsto 2, b \mapsto 3, c\mapsto 1\}\). Substituting the coefficients in the symbolic polynomial gives us the valid bound \(f(x, y) := 2 \cdot x + 3 \cdot y + 1.\)
Case 2: \(\varphi \) is linear. In this case we use Handelman’s Theorem (Theorem 3). The intuitive idea is to write the RHS not as a linear combination with non-negative coefficients of the LHS itself, but as a combination of products of the inequalities in the LHS.
Example 9
(Application of Handelman’s Theorem). Consider the following recurrence:
Let us define the following template function:
$$\begin{aligned} r(x, y) = a_{20} \cdot x^2 + a_{11} \cdot x \cdot y + a_{02} \cdot y^2 + a_{10} \cdot x + a_{01} \cdot y + a_{00} \end{aligned}$$
The consequence (RHS) of the constraint, after some simplification, becomes
$$\begin{aligned} &r(x, y) - r(x - 1, y) - r(x, y - 2) + 9 + x^2 - 3 \cdot y \\ &= -(a_{20} - 1) \cdot x^2 - a_{11} \cdot x \cdot y - a_{02} \cdot y^2 - \\ & (a_{10} - 2 \cdot a_{11} - 2 \cdot a_{20}) \cdot x - (a_{01} - 4 \cdot a_{02} - a_{11} + 3) \cdot y \\ & -a_{00} + 2 \cdot a_{01} - 4 \cdot a_{02} + a_{10} - a_{20} + 9 \end{aligned}$$
Note that this is a polynomial of degree 2. So, we cannot simply apply a Farkas-like idea and write it as a linear combination of the polynomials on the LHS, which are all of degree 1. Instead, we note that if we assume some polynomials are non-negative, then their multiplication should also be non-negative. Indeed, we can assume the non-negativity of the following polynomials3:
$$\begin{aligned} \left\{ 1, x - y - 1, y - 1, (x - y - 1) \cdot (y - 1) \right\} \end{aligned}$$
We now attempt to write the RHS as a linear combination of these polynomials, i.e. we introduce new non-negative variables \(\lambda _{00}, \lambda _{10}, \lambda _{01}, \lambda _{11}\) and try to find values for them such that following holds:
$$\begin{aligned} & \lambda _{11} \cdot (x - y - 1) \cdot (y - 1) + \lambda _{10} \cdot (x - y - 1) + \lambda _{01} \cdot (y - 1) + \lambda _{00} \\ & = r(x, y) - r(x - 1, y) - r(x, y - 2) + 9 + x^2 - 3 \end{aligned}$$
Equating all the corresponding coefficients, we get the following linear equations for each monomial:
$$\begin{aligned} x^2: & \,a_{20} - 1 = 0\\ x \cdot y: &\,a_{11} + \lambda _{11} = 0\\ y^2: & \, a_{02} - \lambda _{11} = 0\\ x: & \,a_{10} - 2 \cdot a_{11} - 2 \cdot a_{20} + \lambda _{10} - \lambda _{11} = 0\\ y:& \, a_{01} - 4 \cdot a_{02} - a_{11} + \lambda _{01} - \lambda _{10} + 3 = 0 \\ 1:& \, a_{00} - 2 \cdot a_{01} + 4 \cdot a_{02} - a_{10} + a_{20} + \lambda _{00} - \lambda _{01} - \lambda _{10} + \lambda _{11} - 9 = 0 \\ \end{aligned}$$
Together with the non-negativity constraints \(\lambda _{00}, \lambda _{10}, \lambda _{01}, \lambda _{11} \ge 0,\) this forms an LP instance. A solution of our LP is \(\varGamma = \{\lambda _{00} \mapsto 5, \lambda _{10}\mapsto 1, \lambda _{01} \mapsto 1, \lambda _{11}\mapsto 1, a_{20} = 1, a_{02} \mapsto 1, a_{11}\mapsto -1, a_{10} \mapsto 0, a_{01} \mapsto 0, a_{00} \mapsto 0\}.\) Using this model, we obtain the concrete upper-bound \( r(x, y) = x^2 + y^2 - x \cdot y. \)
Case 3: Both \(\varphi \) and g are non-linear. In this case we use Putinar’s Positivstellensatz (Theorem 4).
Example 10
(Application of Putinar’s Positivstellensatz). Consider the constraint
Let us define a polynomial template: \(f(x) = a_3 \cdot x^3 + a_2 \cdot x^2 + a_1 \cdot x + a_0.\) Again, we cannot simply write the RHS as a linear combination of the polynomials in the guard (LHS) since the RHS is of degree 3 and the guard is of degree 2. Instead, we observe that any sum-of-squares (SOS) polynomial is always guaranteed to be non-negative. Thus, instead of the non-negative coefficients \(\lambda _i\) used in the previous case, we attempt to write the RHS as a combination of the polynomials of the LHS in which the coefficient of each LHS polynomial is itself an SOS polynomial. More formally, we aim to find three SOS polynomials \(h_0, h_1,\) and \(h_2\) such that following holds: \(h_0 + h_1\cdot (x^2 - 10) + h_2 \cdot (x - 1) = f(2 \cdot x) - 7 \cdot f(x)\).
Let us now create a template for each \(h_i\) in a way that ensures \(h_i\) would be an SOS. For simplicity, we set \(h_i(x) = (b_{i0} + b_{i1}\cdot x)^2\). The \(b_{ij}\)’s are fresh unknowns whose value is yet to be determined. Substituting these templates in the previous equation and simplifying we get:
$$\begin{aligned} b_{11}^2\cdot x^4 + (2\cdot b_{10}\cdot b_{11} + b_{21}^2 - a_3)\cdot &x^3 + \\ (b_{01}^2 + b_{10}^2 - 10\cdot b_{11}^2 + 2\cdot b_{20}\cdot b_{21} - b_{21}^2 + 3\cdot a_2)\cdot &x^2 + \\ (2\cdot b_{00}\cdot b_{01} - 20\cdot b_{10}\cdot b_{11} + b_{20}^2 - 2\cdot b_{20}\cdot b_{21} + 5\cdot a_1)\cdot &x^1 + \\ (b_{00}^2 - 10\cdot b_{10}^2 - b_{20}^2 + 6\cdot a_0) \cdot &x^0 = 0. \end{aligned}$$
As before, we obtain an equivalent set of equations by equating each coefficient to zero. On solving, we get the solution as \( h_0(x) = 2^2, h_1(x) = 1^2, h_2(x) = x^2, \) and finally \( f(x) = x^3 - 6.\)
In this case, we used a simplified template for each \(h_i\). In general, our algorithm creates a template that captures every possible SOS polynomial. This is a standard technique using Cholesky decomposition and leads to an SDP instance instead of LP. See Section 5 for details.
Step 4. Solving the LP/SDP. In the last step, we reduced our problem to solving an LP/SDP instance. Note that Cases 1 and 2, which cover the vast majority of real-world recurrences, are reduced to LP and we need SDP only for Case 3. Moreover, both LP and SDP are solvable in PTIME and there are many scalable tools to handle them. In this step, we pass the LP/SDP to an external solver. At this step, the user can also add an objective function to optimize the bound according to their wishes. For example, one can ask the solver to find the bound that minimizes the coefficient of \(n^2\). We take the solution provided by the solver and plug it back into the template to obtain a polynomial upper-bound for our GPRS. This follows Theorem 1 and concludes our algorithm.

5 Mathematical Toolbox

We now provide a formal overview of the theorems from polyhedral and real algebraic geometry used in Section 4.
Sums of Squares. A polynomial \(h(\textbf{n})\) is a sum of squares (SOS) if it can be written as \(h(\textbf{n}) := p_1^2(\textbf{n}) + p_2^2(\textbf{n}) \ldots p_r^2(\textbf{n})\), where each \(p_i \in \mathbb {R}[\textbf{n}]\). We denote the set of all SOS by \(\Sigma _2[\textbf{n}]\).
Closure and Compactness. Given a set \(X \in \mathbb {R}^n\), the closure of X is the set \(\overline{X}\) consisting of X and its boundary. A set X is closed if \(\overline{X} = X\). A set X is bounded if there exists \(c \in \mathbb {R}\) such that \(|x| < c\) for every \(x \in X\). A set is compact if it is both closed and bounded.
Satisfaction Set. Given a conjunction \(\varphi \) of polynomial inequalities of the form \(f(\textbf{n}) \ge 0\) or \(f(\textbf{n}) > 0,\) we define \(\textit{SAT}(\varphi ) := \{\sigma : \textbf{n}\rightarrow \mathbb {R}~\vert ~ \sigma \models \varphi \}\).
Theorem 2
(Farkas’ Lemma [46]). Let \(f_1, \ldots f_r\) and g be any linear polynomials over the set of variables \(\textbf{n}.\) The implication \(f_1 \ge 0 \wedge f_2 \ge 0 \wedge \ldots \wedge f_r \ge 0 \implies g \ge 0\) holds for every valuation of \(\textbf{n}\), if and only if there exist \(\lambda _0, \lambda _1, \ldots , \lambda _r,\) such that \(\textstyle g \equiv \lambda _0 + \sum _{i=1}^r \lambda _i \cdot f_i\) where all \(\lambda _i\)’s are non-negative reals. Moreover, \(f_1 \ge 0 \wedge \ldots \wedge f_r \ge 0\) is unsatisfiable if and only if \( -1 \equiv \lambda _0 + \sum _{i=1}^r \lambda _if_i\) for some non-negative real \(\lambda _i\)’s.
Handelman’s Theorem. We define some terminology useful for our next theorem. Let \(F := \{f_1, f_2, \ldots , f_r\}\) be a set of polynomials over \(\mathbb {V}\). We define the monoid of F as the set:
$$\textit{monoid}(F) := \{f_1^{k_1} \cdot f_2^{k_2} \cdots f_r^{k_r} \mid k_1, \ldots , k_r \in \mathbb {N}\}.$$
In other words, the monoid includes all polynomials that can be obtained as a multiplication of polynomials in F. We also define \(\textit{monoid}_d(F) := \{f \mid f \in \textit{monoid}(F) \wedge \deg (f) \le d\}.\)
Theorem 3
(Handelman’s Theorem [51]). Let \(f_1, \ldots f_r\) be any linear polynomials and g be an arbitrary polynomial over \(\textbf{n}\). Additionally, assume that \(\psi := f_1 \ge 0 \wedge \ldots \wedge f_r \ge 0\) is satisfiable and \(\textit{SAT}(\psi )\) is compact. If the implication \(f_1 \ge 0 \wedge f_2 \ge 0 \wedge \ldots \wedge f_r \ge 0 \implies g > 0\) holds for every valuation of \(\textbf{n}\), then there exist \(\lambda _i, m_i\) such that \(\textstyle g \equiv \sum _{i=1}^r \lambda _i \cdot m_i\) where each \(\lambda _i\) is a non-negative real value and each \(m_i \in \textit{monoid}(\{f_1, \ldots , f_r\})\).
As an example, let \( f_1 := (n_1 - 5)\), \(f_2 := (n_2 - 10) \), and \(g := n_1 \cdot n_2 - 5 \cdot n_2 + 1.\) The implication \(\phi := f_1 \ge 0 \wedge f_2 \ge 0 \implies g > 0\) holds for all valuations of \(\{n_1, n_2\}\). We only use the monoid of degree 2 in this example and have \(\textit{monoid}_2(\{f_1, f_2\}) = \{1, f_1, f_2, f_1^2, f_2^2, f_1 \cdot f_2\}. \) It is easy to verify that \(g \equiv 1 + f_1 \cdot f_2 + 10 \cdot f_1\). When relying on Handelman’s theorem, our algorithm sets up a template that includes every polynomial in \(monoid_d(F)\) for a user-defined degree d.
Theorem 4
(Putinar’s Positivstellensatz [83]). Let \(f_1, \ldots f_r\) and g be polynomials of any degree over \(\textbf{n}\). Suppose \(\varPsi := f_1 \ge 0 \wedge \ldots \wedge f_r \ge 0\) is satisfiable and there is an i such that \(\textit{SAT}(f_i \ge 0)\) is compact. If \(f_1 \ge 0 \wedge f_2 \ge 0 \wedge \ldots \wedge f_r \ge 0 \implies g > 0\) holds for all valuations over \(\textbf{n},\) then g can be written as \(\textstyle g \equiv h_0 + \sum _{i=1}^r h_i \cdot f_i\) where each \(h_i\) is SOS.
As an example, let \(f_1 := n_1 - 1, f_2 := n_2^2 - 5,\) and \(g := n_1^3 - n_1^2 + n_2^2 + 1.\) The boolean implication \(\varPhi := f_1 \ge 0 \wedge f_2 \ge 0 \implies g > 0\) is valid. We can choose the SOS polynomials \(h_0 = 6, h_1 = n_1^2\) and \(h_2 = 1\), and write \(g \equiv h_0 + h_1 \cdot f_1 + h_2 \cdot f_2\). When relying on Putinar’s Positivstellensatz in our algorithm, we set up a template for each \(h_i\) that can cover all possible SOS of degree d. This is using the following theorems.
Theorem 5
([14]). Let \(V_{d'}\) be the vector of all monomials of degree at most \(d'\) over the variables \(\textbf{n}= \{n_1, \ldots , n_k\}\). A polynomial \(h \in \mathbb {R}[\textbf{n}]\) of degree \(d := 2 \cdot d'\) is a sum of squares if and only if there exists a symmetric positive semi-definite matrix Q such that \(h = V_{d'}^T\cdot Q\cdot V_{d'}\).
Theorem 6
(Cholesky Decomposition, [95]). A square symmetric matrix Q is positive semi-definite if and only if there exists a lower-triangular matrix L with non-negative diagonal entries such that \(Q = L \cdot L^T\).
To generate a template for an SOS polynomial of degree at most d over the variables \(\textbf{n}\), we first generate a template for the lower-triangular matrix L by creating fresh template variables for each of its non-zero entries. The final template for the SOS polynomial is obtained by setting \( h := V_{d'}^T \cdot L \cdot L^T \cdot V_{d'}. \) This is a standard technique and the reason why applying Putinar’s Positivstellensatz leads to an SDP instance, instead of an LP instance as in the cases of Farkas and Handelman. See [49, Section 2.7] for examples and [6] for extensions to other combinations of strict/non-strict inequalities. Based on the theorems above, we have the following soundness and semi-completeness result:
Theorem 7
(Soundness and Completeness). Given a well-defined and positive GPRS \(\mathcal {F}(\mathcal {T}, \textbf{n}),\) the algorithm of Section 4 has the following desirable properties:
  • Soundness: Any solution output by the algorithm is a valid upper-bound. Specifically, any model of the LP/SDP instance leads to a valid polynomial upper-bound for the GPRS.
  • Semi-completeness: If a polynomial upper-bound \(\mathcal {U}\) exists and the degree bounds chosen by the user are large enough, then \(\mathcal {U}\) corresponds to one of the models of the LP/SDP instance.

6 Non-polynomial Bounds

Although our approach is designed for polynomial recurrences and upper-bounds, it is also extensible using standard variable substitution techniques and can thus synthesize exponential bounds or generalized polynomial bounds with rational (non-integral) degrees.
Generalized Polynomials. Let \(\textbf{n}= \{n_1, \ldots , n_k\}\) be a set of non-negative recurrence variables and \(q \in \mathbb {N}^+\) a positive integer. We define new variables
$$m_1 = \root q \of {n_1}, \ldots , m_k = \root q \of {n_k}.$$
generalized q-polynomial over \(\textbf{n}\) is simply a polynomial over \(\{m_1, \ldots , m_k\}\). We show the set of generalized q-polynomials over \(\textbf{n}\) by \(\mathbb {R}_q[\textbf{n}] := \mathbb {R}[n_1^{1/q}, \ldots , n_k^{1/q}].\) For a generalized q-polynomial p over \(\textbf{n},\) we define the degree of p as its degree over the \(m_i\)’s divided by q.
Example 11
\(f(n_1,n_2) = 2 \cdot n_1^{1/5} + 3 \cdot n_2^{2/5}\) is a 5-polynomial over \(\{n_1, n_2\}\) with degree 2/5. Similarly, \(g(n_1, n_2) = n_1^{3/6} \cdot n_2^{4/6} + 3 \cdot n_2\) is a 6-polynomial with degree 7/6.
Extending Our Approach to Generalized Polynomials. To find generalized polynomial upper-bounds, it suffices to write our original GPRS in terms of the new variables, solve it using the algorithm of Section 4, and then rewrite the solution using the original variables.
Example 12
Consider the well-known algorithm of Strassen for multiplying two \(n\times n\) matrices [88]. The runtime of this algorithm is classically captured by the following recurrence:
Introducing \(m = \root 6 \of {n},\) we obtain this equivalent GPRS:
At this point, our algorithm of Section 4 can be applied directly. Nevertheless, it is possible to further simplify the GPRS and eliminate n by defining \(G(m) := T(m^6, m)\) to get:
Applying our algorithm to the latter GPRS leads to the following involved and quite precise bound: \(G(m) \le 0.405 \cdot m^{17} + 6.911 \cdot m^{16} + 1.091 \cdot m^{15} + 9.169 \cdot m^{14} + 0.886 \cdot m^{13} + 5.257 \cdot m^{12} - 0.287 \cdot m^{11} - 0.091 \cdot m^{10} - 2.981 \cdot m^{9} - 6.745 \cdot m^{8} - 2.226 \cdot m^{7} - 5.129 \cdot m^{6} - 0.083 \cdot m^{5} - 1.543 \cdot m^{4} + 1.386 \cdot m^{3} + 0.803 \cdot m^{2} + 1.787 \cdot m + 1.726.\) Writing everything in terms of n we get: https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Figz_HTML.gif Note that 17/6 is \(2.8\overline{3},\) whereas the best asymptotic bound for Strassen is \(O(n^{\log _27})\) and \(\log _27 \approx 2.81.\) Thus, our algorithm is able to find an almost optimal bound. Due to our semi-completeness, by increasing q,  we can get as close to \(\log _27\) as desired.
Exponential Bounds. Applying the standard technique of \(\log \)-substitution, our approach is able to obtain exponential upper-bounds as well.
Example 13
Consider this GPRS:
Define \(m := 3^n\) so that we have \(n = \log _3 m.\) Also define \(G(m) := F(\log _3(m))\), leading to this equivalent GPRS:
Now that every expression in the GPRS is polynomial, we apply our algorithm, which obtains the upper-bound \(G(m) \le m\). Substituting back, we obtain \(F(n) \le 3^n\). This method can be applied to systems of linear recurrences of arbitrary order.

7 Experimental Results

Our main theoretical contribution in this work is the completeness of our algorithm. Such completeness results usually come at the cost of sacrificing practicality. For example, decision procedures for the existential theory of the reals are notoriously unscalable and not applicable to any real-world or even toy use-case. In contrast, our algorithm reduces the problem to LP/SDP, for which there are plenty of efficient solvers. Thus, we now provide experimental results demonstrating that, in addition to its completeness, our approach is practical and efficiently solves a variety of recurrence systems taken from three categories in the literature. We implemented our algorithm in C++ and used the Mosek Optimization Suite [79] to solve LP/SDP instances. Our tool is free and open-source and can be accessed at [81] (https://​doi.​org/​10.​5281/​zenodo.​14836308). All results were obtained on an AMD Ryzen 5 4600H Machine (3 GHz, 12 cores) running Ubuntu 20.04 LTS with 16 GB of RAM.
A. Invariant Generation in Probabilistic Programs. Our first category of benchmark GPRSs come from invariant generation. The works [10, 78] provide an algorithm and tool, called Polar, to generate moment-based invariants for a wide family of loops in probabilistic programs, called prob-solvable loops. The algorithm first extracts a recurrence system which connects the moments of program variables and then attempts to solve it.
As the simplest example, consider the program above, where uniform(0, 1) denotes a sample taken from the uniform distribution on [0, 1]. This loop computes part of the summation \(\textstyle \sum _{y = 1}^\infty y\) where each term is taken with probability 1/2. Let Ex(n) and Ey(n) denote the expected values of the variables after n iterations. The work [10] obtains the following recurrence system:
Our approach can be directly applied to this GPRS and provides the following solution: \(\mathbb {E}x(n) = 0.25 \cdot n^{2} + 0.25 \cdot n,\) and \(\mathbb {E}y(n) = n.\)
Table 1:
Results on GPRSs from Prob-solvable loops. degree in templates.
https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Tab1_HTML.png
Dummy
Table 1 provides a list of probabilistic programs from [10] that can be encoded in our GPRS framework. Our approach could successfully and efficiently solve these recurrence systems and compute the moments. Table 1 shows that (i) our approach is able to handle systems of recurrences which are beyond the scope of MT and AB, and (ii) in addition to completeness, we preserve practicality and solve each recurrence system within a few seconds, with most cases taking less than a second. In comparison, Polar is efficient but lacks completeness. Conversely, it can handle non-polynomial recurrences which are not supported in our GPRS framework.
B. Resource Usage of Functional Programs. RaML [54, 55] is a framework based on type theory to analyze and bound the resource consumption of functional programs written in OCaml. The resource in question can be time or space or arbitrarily defined by assigning costs to certain operations in the program. This was later extended in PUBS [4, 5]. As before, these approaches first find a system of recurrences and then solve it to find a bound, e.g. this GPRS models a program performing the sieve of Eratosthenes [55]:
This example cannot be handled by either MT or AB, since it has two functions referring to each other and a function with two variables. Our approach obtains the bounds \(\texttt {eratos}(n) \le 0.5 \cdot n^{2} + 1.5 \cdot n + 1\) and \(\texttt {filter}(x, m) \le m + 1.\)
Table 2 provides a list of functional programs from [54, 55] whose resource usage can be modeled by a polynomial recurrence system. It also reports the resource usage bounds obtained by our approach and the previous tools, especially CHORA [15], which is the closest related work. Table 2 shows that (i) our approach is practical and successfully handles non-trivial systems of recurrences, (ii) the bounds obtained by our approach on these programs are either tighter than the previous methods, the same, or incomparable. Recall that our approach is able to find the best polynomial bound w.r.t. any user-defined objective function. Thus, it is able to synthesize the same polynomial bounds as previous tools, too. In Table 2, we are not reporting the runtimes since the results were obtained using previous methods’ web interfaces and not on our machine. PUBS is proprietary and no source code or executable is available for it. Thus, we do not claim to be faster than them, but rather to be the first approach for polynomial recurrences with both practicality and completeness guarantees.
C. Classical Algorithms. We consider four classical algorithms for which the best known runtime bound is not polynomial. This includes Strassen’s matrix multiplication algorithm, Karatsuba’s multiplication, fast exponentiation by squaring, and merge sort. We used the following recurrences:
Table 3 shows our experimental results in comparison with CHORA [15]. Although our approach cannot find the optimal answer since it is not polynomial, using the trick of Section 6 works well in practice and obtains close-to-optimal results. We generally observe that CHORA is faster. This is due to the high degree of polynomials needed in templates to model non-integer degrees. Conversely, our completeness pays off in practice and our approach is able to find a tighter bound for fast exponentiation.
D. Ablation Study. Finally, we performed an ablation study to measure the practical impact of Step 3 of our algorithm, i.e. the application of Farkas, Handelman and Putinar theorems. To this end, we passed the constraints generated by the end of Step 2, which are formulas in the first-order theory of the reals with an \(\exists \forall \) quantifier alternation, directly to state-of-the-art SMT solvers, including Z3 [80], cvc4 [9], cvc5 [8] and Vampire [73]. The latter two are the winners of the non-linear real arithmetic competition track of SVCOMP [13]. With a time limit of 12 hours per solver per instance, none of the solvers were able to handle our benchmarks. Thus, the dedicated quantifier elimination methods are necessary not only theoretically but also in practice.
In summary, in addition to providing completeness guarantees for systems of polynomial recurrences, our approach remains practical. To our knowledge, polynomial recurrence systems are one of the most expressive families of recurrences to date to be solved by a complete method and are not subsumed by any of the previous approaches. We also showed that our approach successfully synthesizes bounds for benchmarks that were beyond the scope of previous complete methods, i.e. MT and AB (Tables 1 and 2) and that it can find close-to-optimal bounds even in cases where the optimal solution is not a polynomial (Table 3). Additionally, due to its completeness, it often finds tighter bounds than previous methods and can handle instances that were not solvable by CHORA.
Table 2:
Results on GPRSs of RaML for Resource Usage of Functional Programs.
https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Tab2_HTML.png
Dummy
Table 3:
Experimental Results on GPRSs of Classical Algorithms. D is the maximum degree in templates. PUBS time measurements were not conducted as the tool is available only through a web interface.
https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Tab3_HTML.png
Dummy
Table 4:
Ablation results on the benchmarks. All times are in seconds. The time limit for each sover and each instance 12 hours.
https://static-content.springer.com/image/chp%3A10.1007%2F978-3-031-91121-7_1/MediaObjects/652625_1_En_1_Tab4_HTML.png
Dummy

8 Conclusion

In this work, we considered Generalized Polynomial Recurrence Systems (GPRS), a wide family of recurrences that allows (i) a system of interdependent recurrence relations, (ii) an arbitrary number of variables, and (iii) conditional recurrence rules. We provided an automated template-based algorithm for finding polynomial solutions, i.e. upper-bounds, for such recurrences. Our algorithm is sound and semi-complete and guaranteed to find the tightest possible polynomial bounds with respect to any user-defined objective function. Moreover, for any fixed degree of polynomial templates, its complexity is PTIME.

Acknowledgments and Notes

We are grateful to the anonymous ESOP reviewers for their detailed comments, which helped improve this work significantly. The research was partially supported by an Ethereum Foundation Research Grant. Authors are ordered alphabetically.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://​creativecommons.​org/​licenses/​by/​4.​0/​), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Fußnoten
1
However, our setting is more restrictive in the sense that all parts of the recurrence relation have to be polynomial, including the time r(n) spent on preprocessing each instance.
 
2
We will define this formally in Section 5.
 
3
We will later see that these polynomials are a subset of our Handelman monoid.
 
Literatur
1.
Zurück zum Zitat Akra, M.A., Bazzi, L.: On the solution of linear recurrence equations. Comput. Optim. Appl. 10(2), 195–210 (1998) Akra, M.A., Bazzi, L.: On the solution of linear recurrence equations. Comput. Optim. Appl. 10(2), 195–210 (1998)
2.
Zurück zum Zitat Akshay, S., Chakraborty, S., Goharshady, A.K., Govind, R., Motwani, H.J., Varanasi, S.T.: Automated synthesis of decision lists for polynomial specifications over integers. In: LPAR. pp. 484–502 (2024) Akshay, S., Chakraborty, S., Goharshady, A.K., Govind, R., Motwani, H.J., Varanasi, S.T.: Automated synthesis of decision lists for polynomial specifications over integers. In: LPAR. pp. 484–502 (2024)
3.
Zurück zum Zitat Akshay, S., Chakraborty, S., Goharshady, A.K., Govind, R., Motwani, H.J., Varanasi, S.T.: Practical approximate quantifier elimination for non-linear real arithmetic. In: FM. pp. 111–130 (2024) Akshay, S., Chakraborty, S., Goharshady, A.K., Govind, R., Motwani, H.J., Varanasi, S.T.: Practical approximate quantifier elimination for non-linear real arithmetic. In: FM. pp. 111–130 (2024)
4.
Zurück zum Zitat Albert, E., Arenas, P., Genaim, S., Puebla, G.: Automatic inference of upper bounds for recurrence relations in cost analysis. In: SAS. pp. 221–237 (2008) Albert, E., Arenas, P., Genaim, S., Puebla, G.: Automatic inference of upper bounds for recurrence relations in cost analysis. In: SAS. pp. 221–237 (2008)
6.
Zurück zum Zitat Asadi, A., Chatterjee, K., Fu, H., Goharshady, A.K., Mahdavi, M.: Polynomial reachability witnesses via stellensätze. In: PLDI. pp. 772–787 (2021) Asadi, A., Chatterjee, K., Fu, H., Goharshady, A.K., Mahdavi, M.: Polynomial reachability witnesses via stellensätze. In: PLDI. pp. 772–787 (2021)
7.
Zurück zum Zitat Atkey, R.: Amortised resource analysis with separation logic. Log. Methods Comput. Sci. 7(2) (2011) Atkey, R.: Amortised resource analysis with separation logic. Log. Methods Comput. Sci. 7(2) (2011)
8.
Zurück zum Zitat Barbosa, H., Barrett, C.W., Brain, M., Kremer, G., Lachnitt, H., Mann, M., Mohamed, A., Mohamed, M., Niemetz, A., Nötzli, A., Ozdemir, A., Preiner, M., Reynolds, A., Sheng, Y., Tinelli, C., Zohar, Y.: cvc5: A versatile and industrial-strength SMT solver. In: TACAS. pp. 415–442 (2022) Barbosa, H., Barrett, C.W., Brain, M., Kremer, G., Lachnitt, H., Mann, M., Mohamed, A., Mohamed, M., Niemetz, A., Nötzli, A., Ozdemir, A., Preiner, M., Reynolds, A., Sheng, Y., Tinelli, C., Zohar, Y.: cvc5: A versatile and industrial-strength SMT solver. In: TACAS. pp. 415–442 (2022)
9.
Zurück zum Zitat Barrett, C., Conway, C.L., Deters, M., Hadarean, L., Jovanović, D., King, T., Reynolds, A., Tinelli, C.: Cvc4. In: CAV. pp. 171–177 (2011) Barrett, C., Conway, C.L., Deters, M., Hadarean, L., Jovanović, D., King, T., Reynolds, A., Tinelli, C.: Cvc4. In: CAV. pp. 171–177 (2011)
11.
Zurück zum Zitat Basu, S., Pollack, R., Roy, M.F.: Existential theory of the reals. Algorithms in Real Algebraic Geometry pp. 505–532 (2006) Basu, S., Pollack, R., Roy, M.F.: Existential theory of the reals. Algorithms in Real Algebraic Geometry pp. 505–532 (2006)
12.
Zurück zum Zitat Bentley, J.L., Haken, D., Saxe, J.B.: A general method for solving divide-and-conquer recurrences. SIGACT News 12(3), 36–44 (1980) Bentley, J.L., Haken, D., Saxe, J.B.: A general method for solving divide-and-conquer recurrences. SIGACT News 12(3), 36–44 (1980)
13.
Zurück zum Zitat Beyer, D.: Competition on software verification and witness validation: SV-COMP 2023. In: TACAS. pp. 495–522 (2023) Beyer, D.: Competition on software verification and witness validation: SV-COMP 2023. In: TACAS. pp. 495–522 (2023)
14.
Zurück zum Zitat Blekherman, G., Parrilo, P.A., Thomas, R.R.: Semidefinite optimization and convex algebraic geometry (2012) Blekherman, G., Parrilo, P.A., Thomas, R.R.: Semidefinite optimization and convex algebraic geometry (2012)
15.
Zurück zum Zitat Breck, J., Cyphert, J., Kincaid, Z., Reps, T.W.: Templates and recurrences: better together. In: PLDI. pp. 688–702 (2020) Breck, J., Cyphert, J., Kincaid, Z., Reps, T.W.: Templates and recurrences: better together. In: PLDI. pp. 688–702 (2020)
16.
Zurück zum Zitat Cai, Z., Farokhnia, S., Goharshady, A.K., Hitarth, S.: Asparagus: Automated synthesis of parametric gas upper-bounds for smart contracts. Proc. ACM Program. Lang. 7(OOPSLA2), 882–911 (2023) Cai, Z., Farokhnia, S., Goharshady, A.K., Hitarth, S.: Asparagus: Automated synthesis of parametric gas upper-bounds for smart contracts. Proc. ACM Program. Lang. 7(OOPSLA2), 882–911 (2023)
17.
Zurück zum Zitat Campbell, B.: Amortised memory analysis using the depth of data structures. In: ESOP. vol. 5502, pp. 190–204 (2009) Campbell, B.: Amortised memory analysis using the depth of data structures. In: ESOP. vol. 5502, pp. 190–204 (2009)
18.
Zurück zum Zitat Canny, J.: Some algebraic and geometric computations in PSPACE. In: STOC. pp. 460–467 (1988) Canny, J.: Some algebraic and geometric computations in PSPACE. In: STOC. pp. 460–467 (1988)
19.
Zurück zum Zitat Carbonneaux, Q., Hoffmann, J., Ramananandro, T., Shao, Z.: End-to-end verification of stack-space bounds for C programs. In: PLDI. pp. 270–281 (2014) Carbonneaux, Q., Hoffmann, J., Ramananandro, T., Shao, Z.: End-to-end verification of stack-space bounds for C programs. In: PLDI. pp. 270–281 (2014)
20.
Zurück zum Zitat Carbonneaux, Q., Hoffmann, J., Reps, T.W., Shao, Z.: Automated resource analysis with Coq proof objects. In: CAV. pp. 64–85 (2017) Carbonneaux, Q., Hoffmann, J., Reps, T.W., Shao, Z.: Automated resource analysis with Coq proof objects. In: CAV. pp. 64–85 (2017)
21.
Zurück zum Zitat Carbonneaux, Q., Hoffmann, J., Shao, Z.: Compositional certified resource bounds. In: PLDI. pp. 467–478 (2015) Carbonneaux, Q., Hoffmann, J., Shao, Z.: Compositional certified resource bounds. In: PLDI. pp. 467–478 (2015)
22.
Zurück zum Zitat Charguéraud, A., Pottier, F.: Verifying the correctness and amortized complexity of a union-find implementation in separation logic with time credits. J. Autom. Reason. 62(3), 331–365 (2019) Charguéraud, A., Pottier, F.: Verifying the correctness and amortized complexity of a union-find implementation in separation logic with time credits. J. Autom. Reason. 62(3), 331–365 (2019)
23.
Zurück zum Zitat Chatterjee, K., Fu, H., Goharshady, A.K.: Termination analysis of probabilistic programs through positivstellensatz’s. In: CAV. pp. 3–22 (2016) Chatterjee, K., Fu, H., Goharshady, A.K.: Termination analysis of probabilistic programs through positivstellensatz’s. In: CAV. pp. 3–22 (2016)
24.
Zurück zum Zitat Chatterjee, K., Fu, H., Goharshady, A.K.: Non-polynomial worst-case analysis of recursive programs. In: CAV. vol. 10427, pp. 41–63 (2017) Chatterjee, K., Fu, H., Goharshady, A.K.: Non-polynomial worst-case analysis of recursive programs. In: CAV. vol. 10427, pp. 41–63 (2017)
25.
Zurück zum Zitat Chatterjee, K., Fu, H., Goharshady, A.K.: Non-polynomial worst-case analysis of recursive programs. ACM Trans. Program. Lang. Syst. 41(4), 20:1–20:52 (2019) Chatterjee, K., Fu, H., Goharshady, A.K.: Non-polynomial worst-case analysis of recursive programs. ACM Trans. Program. Lang. Syst. 41(4), 20:1–20:52 (2019)
26.
Zurück zum Zitat Chatterjee, K., Fu, H., Goharshady, A.K., Goharshady, E.K.: Polynomial invariant generation for non-deterministic recursive programs. In: PLDI. pp. 672–687 (2020) Chatterjee, K., Fu, H., Goharshady, A.K., Goharshady, E.K.: Polynomial invariant generation for non-deterministic recursive programs. In: PLDI. pp. 672–687 (2020)
27.
Zurück zum Zitat Chatterjee, K., Fu, H., Goharshady, A.K., Okati, N.: Computational approaches for stochastic shortest path on succinct MDPs. In: IJCAI. pp. 4700–4707 (2018) Chatterjee, K., Fu, H., Goharshady, A.K., Okati, N.: Computational approaches for stochastic shortest path on succinct MDPs. In: IJCAI. pp. 4700–4707 (2018)
28.
Zurück zum Zitat Chatterjee, K., Fu, H., Novotný, P., Hasheminezhad, R.: Algorithmic analysis of qualitative and quantitative termination problems for affine probabilistic programs. In: POPL. pp. 327–342 (2016) Chatterjee, K., Fu, H., Novotný, P., Hasheminezhad, R.: Algorithmic analysis of qualitative and quantitative termination problems for affine probabilistic programs. In: POPL. pp. 327–342 (2016)
29.
Zurück zum Zitat Chatterjee, K., Goharshady, A.K., Goharshady, E.K., Karrabi, M., Zikelic, D.: Sound and complete witnesses for template-based verification of LTL properties on polynomial programs. In: FM. pp. 600–619 (2024) Chatterjee, K., Goharshady, A.K., Goharshady, E.K., Karrabi, M., Zikelic, D.: Sound and complete witnesses for template-based verification of LTL properties on polynomial programs. In: FM. pp. 600–619 (2024)
30.
Zurück zum Zitat Chatterjee, K., Goharshady, A.K., Goyal, P., Ibsen-Jensen, R., Pavlogiannis, A.: Faster algorithms for dynamic algebraic queries in basic RSMs with constant treewidth. ACM Trans. Program. Lang. Syst. 41(4), 23:1–23:46 (2019) Chatterjee, K., Goharshady, A.K., Goyal, P., Ibsen-Jensen, R., Pavlogiannis, A.: Faster algorithms for dynamic algebraic queries in basic RSMs with constant treewidth. ACM Trans. Program. Lang. Syst. 41(4), 23:1–23:46 (2019)
31.
Zurück zum Zitat Chatterjee, K., Goharshady, A.K., Ibsen-Jensen, R., Pavlogiannis, A.: Algorithms for algebraic path properties in concurrent systems of constant treewidth components. In: POPL. pp. 733–747 (2016) Chatterjee, K., Goharshady, A.K., Ibsen-Jensen, R., Pavlogiannis, A.: Algorithms for algebraic path properties in concurrent systems of constant treewidth components. In: POPL. pp. 733–747 (2016)
32.
Zurück zum Zitat Chatterjee, K., Goharshady, A.K., Meggendorfer, T., Zikelic, D.: Sound and complete certificates for quantitative termination analysis of probabilistic programs. In: CAV. pp. 55–78 (2022) Chatterjee, K., Goharshady, A.K., Meggendorfer, T., Zikelic, D.: Sound and complete certificates for quantitative termination analysis of probabilistic programs. In: CAV. pp. 55–78 (2022)
33.
Zurück zum Zitat Chatterjee, K., Goharshady, A.K., Meggendorfer, T., Zikelic, D.: Quantitative bounds on resource usage of probabilistic programs. Proc. ACM Program. Lang. 8(OOPSLA1), 362–391 (2024) Chatterjee, K., Goharshady, A.K., Meggendorfer, T., Zikelic, D.: Quantitative bounds on resource usage of probabilistic programs. Proc. ACM Program. Lang. 8(OOPSLA1), 362–391 (2024)
34.
Zurück zum Zitat Chatterjee, K., Ibsen-Jensen, R., Goharshady, A.K., Pavlogiannis, A.: Algorithms for algebraic path properties in concurrent systems of constant treewidth components. ACM Trans. Program. Lang. Syst. 40(3), 9:1–9:43 (2018) Chatterjee, K., Ibsen-Jensen, R., Goharshady, A.K., Pavlogiannis, A.: Algorithms for algebraic path properties in concurrent systems of constant treewidth components. ACM Trans. Program. Lang. Syst. 40(3), 9:1–9:43 (2018)
35.
Zurück zum Zitat Chaudhuri, S., Dubhashi, D.P.: Probabilistic recurrence relations revisited. Theor. Comput. Sci. 181(1), 45–56 (1997) Chaudhuri, S., Dubhashi, D.P.: Probabilistic recurrence relations revisited. Theor. Comput. Sci. 181(1), 45–56 (1997)
36.
Zurück zum Zitat Colón, M., Sankaranarayanan, S., Sipma, H.: Linear invariant generation using non-linear constraint solving. In: CAV. pp. 420–432 (2003) Colón, M., Sankaranarayanan, S., Sipma, H.: Linear invariant generation using non-linear constraint solving. In: CAV. pp. 420–432 (2003)
37.
Zurück zum Zitat Conrado, G.K., Goharshady, A.K., Kochekov, K., Tsai, Y.C., Zaher, A.K.: Exploiting the sparseness of control-flow and call graphs for efficient and on-demand algebraic program analysis. Proc. ACM Program. Lang. 7(OOPSLA2), 1993–2022 (2023) Conrado, G.K., Goharshady, A.K., Kochekov, K., Tsai, Y.C., Zaher, A.K.: Exploiting the sparseness of control-flow and call graphs for efficient and on-demand algebraic program analysis. Proc. ACM Program. Lang. 7(OOPSLA2), 1993–2022 (2023)
38.
Zurück zum Zitat Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to algorithms (1990) Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to algorithms (1990)
39.
Zurück zum Zitat Cygan, M., Fomin, F.V., Kowalik, Ł., Lokshtanov, D., Marx, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Parameterized algorithms (2015) Cygan, M., Fomin, F.V., Kowalik, Ł., Lokshtanov, D., Marx, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Parameterized algorithms (2015)
40.
Zurück zum Zitat Cyphert, J., Kincaid, Z.: Solvable polynomial ideals: The ideal reflection for program analysis. Proc. ACM Program. Lang. 8(POPL), 724–752 (2024) Cyphert, J., Kincaid, Z.: Solvable polynomial ideals: The ideal reflection for program analysis. Proc. ACM Program. Lang. 8(POPL), 724–752 (2024)
41.
Zurück zum Zitat Das, A., Balzer, S., Hoffmann, J., Pfenning, F., Santurkar, I.: Resource-aware session types for digital contracts. In: CSF. pp. 1–16 (2021) Das, A., Balzer, S., Hoffmann, J., Pfenning, F., Santurkar, I.: Resource-aware session types for digital contracts. In: CSF. pp. 1–16 (2021)
42.
Zurück zum Zitat Das, A., Hoffmann, J., Pfenning, F.: Work analysis with resource-aware session types. In: LICS. pp. 305–314 (2018) Das, A., Hoffmann, J., Pfenning, F.: Work analysis with resource-aware session types. In: LICS. pp. 305–314 (2018)
43.
Zurück zum Zitat Das, A., Qadeer, S.: Exact and linear-time gas-cost analysis. In: SAS. vol. 12389, pp. 333–356 (2020) Das, A., Qadeer, S.: Exact and linear-time gas-cost analysis. In: SAS. vol. 12389, pp. 333–356 (2020)
44.
Zurück zum Zitat Downey, R.G., Fellows, M.R.: Parameterized complexity (2012) Downey, R.G., Fellows, M.R.: Parameterized complexity (2012)
45.
Zurück zum Zitat Esparza, J., Kiefer, S., Luttenberger, M.: Newtonian program analysis. J. ACM 57(6), 33:1–33:47 (2010) Esparza, J., Kiefer, S., Luttenberger, M.: Newtonian program analysis. J. ACM 57(6), 33:1–33:47 (2010)
46.
Zurück zum Zitat Farkas, J.: Theorie der einfachen ungleichungen (in German). Journal für die reine und angewandte Mathematik 1902(124), 1–27 (1902) Farkas, J.: Theorie der einfachen ungleichungen (in German). Journal für die reine und angewandte Mathematik 1902(124), 1–27 (1902)
47.
Zurück zum Zitat Farzan, A., Kincaid, Z.: Compositional recurrence analysis. In: FMCAD. pp. 57–64 (2015) Farzan, A., Kincaid, Z.: Compositional recurrence analysis. In: FMCAD. pp. 57–64 (2015)
48.
Zurück zum Zitat Fomin, F.V., Grandoni, F., Kratsch, D.: A measure & conquer approach for the analysis of exact algorithms. J. ACM 56(5), 25:1–25:32 (2009) Fomin, F.V., Grandoni, F., Kratsch, D.: A measure & conquer approach for the analysis of exact algorithms. J. ACM 56(5), 25:1–25:32 (2009)
50.
Zurück zum Zitat Goharshady, A.K., Hitarth, S., Mohammadi, F., Motwani, H.J.: Algebro-geometric algorithms for template-based synthesis of polynomial programs. In: OOPSLA. pp. 727–756 (2023) Goharshady, A.K., Hitarth, S., Mohammadi, F., Motwani, H.J.: Algebro-geometric algorithms for template-based synthesis of polynomial programs. In: OOPSLA. pp. 727–756 (2023)
51.
Zurück zum Zitat Handelman, D.: Representing polynomials by positive linear functions on compact convex polyhedra. Pacific Journal of Mathematics 132(1), 35–62 (1988) Handelman, D.: Representing polynomials by positive linear functions on compact convex polyhedra. Pacific Journal of Mathematics 132(1), 35–62 (1988)
52.
Zurück zum Zitat Heintz, J., Roy, M.F., Solernó, P.: Sur la complexité du principe de Tarski-Seidenberg (in French). Bulletin de la Société mathématique de France 118(1), 101–126 (1990) Heintz, J., Roy, M.F., Solernó, P.: Sur la complexité du principe de Tarski-Seidenberg (in French). Bulletin de la Société mathématique de France 118(1), 101–126 (1990)
53.
Zurück zum Zitat Hoffmann, J., Aehlig, K., Hofmann, M.: Multivariate amortized resource analysis. ACM Trans. Program. Lang. Syst. 34(3), 14:1–14:62 (2012) Hoffmann, J., Aehlig, K., Hofmann, M.: Multivariate amortized resource analysis. ACM Trans. Program. Lang. Syst. 34(3), 14:1–14:62 (2012)
56.
Zurück zum Zitat Hoffmann, J., Hofmann, M.: Amortized resource analysis with polymorphic recursion and partial big-step operational semantics. In: APLAS. pp. 172–187 (2010) Hoffmann, J., Hofmann, M.: Amortized resource analysis with polymorphic recursion and partial big-step operational semantics. In: APLAS. pp. 172–187 (2010)
57.
Zurück zum Zitat Hoffmann, J., Hofmann, M.: Amortized resource analysis with polynomial potential. In: ESOP. pp. 287–306 (2010) Hoffmann, J., Hofmann, M.: Amortized resource analysis with polynomial potential. In: ESOP. pp. 287–306 (2010)
58.
Zurück zum Zitat Hoffmann, J., Jost, S.: Two decades of automatic amortized resource analysis. Math. Struct. Comput. Sci. 32(6), 729–759 (2022) Hoffmann, J., Jost, S.: Two decades of automatic amortized resource analysis. Math. Struct. Comput. Sci. 32(6), 729–759 (2022)
59.
Zurück zum Zitat Hofmann, M.: A type system for bounded space and functional in-place update. Nord. J. Comput. 7(4), 258–289 (2000) Hofmann, M.: A type system for bounded space and functional in-place update. Nord. J. Comput. 7(4), 258–289 (2000)
60.
Zurück zum Zitat Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. In: POPL. pp. 185–197 (2003) Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. In: POPL. pp. 185–197 (2003)
61.
Zurück zum Zitat Hofmann, M., Jost, S.: Type-based amortised heap-space analysis. In: ESOP. pp. 22–37 (2006) Hofmann, M., Jost, S.: Type-based amortised heap-space analysis. In: ESOP. pp. 22–37 (2006)
62.
Zurück zum Zitat Hofmann, M., Rodriguez, D.: Efficient type-checking for amortised heap-space analysis. In: CSL. pp. 317–331 (2009) Hofmann, M., Rodriguez, D.: Efficient type-checking for amortised heap-space analysis. In: CSL. pp. 317–331 (2009)
63.
Zurück zum Zitat Huang, M., Fu, H., Chatterjee, K., Goharshady, A.K.: Modular verification for almost-sure termination of probabilistic programs. Proc. ACM Program. Lang. 3(OOPSLA), 129:1–129:29 (2019) Huang, M., Fu, H., Chatterjee, K., Goharshady, A.K.: Modular verification for almost-sure termination of probabilistic programs. Proc. ACM Program. Lang. 3(OOPSLA), 129:1–129:29 (2019)
64.
Zurück zum Zitat Humenberger, A., Jaroschek, M., Kovács, L.: Automated generation of non-linear loop invariants utilizing hypergeometric sequences. In: ISSAC. pp. 221–228 (2017) Humenberger, A., Jaroschek, M., Kovács, L.: Automated generation of non-linear loop invariants utilizing hypergeometric sequences. In: ISSAC. pp. 221–228 (2017)
65.
Zurück zum Zitat Ishimwe, D., Nguyen, K., Nguyen, T.: Dynaplex: analyzing program complexity using dynamically inferred recurrence relations. Proc. ACM Program. Lang. 5(OOPSLA), 1–23 (2021) Ishimwe, D., Nguyen, K., Nguyen, T.: Dynaplex: analyzing program complexity using dynamically inferred recurrence relations. Proc. ACM Program. Lang. 5(OOPSLA), 1–23 (2021)
66.
Zurück zum Zitat Jost, S., Vasconcelos, P.B., Florido, M., Hammond, K.: Type-based cost analysis for lazy functional languages. J. Autom. Reason. 59(1), 87–120 (2017) Jost, S., Vasconcelos, P.B., Florido, M., Hammond, K.: Type-based cost analysis for lazy functional languages. J. Autom. Reason. 59(1), 87–120 (2017)
67.
Zurück zum Zitat Kahn, D.M., Hoffmann, J.: Exponential automatic amortized resource analysis. In: FoSSaCS. pp. 359–380 (2020) Kahn, D.M., Hoffmann, J.: Exponential automatic amortized resource analysis. In: FoSSaCS. pp. 359–380 (2020)
68.
Zurück zum Zitat Karp, R.M.: Probabilistic recurrence relations. In: STOC. pp. 190–197. ACM (1991) Karp, R.M.: Probabilistic recurrence relations. In: STOC. pp. 190–197. ACM (1991)
69.
Zurück zum Zitat Karp, R.M.: Probabilistic recurrence relations. J. ACM 41(6), 1136–1150 (1994) Karp, R.M.: Probabilistic recurrence relations. J. ACM 41(6), 1136–1150 (1994)
70.
Zurück zum Zitat Kincaid, Z., Breck, J., Boroujeni, A.F., Reps, T.W.: Compositional recurrence analysis revisited. In: PLDI. pp. 248–262 (2017) Kincaid, Z., Breck, J., Boroujeni, A.F., Reps, T.W.: Compositional recurrence analysis revisited. In: PLDI. pp. 248–262 (2017)
71.
Zurück zum Zitat Kincaid, Z., Reps, T.W., Cyphert, J.: Algebraic program analysis. In: CAV. pp. 46–83 (2021) Kincaid, Z., Reps, T.W., Cyphert, J.: Algebraic program analysis. In: CAV. pp. 46–83 (2021)
72.
Zurück zum Zitat Kovács, L.: Reasoning algebraically about p-solvable loops. In: TACAS. pp. 249–264 (2008) Kovács, L.: Reasoning algebraically about p-solvable loops. In: TACAS. pp. 249–264 (2008)
73.
Zurück zum Zitat Kovács, L., Voronkov, A.: First-order theorem proving and vampire. In: CAV. pp. 1–35 (2013) Kovács, L., Voronkov, A.: First-order theorem proving and vampire. In: CAV. pp. 1–35 (2013)
74.
Zurück zum Zitat Kovács, L., Jebelean, T.: Automated generation of loop invariants by recurrence solving in theorema (01 2004) Kovács, L., Jebelean, T.: Automated generation of loop invariants by recurrence solving in theorema (01 2004)
75.
Zurück zum Zitat Lin, F.: A formalization of programs in first-order logic with a discrete linear order. Artif. Intell. 235, 1–25 (2016) Lin, F.: A formalization of programs in first-order logic with a discrete linear order. Artif. Intell. 235, 1–25 (2016)
76.
Zurück zum Zitat Liu, H., Fu, H., Yu, Z., Song, J., Li, G.: Scalable linear invariant generation with Farkas’ lemma. In: OOPSLA. pp. 204–232 (2022) Liu, H., Fu, H., Yu, Z., Song, J., Li, G.: Scalable linear invariant generation with Farkas’ lemma. In: OOPSLA. pp. 204–232 (2022)
77.
Zurück zum Zitat Macintyre, A., Wilkie, A.J., Odifreddi, P.: On the decidability of the real exponential field. Kreisel’s Mathematics 115, 451 (1996) Macintyre, A., Wilkie, A.J., Odifreddi, P.: On the decidability of the real exponential field. Kreisel’s Mathematics 115,  451 (1996)
80.
Zurück zum Zitat de Moura, L.M., Bjørner, N.S.: Z3: an efficient SMT solver. In: TACAS. pp. 337–340 (2008) de Moura, L.M., Bjørner, N.S.: Z3: an efficient SMT solver. In: TACAS. pp. 337–340 (2008)
82.
Zurück zum Zitat Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: VMCAI. vol. 2937, pp. 239–251 (2004) Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: VMCAI. vol. 2937, pp. 239–251 (2004)
83.
Zurück zum Zitat Putinar, M.: Positive polynomials on compact semi-algebraic sets. Indiana University Mathematics Journal 42(3), 969–984 (1993) Putinar, M.: Positive polynomials on compact semi-algebraic sets. Indiana University Mathematics Journal 42(3), 969–984 (1993)
84.
Zurück zum Zitat Reps, T.W., Turetsky, E., Prabhu, P.: Newtonian program analysis via tensor product. In: POPL. pp. 663–677 (2016) Reps, T.W., Turetsky, E., Prabhu, P.: Newtonian program analysis via tensor product. In: POPL. pp. 663–677 (2016)
85.
Zurück zum Zitat Sankaranarayanan, S., Sipma, H., Manna, Z.: Non-linear loop invariant generation using Gröbner bases. In: POPL. pp. 318–329 (2004) Sankaranarayanan, S., Sipma, H., Manna, Z.: Non-linear loop invariant generation using Gröbner bases. In: POPL. pp. 318–329 (2004)
86.
Zurück zum Zitat Schoutens, H.: Muchnik’s proof of Tarski-Seidenberg. Ohio State University (2001) Schoutens, H.: Muchnik’s proof of Tarski-Seidenberg. Ohio State University (2001)
87.
Zurück zum Zitat Semenov, A.: Decision procedures for logical theories (in Russian). Cybernetics and computer technology 2, 134–146 (1986) Semenov, A.: Decision procedures for logical theories (in Russian). Cybernetics and computer technology 2, 134–146 (1986)
88.
Zurück zum Zitat Strassen, V.: Gaussian elimination is not optimal. Numerische Mathematik 13(4), 354–356 (1969) Strassen, V.: Gaussian elimination is not optimal. Numerische Mathematik 13(4), 354–356 (1969)
89.
Zurück zum Zitat Sun, Y., Fu, H., Chatterjee, K., Goharshady, A.K.: Automated tail bound analysis for probabilistic recurrence relations. In: CAV. pp. 16–39 (2023) Sun, Y., Fu, H., Chatterjee, K., Goharshady, A.K.: Automated tail bound analysis for probabilistic recurrence relations. In: CAV. pp. 16–39 (2023)
90.
Zurück zum Zitat Tassarotti, J., Harper, R.: Verified tail bounds for randomized programs. In: ITP. pp. 560–578 (2018) Tassarotti, J., Harper, R.: Verified tail bounds for randomized programs. In: ITP. pp. 560–578 (2018)
91.
Zurück zum Zitat Wang, C., Lin, F.: Solving conditional linear recurrences for program verification: The periodic case. In: OOPSLA. pp. 28–55 (2023) Wang, C., Lin, F.: Solving conditional linear recurrences for program verification: The periodic case. In: OOPSLA. pp. 28–55 (2023)
92.
Zurück zum Zitat Wang, D., Kahn, D.M., Hoffmann, J.: Raising expectations: automating expected cost analysis with types. Proc. ACM Program. Lang. 4(ICFP), 110:1–110:31 (2020) Wang, D., Kahn, D.M., Hoffmann, J.: Raising expectations: automating expected cost analysis with types. Proc. ACM Program. Lang. 4(ICFP), 110:1–110:31 (2020)
93.
Zurück zum Zitat Wang, J., Sun, Y., Fu, H., Chatterjee, K., Goharshady, A.K.: Quantitative analysis of assertion violations in probabilistic programs. In: PLDI. pp. 1171–1186 (2021) Wang, J., Sun, Y., Fu, H., Chatterjee, K., Goharshady, A.K.: Quantitative analysis of assertion violations in probabilistic programs. In: PLDI. pp. 1171–1186 (2021)
94.
Zurück zum Zitat Wang, P., Fu, H., Goharshady, A.K., Chatterjee, K., Qin, X., Shi, W.: Cost analysis of nondeterministic probabilistic programs. In: PLDI. pp. 204–220 (2019) Wang, P., Fu, H., Goharshady, A.K., Chatterjee, K., Qin, X., Shi, W.: Cost analysis of nondeterministic probabilistic programs. In: PLDI. pp. 204–220 (2019)
95.
Zurück zum Zitat Watkins, D.S.: Fundamentals of matrix computations (2004) Watkins, D.S.: Fundamentals of matrix computations (2004)
Metadaten
Titel
Efficient Synthesis of Tight Polynomial Upper-Bounds for Systems of Conditional Polynomial Recurrences
verfasst von
Amir K. Goharshady
S. Hitarth
Sergei Novozhilov
Copyright-Jahr
2025
DOI
https://doi.org/10.1007/978-3-031-91121-7_1