Skip to main content

An implementation of Finite State Automata for event streams

Project description

This is a library for running Finite State Automata (FSA) on bound and unbound streams of event.

It supports

  • non-determininistic FSA’s,

  • noise-tolerant FSA’s (i.e. ignoring some or all non-relevant events),

  • overlapping matched,

  • extensible matching functions for transitions.

TODO: proper documentation

It should describe:

  • how to use the library, through tutorials

    • demonstrating in particular the various ways to build noise-tolerant FSA’s (silent transitions, default transitions, global and state max_noise),

    • explaining the notion of token,

    • explaining the role of finish(), and why a token on a final state may not immediately return a match;

  • the structure of tokens (as returned by feed() and feed_all();

  • the format of the JSON files used to store FSA structures,

    • may be also the format of the JSON files used to save tokens;

  • how to write additional matcher functions,

    • and how they may be used to extend the expressiveness of FSA beyond regular grammars;

  • some of the design choices of the library,

    • especially why an empty sequence is never a match, even if the ‘start’ state is marked as terminal.

Ideas for future extensions

  • export to dot (for graphical presentation)

  • toolkit for handling FSA’s - optimizing - merging

  • more built-in matchers? - prefix - more flexible regexp (i.e. not enforcing ^ and $)

  • converter of regexp to automata

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fsa4streams-0.1.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file fsa4streams-0.1.tar.gz.

File metadata

  • Download URL: fsa4streams-0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fsa4streams-0.1.tar.gz
Algorithm Hash digest
SHA256 cddb6cad209bd8424ab6165afc5d6c3d3f93f65e0b37f74d9a114134cb529d36
MD5 f6a8d5587f85fd9a42e592e343f36753
BLAKE2b-256 2f16f409d214a71d67ff4efab0f9f4489c2ae25ecaab10814622fcbc3c142382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page