author | Chengsong |
Wed, 23 Aug 2023 03:02:31 +0100 | |
changeset 668 | 3831621d7b14 |
parent 364 | 232aa2f19a75 |
permissions | -rwxr-xr-x |
218 | 1 |
\documentclass[runningheads]{llncs} |
364
232aa2f19a75
added llncs.cls
Christian Urban <christian.urban@kcl.ac.uk>
parents:
363
diff
changeset
|
2 |
%%\usepackage{times} |
218 | 3 |
\usepackage{isabelle} |
4 |
\usepackage{isabellesym} |
|
5 |
\usepackage{amsmath} |
|
6 |
\usepackage{amssymb} |
|
7 |
\usepackage{mathpartir} |
|
8 |
\usepackage{tikz} |
|
9 |
\usepackage{pgf} |
|
10 |
\usetikzlibrary{positioning} |
|
11 |
\usepackage{pdfsetup} |
|
289 | 12 |
\usepackage{stmaryrd} |
218 | 13 |
\usepackage{url} |
14 |
\usepackage{color} |
|
267 | 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 | 19 |
|
218 | 20 |
|
21 |
\titlerunning{POSIX Lexing with Derivatives of Regular Expressions} |
|
22 |
||
23 |
\urlstyle{rm} |
|
24 |
\isabellestyle{it} |
|
25 |
\renewcommand{\isastyleminor}{\it}% |
|
26 |
\renewcommand{\isastyle}{\normalsize\it}% |
|
27 |
||
28 |
||
29 |
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,} |
|
30 |
\renewcommand{\isasymequiv}{$\dn$} |
|
31 |
\renewcommand{\isasymemptyset}{$\varnothing$} |
|
32 |
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}} |
|
33 |
\renewcommand{\isasymiota}{\makebox[0mm]{${}^{\prime}$}} |
|
267 | 34 |
\renewcommand{\isasymin}{\ensuremath{\,\in\,}} |
35 |
||
218 | 36 |
|
37 |
\def\Brz{Brzozowski} |
|
38 |
\def\der{\backslash} |
|
39 |
\newtheorem{falsehood}{Falsehood} |
|
40 |
\newtheorem{conject}{Conjecture} |
|
41 |
||
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 | 46 |
values introduced by Okui Suzuki \cite{OkuiSuzuki2010,OkuiSuzukiTech} |
47 |
and prove that it is |
|
267 | 48 |
equivalent to our original one. This |
49 |
second definition is based on an ordering of values and very similar to, |
|
50 |
but not equivalent with, the |
|
268 | 51 |
definition given by Sulzmann and Lu~\cite{Sulzmann2014}. |
52 |
The advantage of the definition based on the |
|
53 |
ordering is that it implements more directly the informal rules from the |
|
54 |
POSIX standard. |
|
287 | 55 |
We also prove Sulzmann \& Lu's conjecture that their bitcoded version |
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 | 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 | 61 |
\author{Fahad Ausaf\inst{1} \and Roy Dyckhoff\inst{2} \and Christian Urban\inst{3}} |
62 |
\institute{King's College London\\ |
|
63 |
\email{fahad.ausaf@icloud.com} |
|
64 |
\and University of St Andrews\\ |
|
65 |
\email{roy.dyckhoff@st-andrews.ac.uk} |
|
66 |
\and King's College London\\ |
|
67 |
\email{christian.urban@kcl.ac.uk}} |
|
68 |
\maketitle |
|
69 |
||
70 |
\begin{abstract} |
|
71 |
Brzozowski introduced the notion of derivatives for regular |
|
72 |
expressions. They can be used for a very simple regular expression |
|
73 |
matching algorithm. Sulzmann and Lu cleverly extended this algorithm |
|
74 |
in order to deal with POSIX matching, which is the underlying |
|
269 | 75 |
disambiguation strategy for regular expressions needed in lexers. |
76 |
Their algorithm generates POSIX values which encode the information of |
|
275 | 77 |
\emph{how} a regular expression matches a string---that is, which part |
269 | 78 |
of the string is matched by which part of the regular expression. In |
270 | 79 |
this paper we give our inductive definition of what a POSIX value is |
80 |
and show $(i)$ that such a value is unique (for given regular |
|
81 |
expression and string being matched) and $(ii)$ that Sulzmann and Lu's |
|
82 |
algorithm always generates such a value (provided that the regular |
|
83 |
expression matches the string). We show that $(iii)$ our inductive |
|
84 |
definition of a POSIX value is equivalent to an alternative definition |
|
85 |
by Okui and Suzuki which identifies POSIX values as least elements |
|
86 |
according to an ordering of values. We also prove the correctness of |
|
287 | 87 |
Sulzmann's bitcoded version of the POSIX matching algorithm and extend the |
280 | 88 |
results to additional constructors for regular expressions. \smallskip |
218 | 89 |
|
90 |
{\bf Keywords:} POSIX matching, Derivatives of Regular Expressions, |
|
91 |
Isabelle/HOL |
|
92 |
\end{abstract} |
|
93 |
||
94 |
\input{session} |
|
95 |
||
96 |
\end{document} |
|
97 |
||
98 |
%%% Local Variables: |
|
99 |
%%% mode: latex |
|
100 |
%%% TeX-master: t |
|
101 |
%%% End: |