arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.07259cs.PLcs.LG
收藏

使用机器学习求解递推关系及其在代价分析中的应用

Solving Recurrence Relations using Machine Learning, with Application to Cost Analysis

Universidad Politécnica de Madrid(马德里理工大学);IMDEA Software Institute(IMDEA软件研究所);University of California, Merced(加州大学默塞德分校);Spanish Council for Scientific Research(西班牙国家研究委员会)

Maximiliano Klemen, Miguel Á. Carreira-Perpiñán, Pedro Lopez-Garcia

AI总结:

针对当前静态代价分析中递推关系求解的瓶颈,提出一种结合机器学习稀疏回归、SMT求解器和CAS的通用方法,能有效求解现有工具无法处理的任意带约束递推关系并找到闭式解。

摘要:

自动静态代价分析在不实际使用具体数据运行程序的情况下推断程序所用资源的信息,并将这些信息表示为输入数据大小的函数。大多数用于逻辑程序(及其他语言)的分析工具基于建立表示谓词计算代价(或其界限)的递推关系,并求解它们以找到等价于(或作为其界限的)闭式函数。这种递推求解在当前工具中是一个瓶颈:分析过程中出现的许多递推无法用当前的求解器(如计算机代数系统,CASs)求解,因此需要针对不同类别的递推开发特定的方法。我们通过开发一种新颖的通用方法来解决这一挑战,该方法用于求解任意的、带约束的递推关系,它使用机器学习稀疏回归技术来猜测候选的闭式函数,并使用SMT求解器和CAS的组合来检查该函数是否确实是递推的解。我们实现了一个原型,并使用代价分析系统(CiaoPP中的系统)生成的递推对其进行了评估。实验结果非常有前景,表明我们的方法能够在合理的时间内为该系统及当前CASs无法求解的各类递推找到闭式解。

英文摘要:

Automatic static cost analysis infers information about the resources used by programs without actually running them with concrete data, and presents such information as functions of input data sizes. Most of the analysis tools for logic programs (and other languages) are based on setting up recurrence relations representing (bounds on) the computational cost of predicates, and solving them to find closed-form functions that are equivalent to (or a bound on) them. Such recurrence solving is a bottleneck in current tools: many of the recurrences that arise during the analysis cannot be solved with current solvers, such as Computer Algebra Systems (CASs), so that specific methods for different classes of recurrences need to be developed. We address such a challenge by developing a novel, general approach for solving arbitrary, constrained recurrence relations, that uses machine-learning sparse regression techniques to guess a candidate closed-form function, and a combination of an SMT-solver and a CAS to check whether such function is actually a solution of the recurrence. We have implemented a prototype and evaluated it with recurrences generated by a cost analysis system (the one in CiaoPP). The experimental results are quite promising, showing that our approach can find closed-form solutions, in a reasonable time, for classes of recurrences that cannot be solved by such a system, nor by current CASs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑