fabula 0.1.0

Incremental pattern matching over temporal graphs — core library
Documentation
  • Coverage
  • 90.32%
    280 out of 310 items documented5 out of 109 items with examples
  • Size
  • Source code size: 239.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 19.26 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 1s Average build duration of successful builds.
  • all releases: 1m 1s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • patricker

Fabula

Incremental pattern matching over temporal graphs.

Fabula finds patterns in graphs where edges have validity intervals. You define patterns ("find a character whose loyalty dropped after an institutional failure, with no trust recovery in between"), register them with the engine, and it tracks partial matches incrementally as new edges arrive.

Crate Structure

  • fabula (this crate) — core library with zero dependencies. Pattern types, the DataSource trait, Allen interval algebra, the SiftEngine.
  • fabula-memoryMemGraph, a simple in-memory DataSource for testing.
  • fabula-petgraphDataSource adapter wrapping petgraph::StableGraph.
  • fabula-grafeoDataSource adapter for the Grafeo graph database.

Quick Start

use fabula::prelude::*;

// Define a pattern: two betrayals by the same character
let pattern = PatternBuilder::<String, String>::new("double_betrayal")
    .stage("e1", |s| s
        .edge("e1", "eventType".to_string(), "betray".to_string())
        .edge_bind("e1", "actor".to_string(), "char"))
    .stage("e2", |s| s
        .edge("e2", "eventType".to_string(), "betray".to_string())
        .edge_bind("e2", "actor".to_string(), "char"))
    .build();

assert_eq!(pattern.stages.len(), 2);
assert_eq!(pattern.name, "double_betrayal");

For full evaluation examples, see fabula-memory which provides MemGraph.