ERE Plugin2.0 Input Syntax

From FSL
Revision as of 07:19, 30 September 2009 by Clee83 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The MOP ERE plugin uses the following syntax, which is defined in BNF:

// BNF below is extended with {p} for zero or more and [p] for zero or one repetitions of p
// The plugin syntax
<Plugin Input> ::= {<Event>} <ERE Name> ":" <ERE Syntax>
<Event> ::= "event" <Event Name>
<Event Name> ::= <Id>
// The mandatory MOP logic syntax
<ERE Name> ::= "ere"
<ERE Syntax> ::= "empty" | "epsilon"
| <Event Name>
| <ERE Syntax> "*"
| "~" <ERE Syntax>
| <ERE Syntax> "+" <ERE Syntax>
| <ERE Syntax> "&" <ERE Syntax>
| <ERE Syntax> <ERE Syntax>
| "(" <ERE Syntax> ")"
<ERE State> ::= "match" | "fail"

<Plugin Input>

The input syntax for this plugin consists of event definitions (<Event>), the logic name (<ERE Name>), followed by a colon and then an extended regular expression using (<ERE Syntax>).


<Event> defines a name that may be used in the ERE pattern.

<Event Name>

An identifier to represent an event.

<ERE Name>

<ERE Name> instantiates <Logic Name> from the MOP Syntax. It denotes the ERE logic using the string "ere".

<ERE Syntax>

<ERE Syntax> instantiates <Logic Syntax> from the MOP Syntax. The terminal "epsilon" corresponds to the language containing only the empty word, "empty" to the empty language, and <Event Name> to the language containing only the named event as a one-letter word. The different operators in decreasing tightness of binding are ~_ , _*, __, _&_,_+_ and have the following interpretation:

  • ~ P contains all the words except for those accepted by the pattern P.
  • P * contains zero or more occurrences of words accepted by the pattern P.
  • P + P' is the union of words accepted by P and P'.
  • P P' concatenates words accepted by P and those accepted by P'.
  • P & P' is the intersection of words accepted by P and P'.

<ERE State>

<ERE State> instantiates <Logic State> from the MOP Syntax. In an ERE specification, <ERE State> can be the special state match or the special state fail. match corresponds to a situation wherein the trace matches the specified pattern, whereas fail occurs when the trace is not a prefix of any matching trace. The ERE monitor is unable to leave the fail state once it is entered, as an invalid prefix cannot lead to a valid trace.


 event a
 event b
 ere: (a b)* ~(b ~(a b))

This example monitors a fairly complex pattern of as and bs. It matches those strings that are some number (possibly zero) of pairs of a b followed by b a b or a and any combination of bs and as.

Personal tools