thys/Journal/document/root.tex
author Christian Urban <urbanc@in.tum.de>
Tue, 18 Jul 2017 18:39:20 +0100
changeset 265 d36be1e356c0
parent 218 16af5b8bd285
child 267 32b222d77fa0
permissions -rwxr-xr-x
changed definitions of PRF
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}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
\titlerunning{POSIX Lexing with Derivatives of Regular Expressions}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
\urlstyle{rm}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
\isabellestyle{it}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
\renewcommand{\isastyleminor}{\it}% 
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
\renewcommand{\isastyle}{\normalsize\it}%
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
\renewcommand{\isasymequiv}{$\dn$}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
\renewcommand{\isasymemptyset}{$\varnothing$}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
\renewcommand{\isasymiota}{\makebox[0mm]{${}^{\prime}$}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
\def\Brz{Brzozowski}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
\def\der{\backslash}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
\newtheorem{falsehood}{Falsehood}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
\newtheorem{conject}{Conjecture}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
\begin{document}
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    36
\renewcommand{\thefootnote}{$\star$} \footnotetext[1]{This paper is a
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    37
  revised and expanded version of \cite{AusafDyckhoffUrban2016}.
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    38
  Compared with that paper we give a second definition for POSIX
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    39
  values and prove that it is equivalent to the original one. This
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    40
  definition is based on an ordering of values and very similar to the
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    41
  definition given by Sulzmann and Lu~\cite{Sulzmann2014}. We also
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    42
  extend our results to additional constructors of regular
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    43
  expressions.}  \renewcommand{\thefootnote}{\arabic{footnote}}
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    45
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    46
\title{POSIX {L}exing with {D}erivatives of {R}egular {E}xpressions}
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
\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
    48
\institute{King's College London\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
		\email{fahad.ausaf@icloud.com}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
\and University of St Andrews\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
		\email{roy.dyckhoff@st-andrews.ac.uk}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
\and King's College London\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
		\email{christian.urban@kcl.ac.uk}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
\maketitle
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
\begin{abstract}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
Brzozowski introduced the notion of derivatives for regular
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
expressions. They can be used for a very simple regular expression
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
matching algorithm.  Sulzmann and Lu cleverly extended this algorithm
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
in order to deal with POSIX matching, which is the underlying
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    62
disambiguation strategy for regular expressions needed in lexers.  In
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    63
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
    64
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
    65
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
    66
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
    67
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
    68
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
    69
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
    70
value is equivalent to an alternative definition by Okui and Suzuki
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    71
which identifies a POSIX value as least element according to an
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    72
ordering of values. The advantage of the definition based on the
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    73
ordering is that it implements more directly the POSIX
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    74
longest-leftmost matching semantics.\smallskip
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
{\bf Keywords:} POSIX matching, Derivatives of Regular Expressions,
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
Isabelle/HOL
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
\end{abstract}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
\input{session}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
\end{document}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
%%% Local Variables:
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
%%% mode: latex
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
%%% TeX-master: t
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
%%% End: