Ranking Function Detection via SVM: A More General Method

Yue Yuan, Yi Li · IEEE Access · 2019

The existence of a ranking function implies the termination of a loop. Different methods are designed for detection of different classes of ranking functions. Moreover, for loops with polynomial guards and polynomial assignments, existing complete solutions for detecting their ranking functions are mostly with bad complexity. In this paper, we propose an approach to the synthesis of ranking functions for loops via support vector machine (SVM). We transform the ranking function detection problem into a binary classification problem. Once ranking function templates are given, the SVM is used to learn the coefficients of the templates. In this way, candidate ranking functions can be obtained. Finally, existing verification tools are employed to certify the candidates. With our approach, multiple forms of loops can be handled, and multiple classes of ranking functions can be detected. The effectiveness is presented with experimental evidence. We can detect ranking functions (e.g., polynomial ranking functions and non-polynomial ranking functions) for given loops, especially for loops with fractional or radical update that existing tools may not be able to handle as far as we know.

Read the paper · More papers on PaperTik