thys/Paper/document/root.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Sun, 28 Feb 2016 14:01:12 +0000
changeset 107 6adda4a667b1
parent 105 80218dddbb15
child 108 73f7dc60c285
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
95
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\documentclass[runningheads]{llncs}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
\usepackage{isabelle}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
\usepackage{isabellesym}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\usepackage{amsmath}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\usepackage{amssymb}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage{mathpartir}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
\usepackage{tikz}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
\usepackage{pgf}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
\usepackage{pdfsetup}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\usepackage{ot1patch}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
\usepackage{times}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
\usepackage{stmaryrd}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
\usepackage{url}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
\usepackage{color}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
\titlerunning{BLA BLA}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
\urlstyle{rm}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
\isabellestyle{it}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
\renewcommand{\isastyleminor}{\it}%
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
\renewcommand{\isastyle}{\normalsize\it}%
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
\renewcommand{\isasymequiv}{$\dn$}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
\renewcommand{\isasymemptyset}{$\varnothing$}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
\definecolor{mygrey}{rgb}{.80,.80,.80}
105
80218dddbb15 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 95
diff changeset
    30
\def\Brz{Brzozowski}
80218dddbb15 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 95
diff changeset
    31
95
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
\begin{document}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
105
80218dddbb15 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 95
diff changeset
    35
\title{POSIX {L}exing with {D}erivatives of {R}egular {E}xpressions (Proof Pearl)}
95
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
\author{Fahad Ausaf\inst{1} \and Roy Dyckhoff\inst{2} \and Christian Urban\inst{1}}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
\institute{King's College London, United Kingdom \and 
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
           St Andrews}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
\maketitle
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
\begin{abstract}
105
80218dddbb15 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 95
diff changeset
    42
107
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    43
\Brz{} introduced the notion of derivatives for regular
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    44
expressions. They can be used for a very simple regular expression
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    45
matching algorithm.  Sulzmann and Lu cleverly extended this algorithm
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    46
in order to deal with POSIX matching, which is the underlying
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    47
disambiguation strategy for regular expressions needed in
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    48
lexers. Sulzmann and Lu have made available on-line what they call a
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    49
``rigorous proof'' of the correctness of their algorithm w.r.t.~their
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    50
specification; regrettably, it appears to us to have unfillable gaps.
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    51
In the first part of this paper we give our inductive definition of
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    52
what a POSIX value is and show $(i)$ that such a value is unique (for
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    53
given regular expression and string being matched) and $(ii)$ that
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    54
Sulzmann and Lu's algorithm always generates such a value (provided
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    55
that the regular expression matches the string).  We also prove the
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    56
correctness of an optimised version of the POSIX matching
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    57
algorithm. Our definitions and proof are much simpler than those by
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    58
Sulzmann and Lu and can be easily formalised in Isabelle/HOL.  In the
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    59
second part we analyse the correctness argument by Sulzmann and Lu in
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    60
more detail and explain why it seems hard to turn it into a proof
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    61
rigorous enough to be accepted by a system such as Isabelle/HOL.
95
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
107
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    63
{\bf Keywords:} POSIX matching, Derivatives of Regular Expressions,
6adda4a667b1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    64
Isabelle/HOL
95
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
\end{abstract}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
\input{session}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
\end{document}
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
%%% Local Variables:
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
%%% mode: latex
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    73
%%% TeX-master: t
a33d3040bf7e started a paper and moved cruft to Attic
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    74
%%% End: