Strymonas Streams: stream fusion, to completeness

strymonas logo

Strymonas is a streaming library for fast, bulk, single-thread in-memory processing -- of the sort epitomized by Software Defined Radio or Java Streams. It attains the speed and memory efficiency of hand-written state machines, yet provides the familiar declarative interface for finite and infinite streams, supporting any combination of map, filter, take(while), drop(while), zip, flatmap combinators and tupling. Experienced users may use the lower-level interface of stateful streams and implement accumulating maps, compression and windowing.

The library is based on assured code generation (at present, OCaml, C and Scala/Java) and guarantees in all cases complete fusion: if each operation in a pipeline individually runs without any function calls and memory allocations, the entire streaming pipeline runs without calls and allocations. Thus strymonas per se introduces not even constant-size intermediary data structures. The main processing loop thus may run in constant memory and stack space.

In essence, strymonas is a DSL that generates high-performance single-core stream processing code from declarative descriptions of stream pipelines and user actions -- something like Yacc. Unlike Yacc, strymonas is an embedded DSL. There are two flavors of the library, with the host language being OCaml and Scala 3. The C generation back-end needs no other dependencies, the OCaml back-end relies on BER MetaOCaml, and Scala backend uses Scala 3 native metaprogramming facilities.

News

Getting Started


git clone https://github.com/strymonas/strymonas-ocaml
git clone https://github.com/strymonas/strymonas-C
git clone https://github.com/strymonas/strymonas-scala

(For the latest manuals, please visit the each repository.)

Prerequisites

Benchmarks

How to compile and run the benchmarks:

Bugs and Feedback

To discuss bugs and improvements please use our Github Issues for each corresponding flavor, for discussions and recommendations please use our gitter pages.

Team

Old Design (POPL17)

You can find and experiment with the implementations of the old design please follow the guidelines here:

https://github.com/strymonas/strymonas.github.io/blob/master/index-old.md