Log file analysis
CO2BTL 4 – AnalyzeSDG 9 — Industry, Innovation & InfrastructureModule 2
A log is a sequence of lines, each INFO, WARN or ERROR; this accepts a log containing at least one error. Abstracting a whole line to one symbol is the move that makes it finite-state — and shows why real log analysis reaches for keyword search over the raw characters instead, which is the next case along.
The expression
(E+W+I)*E(E+W+I)*The machine below is its minimal DFA — 2 states over {E, I, W}. Open it in the playground to see the parse tree and the ε-NFA it came from.
Input
Narration
Start in state {{q0,q2,q3,q4,q5,q6,q8,q9,q11,q12},{q0,q2,q4,q6,q7,q8,q9,q11,q12},{q10}} with "IIE" still to read.
Run many strings
One string per line. A blank line means the empty string.