{"title":"三角多项式循环的终止","authors":"Marcel Hark, Florian Frohn, Jürgen Giesl","doi":"10.1007/s10703-023-00440-z","DOIUrl":null,"url":null,"abstract":"<p>We consider the problem of proving termination for triangular weakly non-linear loops (<i>twn</i>-loops) over some ring <span>\\(\\mathcal {S}\\)</span> like <span>\\(\\mathbb {Z}\\)</span>, <span>\\(\\mathbb {Q}\\)</span>, or <span>\\(\\mathbb {R}\\)</span>. The guard of such a loop is an arbitrary quantifier-free Boolean formula over (possibly non-linear) polynomial inequations, and the body is a single assignment of the form <span>\\(\\begin{bmatrix} x_1\\\\ \\ldots \\\\ x_d \\end{bmatrix} \\leftarrow \\begin{bmatrix} c_1 \\cdot x_1 + p_1\\\\ \\ldots \\\\ c_d \\cdot x_d + p_d \\end{bmatrix}\\)</span> where each <span>\\(x_i\\)</span> is a variable, <span>\\(c_i \\in \\mathcal {S}\\)</span>, and each <span>\\(p_i\\)</span> is a (possibly non-linear) polynomial over <span>\\(\\mathcal {S}\\)</span> and the variables <span>\\(x_{i+1},\\ldots ,x_{d}\\)</span>. </p><p>We show that the question of termination can be reduced to the existential fragment of the first-order theory of <span>\\(\\mathcal {S}\\)</span>. For loops over <span>\\(\\mathbb {R}\\)</span>, our reduction implies decidability of termination. For loops over <span>\\(\\mathbb {Z}\\)</span> and <span>\\(\\mathbb {Q}\\)</span>, it proves semi-decidability of non-termination.</p><p>Furthermore, we present a transformation to convert certain non-<i>twn</i>-loops into <i>twn</i>-form. Then the original loop terminates iff the transformed loop terminates over a specific subset of <span>\\(\\mathbb {R}\\)</span>, which can also be checked via our reduction. Moreover, we formalize a technique to <i>linearize</i> (the updates of) <i>twn</i>-loops in our setting and analyze its complexity. Based on these results, we prove complexity bounds for the termination problem of <i>twn</i>-loops as well as <i>tight</i> bounds for two important classes of loops which can <i>always</i> be transformed into <i>twn</i>-loops.</p><p>Finally, we show that there is an important class of linear loops. where our decision procedure results in an <i>efficient</i> procedure for termination analysis, i.e., where the parameterized complexity of deciding termination is <i>polynomial</i>.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"1 1","pages":""},"PeriodicalIF":0.7000,"publicationDate":"2023-12-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Termination of triangular polynomial loops\",\"authors\":\"Marcel Hark, Florian Frohn, Jürgen Giesl\",\"doi\":\"10.1007/s10703-023-00440-z\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p>We consider the problem of proving termination for triangular weakly non-linear loops (<i>twn</i>-loops) over some ring <span>\\\\(\\\\mathcal {S}\\\\)</span> like <span>\\\\(\\\\mathbb {Z}\\\\)</span>, <span>\\\\(\\\\mathbb {Q}\\\\)</span>, or <span>\\\\(\\\\mathbb {R}\\\\)</span>. The guard of such a loop is an arbitrary quantifier-free Boolean formula over (possibly non-linear) polynomial inequations, and the body is a single assignment of the form <span>\\\\(\\\\begin{bmatrix} x_1\\\\\\\\ \\\\ldots \\\\\\\\ x_d \\\\end{bmatrix} \\\\leftarrow \\\\begin{bmatrix} c_1 \\\\cdot x_1 + p_1\\\\\\\\ \\\\ldots \\\\\\\\ c_d \\\\cdot x_d + p_d \\\\end{bmatrix}\\\\)</span> where each <span>\\\\(x_i\\\\)</span> is a variable, <span>\\\\(c_i \\\\in \\\\mathcal {S}\\\\)</span>, and each <span>\\\\(p_i\\\\)</span> is a (possibly non-linear) polynomial over <span>\\\\(\\\\mathcal {S}\\\\)</span> and the variables <span>\\\\(x_{i+1},\\\\ldots ,x_{d}\\\\)</span>. </p><p>We show that the question of termination can be reduced to the existential fragment of the first-order theory of <span>\\\\(\\\\mathcal {S}\\\\)</span>. For loops over <span>\\\\(\\\\mathbb {R}\\\\)</span>, our reduction implies decidability of termination. For loops over <span>\\\\(\\\\mathbb {Z}\\\\)</span> and <span>\\\\(\\\\mathbb {Q}\\\\)</span>, it proves semi-decidability of non-termination.</p><p>Furthermore, we present a transformation to convert certain non-<i>twn</i>-loops into <i>twn</i>-form. Then the original loop terminates iff the transformed loop terminates over a specific subset of <span>\\\\(\\\\mathbb {R}\\\\)</span>, which can also be checked via our reduction. Moreover, we formalize a technique to <i>linearize</i> (the updates of) <i>twn</i>-loops in our setting and analyze its complexity. Based on these results, we prove complexity bounds for the termination problem of <i>twn</i>-loops as well as <i>tight</i> bounds for two important classes of loops which can <i>always</i> be transformed into <i>twn</i>-loops.</p><p>Finally, we show that there is an important class of linear loops. where our decision procedure results in an <i>efficient</i> procedure for termination analysis, i.e., where the parameterized complexity of deciding termination is <i>polynomial</i>.</p>\",\"PeriodicalId\":12430,\"journal\":{\"name\":\"Formal Methods in System Design\",\"volume\":\"1 1\",\"pages\":\"\"},\"PeriodicalIF\":0.7000,\"publicationDate\":\"2023-12-04\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Formal Methods in System Design\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://doi.org/10.1007/s10703-023-00440-z\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, THEORY & METHODS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Formal Methods in System Design","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1007/s10703-023-00440-z","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
We consider the problem of proving termination for triangular weakly non-linear loops (twn-loops) over some ring \(\mathcal {S}\) like \(\mathbb {Z}\), \(\mathbb {Q}\), or \(\mathbb {R}\). The guard of such a loop is an arbitrary quantifier-free Boolean formula over (possibly non-linear) polynomial inequations, and the body is a single assignment of the form \(\begin{bmatrix} x_1\\ \ldots \\ x_d \end{bmatrix} \leftarrow \begin{bmatrix} c_1 \cdot x_1 + p_1\\ \ldots \\ c_d \cdot x_d + p_d \end{bmatrix}\) where each \(x_i\) is a variable, \(c_i \in \mathcal {S}\), and each \(p_i\) is a (possibly non-linear) polynomial over \(\mathcal {S}\) and the variables \(x_{i+1},\ldots ,x_{d}\).
We show that the question of termination can be reduced to the existential fragment of the first-order theory of \(\mathcal {S}\). For loops over \(\mathbb {R}\), our reduction implies decidability of termination. For loops over \(\mathbb {Z}\) and \(\mathbb {Q}\), it proves semi-decidability of non-termination.
Furthermore, we present a transformation to convert certain non-twn-loops into twn-form. Then the original loop terminates iff the transformed loop terminates over a specific subset of \(\mathbb {R}\), which can also be checked via our reduction. Moreover, we formalize a technique to linearize (the updates of) twn-loops in our setting and analyze its complexity. Based on these results, we prove complexity bounds for the termination problem of twn-loops as well as tight bounds for two important classes of loops which can always be transformed into twn-loops.
Finally, we show that there is an important class of linear loops. where our decision procedure results in an efficient procedure for termination analysis, i.e., where the parameterized complexity of deciding termination is polynomial.
期刊介绍:
The focus of this journal is on formal methods for designing, implementing, and validating the correctness of hardware (VLSI) and software systems. The stimulus for starting a journal with this goal came from both academia and industry. In both areas, interest in the use of formal methods has increased rapidly during the past few years. The enormous cost and time required to validate new designs has led to the realization that more powerful techniques must be developed. A number of techniques and tools are currently being devised for improving the reliability, and robustness of complex hardware and software systems. While the boundary between the (sub)components of a system that are cast in hardware, firmware, or software continues to blur, the relevant design disciplines and formal methods are maturing rapidly. Consequently, an important (and useful) collection of commonly applicable formal methods are expected to emerge that will strongly influence future design environments and design methods.