31 expressions. They can be used for a very simple regular expression |
31 expressions. They can be used for a very simple regular expression |
32 matching algorithm. Sulzmann and Lu cleverly extended this algorithm |
32 matching algorithm. Sulzmann and Lu cleverly extended this algorithm |
33 in order to deal with POSIX matching, which is the underlying |
33 in order to deal with POSIX matching, which is the underlying |
34 disambiguation strategy for regular expressions needed in lexers. |
34 disambiguation strategy for regular expressions needed in lexers. |
35 Sulzmann and Lu have made available on-line what they call a |
35 Sulzmann and Lu have made available on-line what they call a |
36 ''rigorous proof'' of the correctness of their algorithm w.r.t. their |
36 ``rigorous proof'' of the correctness of their algorithm w.r.t. their |
37 specification; regrettably, it appears to us to have unfillable gaps. |
37 specification; regrettably, it appears to us to have unfillable gaps. |
38 In the first part of this paper we give our inductive definition of |
38 In the first part of this paper we give our inductive definition of |
39 what a POSIX value is and show (i) that such a value is unique (for |
39 what a POSIX value is and show (i) that such a value is unique (for |
40 given regular expression and string being matched) and (ii) that |
40 given regular expression and string being matched) and (ii) that |
41 Sulzmann and Lu's algorithm always generates such a value (provided |
41 Sulzmann and Lu's algorithm always generates such a value (provided |
42 that the regular expression matches the string). We also prove the |
42 that the regular expression matches the string). We also prove the |
43 correctness of an optimised version of the POSIX matching |
43 correctness of an optimised version of the POSIX matching |
44 algorithm. Our definitions and proof are much simpler than those by |
44 algorithm. Our definitions and proof are much simpler than those by |
45 Sulzmann and Lu and can be easily formalised in Isabelle/HOL. In the |
45 Sulzmann and Lu and can be easily formalised in Isabelle/HOL. In the |
46 second part we analyse the correctness argument by Sulzmann and Lu and |
46 second part we analyse the correctness argument by Sulzmann and Lu and |
47 explain why it seems hard to turn it into a proof rigorous enough to |
47 explain why the gaps in this argument cannot be filled easily. |
48 be accepted by a system such as Isabelle/HOL. |
48 |
49 |
49 |
50 <H3>Theory Files for Isabelle 2016</H3> |
50 <H3>Theory Files for Isabelle 2016</H3> |
51 |
51 |
52 <ul> |
52 <ul> |
53 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/thys/ReStar.thy">ReStar.thy</A> |
53 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/thys/Lexer.thy">ReStar.thy</A> |
54 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/thys/Simplifying.thy">Simplifying.thy</A> |
54 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/thys/Simplifying.thy">Simplifying.thy</A> |
55 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/thys/Sulzmann.thy">Sulzmann.thy</A> |
|
56 </ul> |
55 </ul> |
57 |
56 |
58 |
57 |
59 <H3>Links</H3> |
58 <H3>Links</H3> |
60 |
59 |
61 <ul> |
60 <ul> |
|
61 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/thy/paper.pdf">our paper</A> |
62 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/Literature/sulzmann14-new.pdf">the paper</A> by Sulzmann and Lu |
62 <li> <A HREF="http://talisker.inf.kcl.ac.uk/%7Eurbanc/cgi-bin/repos.cgi/lexing/raw-file/tip/Literature/sulzmann14-new.pdf">the paper</A> by Sulzmann and Lu |
63 </ul> |
63 </ul> |
64 |
64 |
65 </TABLE> |
65 </TABLE> |
66 <P> |
66 <P> |
67 <!-- hhmts start --> Last modified: Tue Mar 15 12:48:13 GMT 2016 <!-- hhmts end --> |
67 <!-- hhmts start --> Last modified: Wed May 18 13:44:30 BST 2016 <!-- hhmts end --> |
68 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a> |
68 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a> |
69 </BODY> |
69 </BODY> |
70 </HTML> |
70 </HTML> |