396
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
1 |
\documentclass[runningheads]{lipics-v2021}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
\usepackage{times}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
3 |
\usepackage{isabelle}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
4 |
\usepackage{isabellesym}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
5 |
\usepackage{amsmath}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
6 |
\usepackage{amssymb}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
7 |
\usepackage{mathpartir}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
8 |
\usepackage{tikz}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
9 |
\usepackage{pgf}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
10 |
\usetikzlibrary{positioning}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
11 |
%\usepackage{pdfsetup}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
12 |
%\usepackage{stmaryrd}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
13 |
%\usepackage{url}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
14 |
%\usepackage{color}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
%\usepackage[safe]{tipa}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
16 |
%\usepackage[sc]{mathpazo}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
17 |
%\usepackage{fontspec}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
18 |
%\setmainfont[Ligatures=TeX]{Palatino Linotype}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
19 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
20 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
21 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
22 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
23 |
\urlstyle{rm}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
24 |
\isabellestyle{it}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
25 |
\renewcommand{\isastyleminor}{\it}%
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
26 |
\renewcommand{\isastyle}{\normalsize\it}%
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
27 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
28 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
29 |
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
30 |
\renewcommand{\isasymequiv}{$\dn$}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
31 |
\renewcommand{\isasymemptyset}{$\varnothing$}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
32 |
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
33 |
\renewcommand{\isasymiota}{\makebox[0mm]{${}^{\prime}$}}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
34 |
\renewcommand{\isasymin}{\ensuremath{\,\in\,}}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
35 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
36 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
37 |
\def\Brz{Brzozowski}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
38 |
\def\der{\backslash}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
39 |
\newtheorem{falsehood}{Falsehood}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
40 |
\newtheorem{conject}{Conjecture}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
41 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
42 |
\bibliographystyle{plainurl}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
43 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
44 |
\title{{POSIX} {L}exing with {B}itcoded {D}erivatives}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
45 |
\titlerunning{POSIX Lexing with Bitcoded Derivatives}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
46 |
\author{Chengsong Tan}{King's College London}{chengsong.tan@kcl.ac.uk}{}{}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
47 |
\author{Christian Urban}{King's College London}{christian.urban@kcl.ac.uk}{}{}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
48 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
49 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
50 |
\begin{document}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
51 |
\maketitle
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
52 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
53 |
\begin{abstract}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
54 |
Brzozowski introduced the notion of derivatives for regular
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
55 |
expressions. They can be used for a very simple regular expression
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
56 |
matching algorithm. Sulzmann and Lu cleverly extended this algorithm
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
57 |
in order to deal with POSIX matching, which is the underlying
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
58 |
disambiguation strategy for regular expressions needed in lexers.
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
59 |
Their algorithm generates POSIX values which encode the information of
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
60 |
\emph{how} a regular expression matches a string---that is, which part
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
61 |
of the string is matched by which part of the regular expression. In
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
62 |
this paper we give our inductive definition of what a POSIX value is
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
63 |
and show $(i)$ that such a value is unique (for given regular
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
64 |
expression and string being matched) and $(ii)$ that Sulzmann and Lu's
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
65 |
algorithm always generates such a value (provided that the regular
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
66 |
expression matches the string). We show that $(iii)$ our inductive
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
67 |
definition of a POSIX value is equivalent to an alternative definition
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
68 |
by Okui and Suzuki which identifies POSIX values as least elements
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
69 |
according to an ordering of values. We also prove the correctness of
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
70 |
Sulzmann's bitcoded version of the POSIX matching algorithm and extend the
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
71 |
results to additional constructors for regular expressions. \smallskip
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
72 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
73 |
{\bf Keywords:} POSIX matching, Derivatives of Regular Expressions,
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
74 |
Isabelle/HOL
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
75 |
\end{abstract}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
76 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
77 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
78 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
79 |
\input{session}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
80 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
81 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
82 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
83 |
\end{document}
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
84 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
85 |
%%% Local Variables:
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
86 |
%%% mode: latex
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
87 |
%%% TeX-master: t
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
88 |
%%% End:
|