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

一种基于机器学习求解递推关系的方法及其在逻辑程序成本分析中的应用

A Machine Learning-based Approach for Solving Recurrence Relations and its use in Cost Analysis of Logic Programs

Technical University of Madrid (UPM)(马德里理工大学(UPM));IMDEA Software Institute(IMDEA软件研究所);University of California, Merced(加州大学默塞德分校);Spanish Council for Scientific Research(西班牙科学研究理事会)

Louis Rustenholz, Maximiliano Klemen, Miguel Ángel Carreira-Perpiñán, Pedro López-García

AI总结:

本文提出一种基于机器学习的递推关系求解方法,结合稀疏线性与符号回归及SMT和CAS验证,用于逻辑程序成本分析,在CiaoPP中优于现有工具。

摘要:

自动静态成本分析在不实际运行程序的情况下推断程序所使用的资源信息,并将这些信息表示为输入数据大小的函数。大多数逻辑程序分析工具(以及许多其他语言的分析工具),如CiaoPP,都基于建立表示谓词计算成本(的界限)的递推关系,并求解这些递推关系以找到封闭形式的函数。这种递推求解是当前工具中的一个瓶颈:分析过程中出现的许多递推关系无法用最先进的求解器(包括计算机代数系统(CAS))求解,因此需要为不同类别的递推关系开发特定的方法。我们通过开发一种新颖的、通用的方法来应对这一挑战,该方法用于求解任意的、带约束的递推关系,它使用机器学习(稀疏线性和符号)回归技术来猜测候选的封闭形式函数,并结合SMT求解器和CAS来检查该函数是否确实是递推关系的解。我们在CiaoPP系统环境中的原型实现和实验评估显示了相当有前景的结果。总体而言,对于所考虑的基准测试,我们的方法优于最先进的成本分析器和递推求解器,并且能够求解它们无法求解的递推关系。本文正在考虑发表于《逻辑编程理论与实践》(TPLP)。

英文摘要:

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 many for other languages), as CiaoPP, are based on setting up recurrence relations representing (bounds on) the computational cost of predicates, and solving them to find closed-form functions. Such recurrence solving is a bottleneck in current tools: many of the recurrences that arise during the analysis cannot be solved with state-of-the-art solvers, including 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-linear and symbolic) regression techniques to guess a candidate closed-form function, and a combination of an SMT-solver and a CAS to check if it is actually a solution of the recurrence. Our prototype implementation and its experimental evaluation within the context of the CiaoPP system show quite promising results. Overall, for the considered benchmarks, our approach outperforms state-of-the-art cost analyzers and recurrence solvers, and solves recurrences that cannot be solved by them. Under consideration in Theory and Practice of Logic Programming (TPLP).

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

↑