Punctuated Data Streams - Functions

Punctuation Functions

The match function takes a data item and a punctuation, iterates through the elements of the data item, and matches them with the corresponding pattern elements of the punctuation. If all elements match then match will return true.

match :: D -> P -> boolean
match(d, p) = matchPat(d(1), p(1)) ^ matchPat(d(2), p(2)) ^ . . . ^ matchPat(d(n), p(n))

The combine function takes two punctuations and outputs a new punctuation such that all data items that match both punctuations also match the output punctuation. That is:
combine(p1, p2) = p | match(d, p1) ^ match(d, p2) <=> match(d, p).


Last modified by Pete Tucker on 26 August 2005.