English

Automatically Enforcing Fresh and Consistent Inputs in Intermittent Systems

Programming Languages 2021-06-22 v2

Abstract

Intermittently powered energy-harvesting devices enable new applications in inaccessible environments. Program executions must be robust to unpredictable power failures, introducing new challenges in programmability and correctness. One hard problem is that input operations have implicit constraints, embedded in the behavior of continuously powered executions, on when input values can be collected and used. This paper aims to develop a formal framework for enforcing these constraints. We identify two key properties -- freshness (i.e., uses of inputs must satisfy the same time constraints as in continuous executions) and temporal consistency (i.e., the collection of a set of inputs must satisfy the same time constraints as in continuous executions). We formalize these properties and show that they can be enforced using atomic regions. We develop Ocelot, an LLVM-based analysis and transformation tool targeting Rust, to enforce these properties automatically. Ocelot provides the programmer with annotations to express these constraints and infers atomic region placement in a program to satisfy them. We then formalize Ocelot's design and show that Ocelot generates correct programs with little performance cost or code changes.

Keywords

Cite

@article{arxiv.2104.04616,
  title  = {Automatically Enforcing Fresh and Consistent Inputs in Intermittent Systems},
  author = {Milijana Surbatovich and Limin Jia and Brandon Lucia},
  journal= {arXiv preprint arXiv:2104.04616},
  year   = {2021}
}

Comments

Updates for camera-ready, add DOI

R2 v1 2026-06-24T01:01:33.454Z