Alcides Fonseca

40.197958, -8.408312

Resource-Aware Programming (RAP)

Resource-Aware Programming (RAP) is an exploratory research project, funded by FCT.

The RAP project aims to give developers more feedback of the resources (time, memory energy) their programs cost, during the development process. The main idea is to have a resource-aware type system, in which each function has a second type, for the energy consumption that it takes, which can be dependent on its inputs, and their resource usage. Being compositional, this type system requires annotations of the standard library (and other FFI features), which we are able to achieve from executing those functions with a diverse range of synthesized inputs and measuring the energy consumption. After a reasonable number of executions, we can infer the probabilistic cost of that functions, and generate the annotation automatically.
Until now, we have developed the core type system in the aeon programming language; a framework to combine different dependent type systems; a term synthesis framework in aeon, to generate random inputs; and a probabilistic synthesis framework to infer the probabilistic program from execution traces.

RAP is funded by FCT:

  • EXPL/CCI-COM/1306/2021 – Main project (13/01/2022-12/01/2024)
  • POR011PRE – Activity Test for Resource-Aware Programming (MN5) (2024)
  • 2025.00002.HPCVLAB.ISTUL* – Acesso HPCvLAB para IST-UL
  • UID/000408/2025LASIGE Research Unit

Team

Software

  • GeneticEngine An hybrid of Grammar-Guided and Strongly Typed Genetic Programming in Python.
  • Aeon A programming language with liquid types, focused on synthesis
  • LiquidJava A library+typechecker + VSCode plugin for Java that adds Liquid Types and TypeState.

Publications

Journal
Conference Proceedings
Workshop Proceedings
Short Papers
Demos
Posters
PhD Thesis
Master Thesis

Funding

fct footer logo