A Formalization for Specifying and Implementing Correct Pull-Stream Modules
Erick Lavoie, Laurie Hendren

TL;DR
This paper formalizes the pull-stream design pattern in JavaScript, providing a protocol specification to improve correctness, interoperability, and understanding of modules in streaming applications.
Contribution
It introduces a formal event-based protocol language and precise definitions for pull-stream modules, enabling better reasoning and validation of implementations.
Findings
Validated existing modules against the formal protocol
Identified unspecified behaviors in current modules
Enhanced understanding of pull-stream interactions
Abstract
Pull-stream is a JavaScript demand-driven functional design pattern based on callback functions that enables the creation and easy composition of independent modules that are used to create streaming applications. It is used in popular open source projects and the community around it has created over a hundred compatible modules. While the description of the pull-stream design pattern may seem simple, it does exhibit complicated termination cases. Despite the popularity and large uptake of the pull-stream design pattern, there was no existing formal specification that could help programmers reason about the correctness of their implementations. Thus, the main contribution of this paper is to provide a formalization for specifying and implementing correct pull-stream modules based on the following: (1) we show the pull-stream design pattern is a form of declarative concurrent…
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.
Taxonomy
TopicsLogic, programming, and type systems · Model-Driven Software Engineering Techniques · Formal Methods in Verification
