53 lexing programs, syntax highlighting and so on. Given that regular expressions were |
53 lexing programs, syntax highlighting and so on. Given that regular expressions were |
54 introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>, |
54 introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>, |
55 you might think regular expressions have since been studied and implemented to death. But you would definitely be |
55 you might think regular expressions have since been studied and implemented to death. But you would definitely be |
56 mistaken: in fact they are still an active research area. For example |
56 mistaken: in fact they are still an active research area. For example |
57 <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">this paper</A> |
57 <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">this paper</A> |
58 about regular expression matching and partial derivatives was presented last summer at the international |
58 about regular expression matching and derivatives was presented just last summer at the international |
59 FLOPS'14 conference. The task in this project is to implement their results.</p> |
59 FLOPS'14 conference. The task in this project is to implement their results.</p> |
60 |
60 |
61 <p>The background for this project is that some regular expressions are |
61 <p>The background for this project is that some regular expressions are |
62 “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>” |
62 “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>” |
63 and can “stab you in the back” according to |
63 and can “stab you in the back” according to |
64 this <A HREF="http://tech.blog.cueup.com/regular-expressions-will-stab-you-in-the-back">blog post</A>. |
64 this <A HREF="http://peterscott.github.io/2013/01/17/regular-expressions-will-stab-you-in-the-back/">blog post</A>. |
65 For example, if you use in <A HREF="http://www.python.org">Python</A> or |
65 For example, if you use in <A HREF="http://www.python.org">Python</A> or |
66 in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (or also a number of other mainstream programming languages according to this |
66 in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (or also a number of other mainstream programming languages according to this |
67 <A HREF="http://www.computerbytesman.com/redos/">blog</A>) the |
67 <A HREF="http://www.computerbytesman.com/redos/">blog</A>) the |
68 innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string |
68 innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string |
69 <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact, |
69 <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact, |