thys/Journal/document/root.tex
author Christian Urban <urbanc@in.tum.de>
Fri, 25 Aug 2017 15:05:20 +0200
changeset 269 12772d537b71
parent 268 6746f5e1f1f8
child 270 462d893ecb3d
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
\documentclass[runningheads]{llncs}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
\usepackage{times}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
\usepackage{isabelle}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
\usepackage{isabellesym}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
\usepackage{amsmath}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
\usepackage{amssymb}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
\usepackage{mathpartir}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
\usepackage{tikz}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
\usepackage{pgf}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
\usetikzlibrary{positioning}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
\usepackage{pdfsetup}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
%%\usepackage{stmaryrd}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
\usepackage{url}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
\usepackage{color}
267
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    15
\usepackage[safe]{tipa}
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    16
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    17
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
\titlerunning{POSIX Lexing with Derivatives of Regular Expressions}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
\urlstyle{rm}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
\isabellestyle{it}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
\renewcommand{\isastyleminor}{\it}% 
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
\renewcommand{\isastyle}{\normalsize\it}%
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
\renewcommand{\isasymequiv}{$\dn$}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
\renewcommand{\isasymemptyset}{$\varnothing$}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
\renewcommand{\isasymiota}{\makebox[0mm]{${}^{\prime}$}}
267
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    32
\renewcommand{\isasymin}{\ensuremath{\,\in\,}}
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    33
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
\def\Brz{Brzozowski}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
\def\der{\backslash}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
\newtheorem{falsehood}{Falsehood}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
\newtheorem{conject}{Conjecture}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
\begin{document}
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    41
\renewcommand{\thefootnote}{$\star$} \footnotetext[1]{This paper is a
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    42
  revised and expanded version of \cite{AusafDyckhoffUrban2016}.
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    43
  Compared with that paper we give a second definition for POSIX
268
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    44
  values introduced by Okui Suzuki \cite{OkuiSuzuki2010,OkuiSuzukiTech}
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    45
  and prove that it is
267
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    46
  equivalent to our original one. This
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    47
  second definition is based on an ordering of values and very similar to,
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    48
  but not equivalent with, the
268
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    49
  definition given by Sulzmann and Lu~\cite{Sulzmann2014}.
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    50
  The advantage of the definition based on the
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    51
  ordering is that it implements more directly the informal rules from the
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    52
  POSIX standard.
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    53
  We also
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    54
  extend our results to additional constructors of regular
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    55
  expressions.}  \renewcommand{\thefootnote}{\arabic{footnote}}
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    57
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    58
\title{POSIX {L}exing with {D}erivatives of {R}egular {E}xpressions}
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
\author{Fahad Ausaf\inst{1} \and Roy Dyckhoff\inst{2} \and Christian Urban\inst{3}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
\institute{King's College London\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
		\email{fahad.ausaf@icloud.com}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
\and University of St Andrews\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
		\email{roy.dyckhoff@st-andrews.ac.uk}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
\and King's College London\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
		\email{christian.urban@kcl.ac.uk}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
\maketitle
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
\begin{abstract}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
Brzozowski introduced the notion of derivatives for regular
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
expressions. They can be used for a very simple regular expression
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
matching algorithm.  Sulzmann and Lu cleverly extended this algorithm
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
in order to deal with POSIX matching, which is the underlying
269
12772d537b71 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    73
disambiguation strategy for regular expressions needed in lexers.
12772d537b71 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    74
Their algorithm generates POSIX values which encode the information of
12772d537b71 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    75
\emph{how} a regular expression matched a string---that is which part
12772d537b71 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    76
of the string is matched by which part of the regular expression.  In
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    77
the first part of this paper we give our inductive definition of what
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    78
a POSIX value is and show $(i)$ that such a value is unique (for given
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    79
regular expression and string being matched) and $(ii)$ that Sulzmann
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    80
and Lu's algorithm always generates such a value (provided that the
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    81
regular expression matches the string). We also prove the correctness
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    82
of an optimised version of the POSIX matching algorithm.  In the
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    83
second part we show that $(iii)$ our inductive definition of a POSIX
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    84
value is equivalent to an alternative definition by Okui and Suzuki
267
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    85
which identifies POSIX values as least elements according to an
268
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    86
ordering of values. \smallskip
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
{\bf Keywords:} POSIX matching, Derivatives of Regular Expressions,
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
Isabelle/HOL
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
\end{abstract}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
\input{session}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
\end{document}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
%%% Local Variables:
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
%%% mode: latex
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
%%% TeX-master: t
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
%%% End: