| 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 |
| 218 | 1 |
\documentclass[runningheads]{llncs}
|
2 |
\usepackage{times}
|
|
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}
|
|
12 |
%%\usepackage{stmaryrd}
|
|
13 |
\usepackage{url}
|
|
14 |
\usepackage{color}
|
|
15 |
||
16 |
\titlerunning{POSIX Lexing with Derivatives of Regular Expressions}
|
|
17 |
||
18 |
\urlstyle{rm}
|
|
19 |
\isabellestyle{it}
|
|
20 |
\renewcommand{\isastyleminor}{\it}%
|
|
21 |
\renewcommand{\isastyle}{\normalsize\it}%
|
|
22 |
||
23 |
||
24 |
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}
|
|
25 |
\renewcommand{\isasymequiv}{$\dn$}
|
|
26 |
\renewcommand{\isasymemptyset}{$\varnothing$}
|
|
27 |
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}
|
|
28 |
\renewcommand{\isasymiota}{\makebox[0mm]{${}^{\prime}$}}
|
|
29 |
||
30 |
\def\Brz{Brzozowski}
|
|
31 |
\def\der{\backslash}
|
|
32 |
\newtheorem{falsehood}{Falsehood}
|
|
33 |
\newtheorem{conject}{Conjecture}
|
|
34 |
||
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 | 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 | 47 |
\author{Fahad Ausaf\inst{1} \and Roy Dyckhoff\inst{2} \and Christian Urban\inst{3}}
|
48 |
\institute{King's College London\\
|
|
49 |
\email{fahad.ausaf@icloud.com}
|
|
50 |
\and University of St Andrews\\ |
|
51 |
\email{roy.dyckhoff@st-andrews.ac.uk}
|
|
52 |
\and King's College London\\ |
|
53 |
\email{christian.urban@kcl.ac.uk}}
|
|
54 |
\maketitle |
|
55 |
||
56 |
\begin{abstract}
|
|
57 |
||
58 |
Brzozowski introduced the notion of derivatives for regular |
|
59 |
expressions. They can be used for a very simple regular expression |
|
60 |
matching algorithm. Sulzmann and Lu cleverly extended this algorithm |
|
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 | 75 |
|
76 |
{\bf Keywords:} POSIX matching, Derivatives of Regular Expressions,
|
|
77 |
Isabelle/HOL |
|
78 |
\end{abstract}
|
|
79 |
||
80 |
\input{session}
|
|
81 |
||
82 |
\end{document}
|
|
83 |
||
84 |
%%% Local Variables: |
|
85 |
%%% mode: latex |
|
86 |
%%% TeX-master: t |
|
87 |
%%% End: |