github.com/vmware/differential-datalog

DDlog is a programming language for incremental computation. It is well suited for writing programs that continuously update their output in response to input changes. A DDlog programmer does not write incremental algorithms; instead they specify the desired input-output mapping in a declarative manner.

Open this visualization on its own page →

Contributors

26

Lines of Code

7,928

From

2018-03-20

To

2020-12-23

About vmware/differential-datalog

Differential Datalog (DDlog) is a programming language designed for incremental computation, allowing developers to write programs that continuously update their output as input changes. Rather than requiring programmers to manually implement incremental algorithms, DDlog uses a declarative approach based on Datalog, where the compiler automatically synthesizes an efficient incremental implementation. The language is built on Frank McSherry's differential dataflow library and targets applications ranging from real-time analytics to cloud management systems and static program analysis.

DDlog has several distinctive characteristics that define its approach. It operates on relational data, accepting streams of updates to input relations and responding with corresponding updates to output relations. The system uses a bottom-up computation model that calculates all possible derived facts from input data following user-defined rules, making it well-suited for applications where all derived facts must be precomputed or where initial computation cost is amortized across many queries. DDlog extends classical Datalog with practical programming features including a strong type system supporting integers, floating point numbers, strings, tuples, vectors, sets, and maps, along with arithmetic operations and string manipulation capabilities.

The project is designed for integration with other applications rather than standalone use. DDlog programs compile into Rust libraries that can be linked against applications written in Rust, C/C++, Java, or Go, enabling strong performance while requiring recompilation for schema or rule changes. The repository includes comprehensive documentation covering tutorials, language reference, command reference, language-specific integration guides for Java, C, Go, and Rust, as well as profiling guidance. DDlog currently operates entirely in-memory on a single machine, though the developers are working on a distributed version to support multi-machine deployment.

Share this video