Skip to main content

Sequence Operations Language

Motif uses a tiny but mighty domain-specific language, Sequence Operations Language (SOL), which makes working with sequences natural. It is easy to learn and fun to use. And you'll be pleasantly surprised by how your usually complex questions turn into short and fast queries.

The most important concepts in SOL are matching and replacing. They allow you to label complex event patterns and transform data. They are similar to regular expressions, but work on sequences of events instead of strings of characters and have a user-friendly syntax.

SOL is also inspired by SQL, dplyr, Cypher, and Python.

The key approach to working with data in SOL is to specify event patterns, which label important sub-sequences of events as tags, and then to provide operations for computing on and modifying tagged events. A tag is a label over one or more consecutive events in a sequence.

Here is a quick SOL introduction video:

The next several pages go over key SOL concepts.