← All problems
Unverified

Linear loop synthesis: When d variables are not enough.

Linear loops (or linear dynamical systems) are an established computational model in our community. We typically understand under a linear loop a simple while loop with a single linear update as shown next.

∗∗x∗∗:=∗∗s∗∗;  while  true  do  ∗∗x∗∗:=M⋅∗∗x∗∗;**x**:= **s**; \; while \; true \; do \; **x** := M \cdot **x**;

Here, ∗∗x∗∗=(x1,…,xd)**x** = (x_1, \dots, x_d) is a vector of rational-valued loop variables and the matrix M∈Qd×dM \in \mathbb{Q}^{d \times d} denotes a linear transformation of Qd\mathbb{Q}^d. In the loop synthesis problem, a polynomial p∈Q[x1,…,xd]p \in \mathbb{Q}[x_1, \dots, x_d] in dd variables is given. The goal is to generate a linear loop (that is, both the update matrix MM and the initialisation vector ss) such that p(x1(n),…,xd(n))=0p(x_1(n), \dots, x_d(n)) = 0 holds after nn-th iteration of the loop for all n∈Nn \in \mathbb{N}. It is natural to start investigations by assuming the same number of variables dd in the loop as in the desired polynomial invariant p(x1,…,xd)=0p(x_1, \dots, x_d) = 0. However, as can be seen from the following example, linear loops with s>ds > d variables are more expressive.

(x,y,z):=(1,2,−1);while  true  do  x:=2x;y:=8y+4z;z:=4z;endwhile; (x,y,z):= (1,2,-1); while \; true \; do \; x:= 2x; y:= 8y+4z; z:= 4z; endwhile;

This linear loop with s=3s=3 variables satisfies a polynomial invariant x3+x2−y=0x^3+x^2-y = 0. While doing so, the loop produces an infinite set of distinct values for (x(n),y(n))(x(n), y(n)). We refer to this as a non−trivialnon-trivial linear loop in 3 variables for p=x3+x2−yp = x^3+x^2-y. Nevertheless, one can prove that no non-trivial linear loop with d=2d=2 variables {x,y}\{x,y\} satisfying p(x,y)=0p(x,y)=0 exists. Question: Let pp be an arbitrary polynomial in dd variables. Does there exist an upper bound NN such that if a non-trivial linear loop satisfying p=0p=0 exists, then there exists a non-trivial linear loop with at most NN variables satisfying the same invariant? If such an upper bound exists and can be computed, a known template-based loop synthesis approach can be used to synthesise all loops satisfying an invariant, provided such loops exist. From the observation above, if NN exists, then N≥d+1N \geq d+1. The challenge to improve the lower bound on NN is the lack of techniques to prove that no loop with fixed number of variables satisfies a given invariant. The techniques that we seek for may be rooted in the theory of C-finite sequences and their algebraic properties: allowing additional variables widens the class of C-finite sequences generated by the loop. Another way to see this is to consider loops with dd variables but affine updates of the form

xi←a1x1+⋯+adxd+a0.x_i \gets a_1x_1 + \dots + a_dx_d + a_0.

Affine loops can be simulated by linear loops with an additional variable x0x_0 which is constantly set to 1. Polynomial invariants of an affine loop with dd variables are thus the invariants in terms of x1,…,xdx_1, \dots, x_d in a linear loop with variables x0,x1,…,xdx_0, x_1, \dots, x_d. However, some of those invariants may not have a linear loop with only dd variables that satisfies them.

Coming soon

Organizer

Boyuan Wang portraitBoyuan Wang
Minghan Wang portraitMinghan Wang
Bochao Li portraitBochao Li
Hongwei Hu portraitHongwei Hu