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