A trace monitor observes the sequence of actions in a software system, and when it detects that thissequence matches a given pattern, it executes some extra code of its own. Trace monitors are oftenspecified declaratively using patterns based on regular expressions, context free grammars or logicalformulae, and then the trace monitor implementation is generated from the specification. Trace monitorsare particularly useful for runtime verification, and many variations have been proposed. ...