# Type-Based Resource Analysis on Haskell

**Authors:** Franz Siglm\"uller (Ludwig Maximilian University of Munich)

arXiv: 1908.06478 · 2019-08-20

## TL;DR

This paper introduces a type-based amortized resource analysis for Haskell, enabling precise resource usage estimation directly on real Haskell code by leveraging GHC's plugin API and a linear upper bounds system.

## Contribution

It presents the first resource analysis method for Haskell that operates directly on actual code using GHC plugins and a linear bounds type system.

## Key findings

- Supports real Haskell code analysis
- Uses GHC Core for simplified representation
- Provides linear upper bounds on resource usage

## Abstract

We propose an amortized analysis that approximates the resource usage of a Haskell expression. Using the plugin API of GHC, we convert the Haskell code into a simplified representation called GHC Core. We then apply a type-based system which derives linear upper bounds on the resource usage. This setup allows us to analyze actual Haskell code, whereas previous implementations of similar analyses do not support any commonly used lazy functional programming languages.

## Full text

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

## Figures

21 figures with captions in the complete paper: https://tomesphere.com/paper/1908.06478/full.md

## References

16 references — full list in the complete paper: https://tomesphere.com/paper/1908.06478/full.md

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