TL;DR
This paper introduces a type-based static analysis method using refinement types to automatically verify thread-safety in stream-based Android applications, improving developer assurance and reducing bugs.
Contribution
It presents a novel type-refinement approach to automatically track thread execution in stream-based programming frameworks like ReactiveX.
Findings
Successfully identified 33 unsafe UI accesses in open-source apps.
Achieved low annotation overhead of one annotation per 186 lines of code.
Deployed on Uber's codebase to prevent threading bugs in real-time.
Abstract
In stream-based programming, data sources are abstracted as a stream of values that can be manipulated via callback functions. Stream-based programming is exploding in popularity, as it provides a powerful and expressive paradigm for handling asynchronous data sources in interactive software. However, high-level stream abstractions can also make it difficult for developers to reason about control- and data-flow relationships in their programs. This is particularly impactful when asynchronous stream-based code interacts with thread-limited features such as UI frameworks that restrict UI access to a single thread, since the threading behavior of streaming constructs is often non-intuitive and insufficiently documented. In this paper, we present a type-based approach that can statically prove the thread-safety of UI accesses in stream-based software. Our key insight is that the fluent…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
