Hostname: page-component-76d6cb85b7-7262s Total loading time: 0 Render date: 2026-07-15T06:41:17.267Z Has data issue: false hasContentIssue false

A Datalog Framework for Conflict-Free Replicated Data Types

Published online by Cambridge University Press:  15 July 2026

ELENA YANAKIEVA
Affiliation:
RPTU, Germany (e-mails: elena.yanakieva@cs.rptu.de, bieniusa@cs.uni-kl.de)
ANNETTE BIENIUSA
Affiliation:
RPTU, Germany (e-mails: elena.yanakieva@cs.rptu.de, bieniusa@cs.uni-kl.de)
STEFANIA DUMBRAVA
Affiliation:
ENSIIE, France Inria Research Centre of Paris, France IRIF, France SAMOVAR, France (e-mail: stefania.dumbrava@ensiie.fr)
Rights & Permissions [Opens in a new window]

Abstract

Distributed applications increasingly support local-first collaboration over shared data, allowing multiple users to perform updates concurrently without global coordination. Such collaboration requires careful design to capture the intended semantics of the concurrent interactions. We introduce a declarative framework for specifying and reasoning about the semantics of conflict-free replicated data types (CRDTs) and CRDT-based applications in Datalog. The framework models CRDT semantics as executable logic programs over operation contexts, making concurrency explicit and compositional, and thus amenable to automated analysis. As one application, we use property-based testing to compare implementations. To the best of our knowledge, this is the first work to systematically use Datalog as a foundation for prototyping and analyzing complex CRDTs and their compositions. We evaluate our methodology using a collaborative graph data editing case study and report experimentation results assessing correctness validation and scalability with an increasing number of operations and replicas.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Table 1. Operations for a directed graph with isolate-delete (ID) semantics; only isolated, non-connected nodes may be removedTable 1 long description.

Figure 1

Figure 1. Dangling edge scenario.

Figure 2

Figure 2. Example operation context for an add-wins set and its Datalog encoding.

Figure 3

Figure 3. Workflow for deriving and validating CRDT compositions. From application requirements, the user defines the SLS, decomposes it into CRDTs with transformation rules (ICS), and validates equivalence. Mismatches require revising the decomposition.

Figure 4

Table 2. Summary of datatype operationsTable 2 long description.

Figure 5

Listing 1. Add-wins set semantics.

Figure 6

Figure 4. Layered transformation for update-wins Map$\langle$Set$\rangle$.

Figure 7

Listing 2. Map$\langle$Set$\rangle$ semantics expressed in Datalog.

Figure 8

Listing 3. Value set semantics expressed for ICS Map$\langle$Set$\rangle$.

Figure 9

Listing 4. SLS semantics of isolate-delete graph.

Figure 10

Figure 5. Layered transformation for isolate-delete graph.

Figure 11

Listing 5. ICS for isolate-delete graph.

Figure 12

Listing 6. SLS for DD graph (edge rules).

Figure 13

Figure 6. Transformation rules for detach-delete graph.

Figure 14

Listing 7. ICS for DD graph. Transformation rules for the edges.

Figure 15

Figure 7. Figure 7 long description.Scalability of SLS and ICS for isolate-delete (ID) and detach-delete (DD).

Figure 16

Figure 8. Single vs. incremental SLS and ICS for isolate-delete (ID) and detach-delete (DD).

Supplementary material: File

Yanakieva et al. supplementary material

Yanakieva et al. supplementary material
Download Yanakieva et al. supplementary material(File)
File 167.4 KB