#interval-tree #clock #interval #vector #causal #lamports

itc

Interval Tree Clocks as described in the itc2008 paper

3 releases

Uses old Rust 2015

0.1.2 Apr 12, 2017
0.1.1 Nov 21, 2016
0.1.0 Nov 9, 2016

#2217 in Data structures

22 downloads per month

Apache-2.0

33KB
778 lines

Build Status

Interval Tree Clocks

Implementation of itc2008

Documentation

https://docs.rs/itc


lib.rs:

Interval Tree Clocks

The itc crate implements Interval Tree Clocks as described in http://gsd.di.uminho.pt/members/cbm/ps/itc2008.pdf

Usage:

use itc::*;

let s = Stamp::seed();

let (s1, s2) = s.fork();
let s1prime = s1.event();
let s2prime = s2.event();
let s3 = s2prime.join(&s1);

assert!(s.leq(&s1));
assert!(s1.leq(&s1prime));
assert!(!s1prime.leq(&s2prime));
assert!(s2prime.leq(&s3));

This module implements the 4 verbs: fork, event, join, peek, the 3 derived verbs: send, receive and sync, and a partial ordering to establish causality / the happens-before relation. Also in the box is a simple ascii coding representation suitable for printing to stdout and use in protocols.

No runtime deps