twtsevms/twtsevms.tex
changeset 146 676440e0a233
child 147 dfcf3fa58d7f
equal deleted inserted replaced
145:a7c063981fa5 146:676440e0a233
       
     1 \documentclass[a4paper,UKenglish]{lipics}
       
     2 \usepackage{graphic}
       
     3 \usepackage{data}
       
     4 \usepackage{tikz-cd}
       
     5 \usepackage{tikz}
       
     6 
       
     7 %\usetikzlibrary{graphs}
       
     8 %\usetikzlibrary{graphdrawing}
       
     9 %\usegdlibrary{trees}
       
    10 
       
    11 %\usepackage{algorithm}
       
    12 \usepackage{amsmath}
       
    13 \usepackage{xcolor}
       
    14 \usepackage[noend]{algpseudocode}
       
    15 \usepackage{enumitem}
       
    16 \usepackage{nccmath}
       
    17 \usepackage{soul}
       
    18 
       
    19 \definecolor{darkblue}{rgb}{0,0,0.6}
       
    20 \hypersetup{colorlinks=true,allcolors=darkblue}
       
    21 \newcommand{\comment}[1]%
       
    22 {{\color{red}$\Rightarrow$}\marginpar{\raggedright\small{\bf\color{red}#1}}}
       
    23 
       
    24 % \documentclass{article}
       
    25 %\usepackage[utf8]{inputenc}
       
    26 %\usepackage[english]{babel}
       
    27 %\usepackage{listings}
       
    28 % \usepackage{amsthm}
       
    29 %\usepackage{hyperref}
       
    30 % \usepackage[margin=0.5in]{geometry}
       
    31 %\usepackage{pmboxdraw}
       
    32  
       
    33 \title{POSIX Regular Expression Matching and Lexing}
       
    34 \author{Chengsong Tan}
       
    35 \affil{King's College London\\
       
    36 London, UK\\
       
    37 \texttt{chengsong.tan@kcl.ac.uk}}
       
    38 \authorrunning{Chengsong Tan}
       
    39 \Copyright{Chengsong Tan}
       
    40 
       
    41 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
       
    42 \newcommand{\ZERO}{\mbox{\bf 0}}
       
    43 \newcommand{\ONE}{\mbox{\bf 1}}
       
    44 \def\erase{\textit{erase}}
       
    45 \def\bders{\textit{bders}}
       
    46 \def\lexer{\mathit{lexer}}
       
    47 \def\blexer{\textit{blexer}}
       
    48 \def\fuse{\textit{fuse}}
       
    49 \def\flatten{\textit{flatten}}
       
    50 \def\map{\textit{map}}
       
    51 \def\blexers{\mathit{blexer\_simp}}
       
    52 \def\simp{\mathit{simp}}
       
    53 \def\mkeps{\mathit{mkeps}}
       
    54 \def\bmkeps{\textit{bmkeps}}
       
    55 \def\inj{\mathit{inj}}
       
    56 \def\Empty{\mathit{Empty}}
       
    57 \def\Left{\mathit{Left}}
       
    58 \def\Right{\mathit{Right}}
       
    59 \def\Stars{\mathit{Stars}}
       
    60 \def\Char{\mathit{Char}}
       
    61 \def\Seq{\mathit{Seq}}
       
    62 \def\Der{\mathit{Der}}
       
    63 \def\nullable{\mathit{nullable}}
       
    64 \def\Z{\mathit{Z}}
       
    65 \def\S{\mathit{S}}
       
    66 \def\flex{\textit{flex}}
       
    67 \def\rup{r^\uparrow}
       
    68 \def\retrieve{\textit{retrieve}}
       
    69 \def\AALTS{\textit{AALTS}}
       
    70 \def\AONE{\textit{AONE}}
       
    71 %\theoremstyle{theorem}
       
    72 %\newtheorem{theorem}{Theorem}
       
    73 %\theoremstyle{lemma}
       
    74 %\newtheorem{lemma}{Lemma}
       
    75 %\newcommand{\lemmaautorefname}{Lemma}
       
    76 %\theoremstyle{definition}
       
    77 %\newtheorem{definition}{Definition}
       
    78 \algnewcommand\algorithmicswitch{\textbf{switch}}
       
    79 \algnewcommand\algorithmiccase{\textbf{case}}
       
    80 \algnewcommand\algorithmicassert{\texttt{assert}}
       
    81 \algnewcommand\Assert[1]{\State \algorithmicassert(#1)}%
       
    82 % New "environments"
       
    83 \algdef{SE}[SWITCH]{Switch}{EndSwitch}[1]{\algorithmicswitch\ #1\ \algorithmicdo}{\algorithmicend\ \algorithmicswitch}%
       
    84 \algdef{SE}[CASE]{Case}{EndCase}[1]{\algorithmiccase\ #1}{\algorithmicend\ \algorithmiccase}%
       
    85 \algtext*{EndSwitch}%
       
    86 \algtext*{EndCase}%
       
    87 
       
    88 
       
    89 \begin{document}
       
    90 
       
    91 \maketitle
       
    92 
       
    93 Hello.
       
    94 Let us play with the function $f$ on annotated regular expressions:
       
    95 \begin{center}
       
    96 $f(\ZERO) = \ZERO$
       
    97 $f(_{bs}\ONE) = \textit{bs}$\\
       
    98 $f(_{bs}a) = \textit{bs} $\\
       
    99 $f(_{bs}r_1\cdot r_2) = \textit{bs} \cdot $
       
   100 $f(_{bs}\sum{rs}) = \textit{bs} \cdot \sum\limits_{r \in rs}{f(\textit{r})}$\\
       
   101 $f(_{bs}r*) = \textit{bs} \cdot((0 \cdot f(r))\cdot 1) $
       
   102 \end{center}
       
   103 
       
   104 
       
   105 \bibliographystyle{plain}
       
   106 \bibliography{root}
       
   107 
       
   108 
       
   109 \end{document}
       
   110