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

08/30/2023
by   Maximiliano Klemen, et al.
0

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.

READ FULL TEXT
research
07/31/2019

Towards a General Framework for Static Cost Analysis of Parallel Logic Programs

The estimation and control of resource usage is now an important challen...
research
07/23/2019

Resource Analysis driven by (Conditional) Termination Proofs

When programs feature a complex control flow, existing techniques for re...
research
08/17/2021

Symbolic Automatic Relations and Their Applications to SMT and CHC Solving

Despite the recent advance of automated program verification, reasoning ...
research
09/25/2021

Closed-form solutions for the inverse kinematics of serial robots using conformal geometric algebra

This work addresses the inverse kinematics of serial robots using confor...
research
08/05/2021

Variational approach to relaxed topological optimization: closed form solutions for structural problems in a sequential pseudo-time framework

The work explores a specific scenario for structural computational optim...
research
06/05/2018

A Projection Method for Metric-Constrained Optimization

We outline a new approach for solving optimization problems which enforc...
research
03/17/2021

Towards Automated Metamorphic Test Identification for Ocean System Models

Metamorphic testing seeks to verify software in the absence of test orac...

Please sign up or login with your details

Forgot password? Click here to reset