# A Transformational Approach to Resource Analysis with Typed-norms   Inference

**Authors:** Elvira Albert, Samir Genaim, Ra\'ul Guti\'errez, Enrique Martin-Martin

arXiv: 1908.02078 · 2019-08-07

## TL;DR

This paper introduces a transformational, data-flow analysis-based method for automatically inferring typed-norms to estimate program resource consumption across various programming paradigms, demonstrating efficiency and accuracy on benchmarks.

## Contribution

It presents a novel transformational approach to resource analysis using inferred typed-norms via data-flow analysis, applicable to multiple programming paradigms.

## Key findings

- Efficient and accurate analysis on standard benchmarks.
- Applicable across functional, logic, and imperative paradigms.
- Formalized on a simple rule-based representation.

## Abstract

In order to automatically infer the resource consumption of programs, analyzers track how data sizes change along program's execution. Typically, analyzers measure the sizes of data by applying norms which are mappings from data to natural numbers that represent the sizes of the corresponding data. When norms are defined by taking type information into account, they are named typed-norms. This article presents a transformational approach to resource analysis with typed-norms that are inferred by a data-flow analysis. The analysis is based on a transformation of the program into an intermediate abstract program in which each variable is abstracted with respect to all considered norms which are valid for its type. We also present the data-flow analysis to automatically infer the required, useful, typed-norms from programs. Our analysis is formalized on a simple rule-based representation to which programs written in different programming paradigms (e.g., functional, logic, imperative) can be automatically translated. Experimental results on standard benchmarks used by other type-based analyzers show that our approach is both efficient and accurate in practice.   Under consideration in Theory and Practice of Logic Programming (TPLP).

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1908.02078/full.md

## Figures

47 figures with captions in the complete paper: https://tomesphere.com/paper/1908.02078/full.md

## References

38 references — full list in the complete paper: https://tomesphere.com/paper/1908.02078/full.md

---
Source: https://tomesphere.com/paper/1908.02078