thys/Journal/document/root.tex
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 01 May 2022 11:50:46 +0100
changeset 498 ab626b60ee64
parent 364 232aa2f19a75
permissions -rwxr-xr-x
fixed tiny typo in the paper
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}
364
232aa2f19a75 added llncs.cls
Christian Urban <christian.urban@kcl.ac.uk>
parents: 363
diff changeset
     2
%%\usepackage{times}
218
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}
289
807acaf7f599 updated
Christian Urban <urbanc@in.tum.de>
parents: 287
diff changeset
    12
\usepackage{stmaryrd}
218
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}
364
232aa2f19a75 added llncs.cls
Christian Urban <christian.urban@kcl.ac.uk>
parents: 363
diff changeset
    16
\usepackage[sc]{mathpazo}
363
fc346faada4e updated for Isabelle 2021
Christian Urban <christian.urban@kcl.ac.uk>
parents: 289
diff changeset
    17
\usepackage{fontspec}
364
232aa2f19a75 added llncs.cls
Christian Urban <christian.urban@kcl.ac.uk>
parents: 363
diff changeset
    18
\setmainfont[Ligatures=TeX]{Palatino Linotype}
267
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    19
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
\titlerunning{POSIX Lexing with Derivatives of Regular Expressions}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
\urlstyle{rm}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
\isabellestyle{it}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
\renewcommand{\isastyleminor}{\it}% 
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
\renewcommand{\isastyle}{\normalsize\it}%
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
\renewcommand{\isasymequiv}{$\dn$}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
\renewcommand{\isasymemptyset}{$\varnothing$}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
\renewcommand{\isasymiota}{\makebox[0mm]{${}^{\prime}$}}
267
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    34
\renewcommand{\isasymin}{\ensuremath{\,\in\,}}
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    35
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
\def\Brz{Brzozowski}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
\def\der{\backslash}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
\newtheorem{falsehood}{Falsehood}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
\newtheorem{conject}{Conjecture}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
\begin{document}
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    43
\renewcommand{\thefootnote}{$\star$} \footnotetext[1]{This paper is a
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    44
  revised and expanded version of \cite{AusafDyckhoffUrban2016}.
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    45
  Compared with that paper we give a second definition for POSIX
268
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    46
  values introduced by Okui Suzuki \cite{OkuiSuzuki2010,OkuiSuzukiTech}
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    47
  and prove that it is
267
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    48
  equivalent to our original one. This
32b222d77fa0 updated
Christian Urban <urbanc@in.tum.de>
parents: 265
diff changeset
    49
  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
    50
  but not equivalent with, the
268
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    51
  definition given by Sulzmann and Lu~\cite{Sulzmann2014}.
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    52
  The advantage of the definition based on the
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    53
  ordering is that it implements more directly the informal rules from the
6746f5e1f1f8 updated
Christian Urban <urbanc@in.tum.de>
parents: 267
diff changeset
    54
  POSIX standard.
287
95b3880d428f updated
Christian Urban <urbanc@in.tum.de>
parents: 280
diff changeset
    55
  We also prove Sulzmann \& Lu's conjecture that their bitcoded version
95b3880d428f updated
Christian Urban <urbanc@in.tum.de>
parents: 280
diff changeset
    56
  of the POSIX algorithm is correct. Furthermore we extend our results to additional constructors of regular
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    57
  expressions.}  \renewcommand{\thefootnote}{\arabic{footnote}}
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
265
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    59
d36be1e356c0 changed definitions of PRF
Christian Urban <urbanc@in.tum.de>
parents: 218
diff changeset
    60
\title{POSIX {L}exing with {D}erivatives of {R}egular {E}xpressions}
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
\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
    62
\institute{King's College London\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
		\email{fahad.ausaf@icloud.com}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
\and University of St Andrews\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
		\email{roy.dyckhoff@st-andrews.ac.uk}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
\and King's College London\\
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
		\email{christian.urban@kcl.ac.uk}}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
\maketitle
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
\begin{abstract}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
Brzozowski introduced the notion of derivatives for regular
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
expressions. They can be used for a very simple regular expression
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
matching algorithm.  Sulzmann and Lu cleverly extended this algorithm
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
in order to deal with POSIX matching, which is the underlying
269
12772d537b71 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    75
disambiguation strategy for regular expressions needed in lexers.
12772d537b71 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    76
Their algorithm generates POSIX values which encode the information of
275
deea42c83c9e updated
Christian Urban <urbanc@in.tum.de>
parents: 270
diff changeset
    77
\emph{how} a regular expression matches a string---that is, which part
269
12772d537b71 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    78
of the string is matched by which part of the regular expression.  In
270
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    79
this paper we give our inductive definition of what a POSIX value is
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    80
and show $(i)$ that such a value is unique (for given regular
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    81
expression and string being matched) and $(ii)$ that Sulzmann and Lu's
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    82
algorithm always generates such a value (provided that the regular
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    83
expression matches the string). We show that $(iii)$ our inductive
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    84
definition of a POSIX value is equivalent to an alternative definition
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    85
by Okui and Suzuki which identifies POSIX values as least elements
462d893ecb3d updated
Christian Urban <urbanc@in.tum.de>
parents: 269
diff changeset
    86
according to an ordering of values.  We also prove the correctness of
287
95b3880d428f updated
Christian Urban <urbanc@in.tum.de>
parents: 280
diff changeset
    87
Sulzmann's bitcoded version of the POSIX matching algorithm and extend the
280
c840a99a3e05 updated
cu
parents: 275
diff changeset
    88
results to additional constructors for regular expressions.  \smallskip
218
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
{\bf Keywords:} POSIX matching, Derivatives of Regular Expressions,
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
Isabelle/HOL
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
\end{abstract}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
\input{session}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
\end{document}
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
%%% Local Variables:
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
%%% mode: latex
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
%%% TeX-master: t
16af5b8bd285 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
%%% End: