thys2/Journal/Paper.tex
author Chengsong
Mon, 06 Jun 2022 15:57:17 +0100
changeset 535 ce91c29d2885
parent 389 d4b3b0f942f4
permissions -rw-r--r--
fixed plotting error 6.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
384
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     1
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     2
\begin{isabellebody}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     3
\setisabellecontext{Paper}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     4
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     5
\isadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     6
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     7
\endisadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     8
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
     9
\isatagtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    10
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    11
\endisatagtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    12
{\isafoldtheory}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    13
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    14
\isadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    15
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    16
\endisadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    17
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    18
\isadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    19
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    20
\endisadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    21
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    22
\isatagproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    23
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    24
\endisatagproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    25
{\isafoldproof}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    26
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    27
\isadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    28
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    29
\endisadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    30
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    31
\isadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    32
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    33
\endisadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    34
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    35
\isatagproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    36
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    37
\endisatagproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    38
{\isafoldproof}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    39
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    40
\isadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    41
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    42
\endisadelimproof
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    43
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    44
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    45
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    46
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    47
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    48
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    49
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    50
\isamarkupsection{Core of the proof%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    51
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    52
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    53
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    54
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    55
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    56
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    57
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    58
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    59
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    60
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    61
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    62
This paper builds on previous work by Ausaf and Urban using 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    63
regular expression'd bit-coded derivatives to do lexing that 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    64
is both fast and satisfies the POSIX specification.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    65
In their work, a bit-coded algorithm introduced by Sulzmann and Lu
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    66
was formally verified in Isabelle, by a very clever use of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    67
flex function and retrieve to carefully mimic the way a value is 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    68
built up by the injection funciton.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    69
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    70
In the previous work, Ausaf and Urban established the below equality:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    71
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    72
\isa{{\normalsize{}If\,}\ v\ {\isacharcolon}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}s\ {\normalsize \,then\,}\ Some\ {\isacharparenleft}{\kern0pt}flex\ r\ id\ s\ v{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ decode\ {\isacharparenleft}{\kern0pt}retrieve\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}\ r{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    73
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    74
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    75
This lemma establishes a link with the lexer without bit-codes.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    76
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    77
With it we get the correctness of bit-coded algorithm.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    78
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    79
\isa{lexer\mbox{$_b$}\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    80
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    81
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    82
However what is not certain is whether we can add simplification
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    83
to the bit-coded algorithm, without breaking the correct lexing output.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    84
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    85
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    86
The reason that we do need to add a simplification phase
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    87
after each derivative step of  $\textit{blexer}$ is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    88
because it produces intermediate
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    89
regular expressions that can grow exponentially.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    90
For example, the regular expression $(a+aa)^*$ after taking
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    91
derivative against just 10 $a$s will have size 8192.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    92
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    93
%TODO: add figure for this?
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    94
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    95
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    96
Therefore, we insert a simplification phase
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    97
after each derivation step, as defined below:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    98
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
    99
\isa{blexer{\isacharunderscore}{\kern0pt}simp\ r\ s\ {\isasymequiv}\ \textrm{if}\ nullable\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}bders{\isacharunderscore}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}\ s{\isacharparenright}{\kern0pt}\ \textrm{then}\ decode\ {\isacharparenleft}{\kern0pt}mkeps\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}bders{\isacharunderscore}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}\ s{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ r\ \textrm{else}\ None}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   100
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   101
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   102
The simplification function is given as follows:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   103
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   104
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   105
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   106
  \isa{bsimp\ {\isacharparenleft}{\kern0pt}ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{bsimp{\isacharunderscore}{\kern0pt}ASEQ\ bs\ {\isacharparenleft}{\kern0pt}bsimp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}bsimp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   107
  \isa{bsimp\ {\isacharparenleft}{\kern0pt}AALTs\ bs{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ rs{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{bsimp{\isacharunderscore}{\kern0pt}AALTs\ bs{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isacharparenleft}{\kern0pt}distinctBy\ {\isacharparenleft}{\kern0pt}flts\ {\isacharparenleft}{\kern0pt}map\ bsimp\ rs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ erase\ {\isasymemptyset}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   108
  \isa{bsimp\ AZERO} & $\dn$ & \isa{AZERO}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   109
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   110
\end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   111
\end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   112
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   113
And the two helper functions are:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   114
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   115
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   116
  \isa{bsimp{\isacharunderscore}{\kern0pt}AALTs\ bs\isactrlsub {\isadigit{1}}\ {\isacharbrackleft}{\kern0pt}r{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{bsimp{\isacharunderscore}{\kern0pt}ASEQ\ bs\isactrlsub {\isadigit{1}}\ {\isacharparenleft}{\kern0pt}bsimp\ r{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}bsimp\ r{\isadigit{2}}{\isachardot}{\kern0pt}{\isadigit{0}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   117
  \isa{bsimp{\isacharunderscore}{\kern0pt}AALTs\ bs{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isacharbrackleft}{\kern0pt}r{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{bsimp{\isacharunderscore}{\kern0pt}AALTs\ bs{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isacharparenleft}{\kern0pt}distinctBy\ {\isacharparenleft}{\kern0pt}flts\ {\isacharparenleft}{\kern0pt}map\ bsimp\ rs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ erase\ {\isasymemptyset}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   118
  \isa{bsimp{\isacharunderscore}{\kern0pt}AALTs\ bs{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isacharparenleft}{\kern0pt}v\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vb\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vc{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{AZERO}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   119
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   120
\end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   121
\end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   122
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   123
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   124
This might sound trivial in the case of producing a YES/NO answer,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   125
but once we require a lexing output to be produced (which is required
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   126
in applications like compiler front-end, malicious attack domain extraction, 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   127
etc.), it is not straightforward if we still extract what is needed according
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   128
to the POSIX standard.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   129
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   130
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   131
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   132
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   133
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   134
By simplification, we mean specifically the following rules:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   135
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   136
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   137
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   138
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{ASEQ\ bs\ AZERO\ r\isactrlsub {\isadigit{2}}\ {\isasymleadsto}\ AZERO}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   139
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ AZERO\ {\isasymleadsto}\ AZERO}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   140
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{ASEQ\ bs\ {\isacharparenleft}{\kern0pt}AONE\ bs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymleadsto}\ fuse\ {\isacharparenleft}{\kern0pt}bs\ {\isacharat}{\kern0pt}\ bs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   141
  \isa{\mbox{}\inferrule{\mbox{r\isactrlsub {\isadigit{1}}\ {\isasymleadsto}\ r\isactrlsub {\isadigit{2}}}}{\mbox{ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{3}}\ {\isasymleadsto}\ ASEQ\ bs\ r\isactrlsub {\isadigit{2}}\ r\isactrlsub {\isadigit{3}}}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   142
  \isa{\mbox{}\inferrule{\mbox{r\isactrlsub {\isadigit{3}}\ {\isasymleadsto}\ r\isactrlsub {\isadigit{4}}}}{\mbox{ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{3}}\ {\isasymleadsto}\ ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{4}}}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   143
  \isa{\mbox{}\inferrule{\mbox{r\ {\isasymleadsto}\ r{\isacharprime}{\kern0pt}}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}r{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}r{\isacharprime}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   144
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}AZERO{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub b{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ rs\isactrlsub b{\isacharparenright}{\kern0pt}}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   145
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}AALTs\ bs\isactrlsub {\isadigit{1}}\ rs\isactrlsub {\isadigit{1}}{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ rs\isactrlsub b{\isacharparenright}{\kern0pt}\ {\isasymleadsto}\ AALTs\ bs\ {\isacharparenleft}{\kern0pt}rs\isactrlsub a\ {\isacharat}{\kern0pt}\ map\ {\isacharparenleft}{\kern0pt}fuse\ bs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ rs\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ rs\isactrlsub b{\isacharparenright}{\kern0pt}}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   146
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   147
\end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   148
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   149
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   150
And these can be made compact by the following simplification function:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   151
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   152
where the function $\mathit{bsimp_AALTs}$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   153
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   154
The core idea of the proof is that two regular expressions,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   155
if "isomorphic" up to a finite number of rewrite steps, will
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   156
remain "isomorphic" when we take the same sequence of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   157
derivatives on both of them.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   158
This can be expressed by the following rewrite relation lemma:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   159
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   160
\isa{{\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}\ {\isasymleadsto}{\isacharasterisk}{\kern0pt}\ bders{\isacharunderscore}{\kern0pt}simp\ r\ s}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   161
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   162
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   163
This isomorphic relation implies a property that leads to the 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   164
correctness result: 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   165
if two (nullable) regular expressions are "rewritable" in many steps
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   166
from one another, 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   167
then a call to function $\textit{bmkeps}$ gives the same
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   168
bit-sequence :
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   169
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   170
\isa{{\normalsize{}If\,}\ \mbox{r{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isasymleadsto}{\isacharasterisk}{\kern0pt}\ r{\isadigit{2}}{\isachardot}{\kern0pt}{\isadigit{0}}}\ {\normalsize \,and\,}\ \mbox{nullable\mbox{$_b$}\ r{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}}\ {\normalsize \,then\,}\ mkeps\mbox{$_b$}\ r{\isadigit{1}}{\isachardot}{\kern0pt}{\isadigit{0}}\ {\isacharequal}{\kern0pt}\ mkeps\mbox{$_b$}\ r{\isadigit{2}}{\isachardot}{\kern0pt}{\isadigit{0}}{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   171
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   172
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   173
Given the same bit-sequence, the decode function
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   174
will give out the same value, which is the output
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   175
of both lexers:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   176
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   177
\isa{lexer\mbox{$_b$}\ r\ s\ {\isasymequiv}\ \textrm{if}\ nullable\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}\ \textrm{then}\ decode\ {\isacharparenleft}{\kern0pt}mkeps\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}\mbox{$\bbslash$}s{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ r\ \textrm{else}\ None}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   178
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   179
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   180
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   181
\isa{blexer{\isacharunderscore}{\kern0pt}simp\ r\ s\ {\isasymequiv}\ \textrm{if}\ nullable\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}bders{\isacharunderscore}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}\ s{\isacharparenright}{\kern0pt}\ \textrm{then}\ decode\ {\isacharparenleft}{\kern0pt}mkeps\mbox{$_b$}\ {\isacharparenleft}{\kern0pt}bders{\isacharunderscore}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\mbox{$^\uparrow$}{\isacharparenright}{\kern0pt}\ s{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ r\ \textrm{else}\ None}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   182
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   183
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   184
And that yields the correctness result:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   185
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   186
\isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ blexer{\isacharunderscore}{\kern0pt}simp\ r\ s}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   187
\end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   188
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   189
The nice thing about the above%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   190
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   191
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   192
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   193
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   194
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   195
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   196
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   197
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   198
\isamarkupsection{Additional Simp Rules?%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   199
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   200
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   201
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   202
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   203
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   204
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   205
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   206
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   207
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   208
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   209
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   210
One question someone would ask is:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   211
can we add more "atomic" simplification/rewriting rules,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   212
so the simplification is even more aggressive, making
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   213
the intermediate results smaller, and therefore more space-efficient? 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   214
For example, one might want to do open up alternatives who is a child
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   215
of a sequence:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   216
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   217
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   218
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   219
    \isa{ASEQ\ bs\ {\isacharparenleft}{\kern0pt}AALTs\ bs{\isadigit{1}}\ rs{\isacharparenright}{\kern0pt}\ r\ {\isasymleadsto}{\isacharquery}{\kern0pt}\ AALTs\ {\isacharparenleft}{\kern0pt}bs\ {\isacharat}{\kern0pt}\ bs{\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}map\ {\isacharparenleft}{\kern0pt}{\isasymlambda}r{\isacharprime}{\kern0pt}{\isachardot}{\kern0pt}\ ASEQ\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ r{\isacharprime}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ rs{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   220
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   221
\end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   222
387
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
   223
This rule allows us to simplify \mbox{\isa{{\isacharparenleft}{\kern0pt}a\ {\isacharplus}{\kern0pt}\ b{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ c\ {\isacharplus}{\kern0pt}\ a\ {\isasymcdot}\ c}}
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
   224
 into  \mbox{\isa{a\ {\isasymcdot}\ c\ {\isacharplus}{\kern0pt}\ b\ {\isasymcdot}\ c}},
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
   225
which  cannot be done under the rrewrite rule because only alternatives which are
389
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
   226
children of another alternative can be spilled out.
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
   227
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
   228
Now with this rule we have some examples where we get
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
   229
even smaller intermediate derivatives than not having this
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
   230
rule:
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
   231
$\textit{(a+aa)}^* \rightarrow \textit{(1+1a)(a+aa)}^* \rightarrow
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
   232
 \textit{(1+a)(a+aa)}^* $%
384
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   233
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   234
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   235
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   236
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   237
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   238
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   239
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   240
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   241
\isamarkupsection{Introduction%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   242
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   243
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   244
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   245
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   246
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   247
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   248
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   249
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   250
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   251
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   252
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   253
Brzozowski \cite{Brzozowski1964} introduced the notion of the {\em
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   254
derivative} \isa{r{\isacharbackslash}{\kern0pt}c} of a regular expression \isa{r} w.r.t.\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   255
a character~\isa{c}, and showed that it gave a simple solution to the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   256
problem of matching a string \isa{s} with a regular expression \isa{r}: if the derivative of \isa{r} w.r.t.\ (in succession) all the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   257
characters of the string matches the empty string, then \isa{r}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   258
matches \isa{s} (and {\em vice versa}). The derivative has the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   259
property (which may almost be regarded as its specification) that, for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   260
every string \isa{s} and regular expression \isa{r} and character
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   261
\isa{c}, one has \isa{cs\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} if and only if \mbox{\isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}}. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   262
The beauty of Brzozowski's derivatives is that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   263
they are neatly expressible in any functional language, and easily
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   264
definable and reasoned about in theorem provers---the definitions just
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   265
consist of inductive datatypes and simple recursive functions. A
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   266
mechanised correctness proof of Brzozowski's matcher in for example HOL4
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   267
has been mentioned by Owens and Slind~\cite{Owens2008}. Another one in
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   268
Isabelle/HOL is part of the work by Krauss and Nipkow \cite{Krauss2011}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   269
And another one in Coq is given by Coquand and Siles \cite{Coquand2012}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   270
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   271
If a regular expression matches a string, then in general there is more
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   272
than one way of how the string is matched. There are two commonly used
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   273
disambiguation strategies to generate a unique answer: one is called
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   274
GREEDY matching \cite{Frisch2004} and the other is POSIX
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   275
matching~\cite{POSIX,Kuklewicz,OkuiSuzuki2010,Sulzmann2014,Vansummeren2006}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   276
For example consider the string \isa{xy} and the regular expression
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   277
\mbox{\isa{{\isacharparenleft}{\kern0pt}x\ {\isacharplus}{\kern0pt}\ y\ {\isacharplus}{\kern0pt}\ xy{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}}. Either the string can be
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   278
matched in two `iterations' by the single letter-regular expressions
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   279
\isa{x} and \isa{y}, or directly in one iteration by \isa{xy}. The
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   280
first case corresponds to GREEDY matching, which first matches with the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   281
left-most symbol and only matches the next symbol in case of a mismatch
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   282
(this is greedy in the sense of preferring instant gratification to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   283
delayed repletion). The second case is POSIX matching, which prefers the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   284
longest match.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   285
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   286
In the context of lexing, where an input string needs to be split up
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   287
into a sequence of tokens, POSIX is the more natural disambiguation
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   288
strategy for what programmers consider basic syntactic building blocks
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   289
in their programs.  These building blocks are often specified by some
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   290
regular expressions, say \isa{r\isactrlbsub key\isactrlesub } and \isa{r\isactrlbsub id\isactrlesub } for recognising keywords and identifiers,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   291
respectively. There are a few underlying (informal) rules behind
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   292
tokenising a string in a POSIX \cite{POSIX} fashion:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   293
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   294
\begin{itemize} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   295
\item[$\bullet$] \emph{The Longest Match Rule} (or \emph{``{M}aximal {M}unch {R}ule''}):
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   296
The longest initial substring matched by any regular expression is taken as
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   297
next token.\smallskip
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   298
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   299
\item[$\bullet$] \emph{Priority Rule:}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   300
For a particular longest initial substring, the first (leftmost) regular expression
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   301
that can match determines the token.\smallskip
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   302
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   303
\item[$\bullet$] \emph{Star Rule:} A subexpression repeated by ${}^\star$ shall 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   304
not match an empty string unless this is the only match for the repetition.\smallskip
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   305
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   306
\item[$\bullet$] \emph{Empty String Rule:} An empty string shall be considered to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   307
be longer than no match at all.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   308
\end{itemize}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   309
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   310
\noindent Consider for example a regular expression \isa{r\isactrlbsub key\isactrlesub } for recognising keywords such as \isa{if},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   311
\isa{then} and so on; and \isa{r\isactrlbsub id\isactrlesub }
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   312
recognising identifiers (say, a single character followed by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   313
characters or numbers).  Then we can form the regular expression
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   314
\isa{{\isacharparenleft}{\kern0pt}r\isactrlbsub key\isactrlesub \ {\isacharplus}{\kern0pt}\ r\isactrlbsub id\isactrlesub {\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   315
and use POSIX matching to tokenise strings, say \isa{iffoo} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   316
\isa{if}.  For \isa{iffoo} we obtain by the Longest Match Rule
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   317
a single identifier token, not a keyword followed by an
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   318
identifier. For \isa{if} we obtain by the Priority Rule a keyword
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   319
token, not an identifier token---even if \isa{r\isactrlbsub id\isactrlesub }
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   320
matches also. By the Star Rule we know \isa{{\isacharparenleft}{\kern0pt}r\isactrlbsub key\isactrlesub \ {\isacharplus}{\kern0pt}\ r\isactrlbsub id\isactrlesub {\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}} matches \isa{iffoo},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   321
respectively \isa{if}, in exactly one `iteration' of the star. The
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   322
Empty String Rule is for cases where, for example, the regular expression 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   323
\isa{{\isacharparenleft}{\kern0pt}a\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}} matches against the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   324
string \isa{bc}. Then the longest initial matched substring is the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   325
empty string, which is matched by both the whole regular expression
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   326
and the parenthesised subexpression.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   327
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   328
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   329
One limitation of Brzozowski's matcher is that it only generates a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   330
YES/NO answer for whether a string is being matched by a regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   331
expression.  Sulzmann and Lu~\cite{Sulzmann2014} extended this matcher
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   332
to allow generation not just of a YES/NO answer but of an actual
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   333
matching, called a [lexical] {\em value}. Assuming a regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   334
expression matches a string, values encode the information of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   335
\emph{how} the string is matched by the regular expression---that is,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   336
which part of the string is matched by which part of the regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   337
expression. For this consider again the string \isa{xy} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   338
the regular expression \mbox{\isa{{\isacharparenleft}{\kern0pt}x\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}y\ {\isacharplus}{\kern0pt}\ xy{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   339
(this time fully parenthesised). We can view this regular expression
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   340
as tree and if the string \isa{xy} is matched by two Star
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   341
`iterations', then the \isa{x} is matched by the left-most
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   342
alternative in this tree and the \isa{y} by the right-left alternative. This
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   343
suggests to record this matching as
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   344
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   345
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   346
\isa{Stars\ {\isacharbrackleft}{\kern0pt}Left\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}{\isacharcomma}{\kern0pt}\ Right\ {\isacharparenleft}{\kern0pt}Left\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharbrackright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   347
\end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   348
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   349
\noindent where \isa{Stars}, \isa{Left}, \isa{Right} and \isa{Char} are constructors for values. \isa{Stars} records how many
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   350
iterations were used; \isa{Left}, respectively \isa{Right}, which
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   351
alternative is used. This `tree view' leads naturally to the idea that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   352
regular expressions act as types and values as inhabiting those types
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   353
(see, for example, \cite{HosoyaVouillonPierce2005}).  The value for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   354
matching \isa{xy} in a single `iteration', i.e.~the POSIX value,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   355
would look as follows
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   356
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   357
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   358
\isa{Stars\ {\isacharbrackleft}{\kern0pt}Seq\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharbrackright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   359
\end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   360
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   361
\noindent where \isa{Stars} has only a single-element list for the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   362
single iteration and \isa{Seq} indicates that \isa{xy} is matched 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   363
by a sequence regular expression.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   364
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   365
%, which we will in what follows 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   366
%write more formally as \isa{x\ {\isasymcdot}\ y}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   367
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   368
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   369
Sulzmann and Lu give a simple algorithm to calculate a value that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   370
appears to be the value associated with POSIX matching.  The challenge
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   371
then is to specify that value, in an algorithm-independent fashion,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   372
and to show that Sulzmann and Lu's derivative-based algorithm does
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   373
indeed calculate a value that is correct according to the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   374
specification.  The answer given by Sulzmann and Lu
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   375
\cite{Sulzmann2014} is to define a relation (called an ``order
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   376
relation'') on the set of values of \isa{r}, and to show that (once
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   377
a string to be matched is chosen) there is a maximum element and that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   378
it is computed by their derivative-based algorithm. This proof idea is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   379
inspired by work of Frisch and Cardelli \cite{Frisch2004} on a GREEDY
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   380
regular expression matching algorithm. However, we were not able to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   381
establish transitivity and totality for the ``order relation'' by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   382
Sulzmann and Lu.  There are some inherent problems with their approach
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   383
(of which some of the proofs are not published in
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   384
\cite{Sulzmann2014}); perhaps more importantly, we give in this paper
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   385
a simple inductive (and algorithm-independent) definition of what we
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   386
call being a {\em POSIX value} for a regular expression \isa{r} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   387
a string \isa{s}; we show that the algorithm by Sulzmann and Lu
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   388
computes such a value and that such a value is unique. Our proofs are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   389
both done by hand and checked in Isabelle/HOL.  The experience of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   390
doing our proofs has been that this mechanical checking was absolutely
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   391
essential: this subject area has hidden snares. This was also noted by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   392
Kuklewicz \cite{Kuklewicz} who found that nearly all POSIX matching
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   393
implementations are ``buggy'' \cite[Page 203]{Sulzmann2014} and by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   394
Grathwohl et al \cite[Page 36]{CrashCourse2014} who wrote:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   395
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   396
\begin{quote}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   397
\it{}``The POSIX strategy is more complicated than the greedy because of 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   398
the dependence on information about the length of matched strings in the 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   399
various subexpressions.''
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   400
\end{quote}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   401
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   402
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   403
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   404
\noindent {\bf Contributions:} We have implemented in Isabelle/HOL the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   405
derivative-based regular expression matching algorithm of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   406
Sulzmann and Lu \cite{Sulzmann2014}. We have proved the correctness of this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   407
algorithm according to our specification of what a POSIX value is (inspired
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   408
by work of Vansummeren \cite{Vansummeren2006}). Sulzmann
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   409
and Lu sketch in \cite{Sulzmann2014} an informal correctness proof: but to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   410
us it contains unfillable gaps.\footnote{An extended version of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   411
\cite{Sulzmann2014} is available at the website of its first author; this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   412
extended version already includes remarks in the appendix that their
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   413
informal proof contains gaps, and possible fixes are not fully worked out.}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   414
Our specification of a POSIX value consists of a simple inductive definition
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   415
that given a string and a regular expression uniquely determines this value.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   416
We also show that our definition is equivalent to an ordering 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   417
of values based on positions by Okui and Suzuki \cite{OkuiSuzuki2010}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   418
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   419
%Derivatives as calculated by Brzozowski's method are usually more complex
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   420
%regular expressions than the initial one; various optimisations are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   421
%possible. We prove the correctness when simplifications of \isa{\isactrlbold {\isadigit{0}}\ {\isacharplus}{\kern0pt}\ r}, 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   422
%\isa{r\ {\isacharplus}{\kern0pt}\ \isactrlbold {\isadigit{0}}}, \isa{\isactrlbold {\isadigit{1}}\ {\isasymcdot}\ r} and \isa{r\ {\isasymcdot}\ \isactrlbold {\isadigit{1}}} to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   423
%\isa{r} are applied. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   424
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   425
We extend our results to ??? Bitcoded version??%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   426
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   427
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   428
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   429
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   430
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   431
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   432
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   433
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   434
\isamarkupsection{Preliminaries%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   435
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   436
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   437
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   438
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   439
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   440
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   441
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   442
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   443
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   444
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   445
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   446
\noindent Strings in Isabelle/HOL are lists of characters with
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   447
the empty string being represented by the empty list, written \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}, and list-cons being written as \isa{\underline{\hspace{2mm}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}\underline{\hspace{2mm}}}. Often
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   448
we use the usual bracket notation for lists also for strings; for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   449
example a string consisting of just a single character \isa{c} is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   450
written \isa{{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}}. We use the usual definitions for 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   451
\emph{prefixes} and \emph{strict prefixes} of strings.  By using the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   452
type \isa{char} for characters we have a supply of finitely many
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   453
characters roughly corresponding to the ASCII character set. Regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   454
expressions are defined as usual as the elements of the following
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   455
inductive datatype:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   456
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   457
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   458
  \isa{r\ {\isacharcolon}{\kern0pt}{\isacharequal}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   459
  \isa{\isactrlbold {\isadigit{0}}} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   460
  \isa{\isactrlbold {\isadigit{1}}} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   461
  \isa{c} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   462
  \isa{r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   463
  \isa{r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   464
  \isa{r\isactrlsup {\isasymstar}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   465
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   466
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   467
  \noindent where \isa{\isactrlbold {\isadigit{0}}} stands for the regular expression that does
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   468
  not match any string, \isa{\isactrlbold {\isadigit{1}}} for the regular expression that matches
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   469
  only the empty string and \isa{c} for matching a character literal. The
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   470
  language of a regular expression is also defined as usual by the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   471
  recursive function \isa{L} with the six clauses:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   472
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   473
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   474
  \begin{tabular}{l@ {\hspace{4mm}}rcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   475
  \textit{(1)} & \isa{L{\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isasymemptyset}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   476
  \textit{(2)} & \isa{L{\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   477
  \textit{(3)} & \isa{L{\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   478
  \textit{(4)} & \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   479
        \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   480
  \textit{(5)} & \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   481
        \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymunion}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   482
  \textit{(6)} & \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isasymstar}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   483
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   484
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   485
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   486
  \noindent In clause \textit{(4)} we use the operation \isa{\underline{\hspace{2mm}}\ {\isacharat}{\kern0pt}\ \underline{\hspace{2mm}}} for the concatenation of two languages (it is also list-append for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   487
  strings). We use the star-notation for regular expressions and for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   488
  languages (in the last clause above). The star for languages is defined
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   489
  inductively by two clauses: \isa{{\isacharparenleft}{\kern0pt}i{\isacharparenright}{\kern0pt}} the empty string being in
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   490
  the star of a language and \isa{{\isacharparenleft}{\kern0pt}ii{\isacharparenright}{\kern0pt}} if \isa{s\isactrlsub {\isadigit{1}}} is in a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   491
  language and \isa{s\isactrlsub {\isadigit{2}}} in the star of this language, then also \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}} is in the star of this language. It will also be convenient
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   492
  to use the following notion of a \emph{semantic derivative} (or \emph{left
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   493
  quotient}) of a language defined as
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   494
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   495
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   496
  \isa{Der\ c\ A\ {\isasymequiv}\ {\isacharbraceleft}{\kern0pt}s\ \mbox{\boldmath$\mid$}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\ {\isasymin}\ A{\isacharbraceright}{\kern0pt}}\;.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   497
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   498
 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   499
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   500
  For semantic derivatives we have the following equations (for example
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   501
  mechanically proved in \cite{Krauss2011}):
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   502
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   503
  \begin{equation}\label{SemDer}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   504
  \begin{array}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   505
  \isa{Der\ c\ {\isasymemptyset}}  & \dn & \isa{{\isasymemptyset}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   506
  \isa{Der\ c\ {\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}  & \dn & \isa{{\isasymemptyset}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   507
  \isa{Der\ c\ {\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}d{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}  & \dn & \isa{\textrm{if}\ c\ {\isacharequal}{\kern0pt}\ d\ \textrm{then}\ {\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \textrm{else}\ {\isasymemptyset}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   508
  \isa{Der\ c\ {\isacharparenleft}{\kern0pt}A\ {\isasymunion}\ B{\isacharparenright}{\kern0pt}}  & \dn & \isa{Der\ c\ A\ {\isasymunion}\ Der\ c\ B}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   509
  \isa{Der\ c\ {\isacharparenleft}{\kern0pt}A\ {\isacharat}{\kern0pt}\ B{\isacharparenright}{\kern0pt}}  & \dn & \isa{{\isacharparenleft}{\kern0pt}Der\ c\ A\ {\isacharat}{\kern0pt}\ B{\isacharparenright}{\kern0pt}\ {\isasymunion}\ {\isacharparenleft}{\kern0pt}\textrm{if}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymin}\ A\ \textrm{then}\ Der\ c\ B\ \textrm{else}\ {\isasymemptyset}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   510
  \isa{Der\ c\ {\isacharparenleft}{\kern0pt}A{\isasymstar}{\isacharparenright}{\kern0pt}}  & \dn & \isa{Der\ c\ A\ {\isacharat}{\kern0pt}\ A{\isasymstar}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   511
  \end{array}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   512
  \end{equation}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   513
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   514
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   515
  \noindent \emph{\Brz's derivatives} of regular expressions
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   516
  \cite{Brzozowski1964} can be easily defined by two recursive functions:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   517
  the first is from regular expressions to booleans (implementing a test
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   518
  when a regular expression can match the empty string), and the second
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   519
  takes a regular expression and a character to a (derivative) regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   520
  expression:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   521
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   522
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   523
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   524
  \isa{nullable\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{False}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   525
  \isa{nullable\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{True}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   526
  \isa{nullable\ {\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{False}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   527
  \isa{nullable\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{nullable\ r\isactrlsub {\isadigit{1}}\ {\isasymor}\ nullable\ r\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   528
  \isa{nullable\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{nullable\ r\isactrlsub {\isadigit{1}}\ {\isasymand}\ nullable\ r\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   529
  \isa{nullable\ {\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{True}\medskip\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   530
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   531
%  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   532
%  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   533
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   534
%  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   535
%  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   536
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   537
  \isa{\isactrlbold {\isadigit{0}}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\isactrlbold {\isadigit{0}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   538
  \isa{\isactrlbold {\isadigit{1}}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\isactrlbold {\isadigit{0}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   539
  \isa{d{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\textrm{if}\ c\ {\isacharequal}{\kern0pt}\ d\ \textrm{then}\ \isactrlbold {\isadigit{1}}\ \textrm{else}\ \isactrlbold {\isadigit{0}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   540
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   541
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{\textrm{if}\ nullable\ r\isactrlsub {\isadigit{1}}\ \textrm{then}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ \textrm{else}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   542
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsup {\isasymstar}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   543
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   544
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   545
 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   546
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   547
  We may extend this definition to give derivatives w.r.t.~strings:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   548
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   549
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   550
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   551
  \isa{r{\isacharbackslash}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{r}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   552
  \isa{r{\isacharbackslash}{\kern0pt}{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}s}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   553
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   554
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   555
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   556
  \noindent Given the equations in \eqref{SemDer}, it is a relatively easy
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   557
  exercise in mechanical reasoning to establish that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   558
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   559
  \begin{proposition}\label{derprop}\mbox{}\\ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   560
  \begin{tabular}{ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   561
  \textit{(1)} & \isa{nullable\ r} if and only if
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   562
  \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}, and \\ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   563
  \textit{(2)} & \isa{L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ Der\ c\ {\isacharparenleft}{\kern0pt}L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   564
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   565
  \end{proposition}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   566
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   567
  \noindent With this in place it is also very routine to prove that the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   568
  regular expression matcher defined as
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   569
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   570
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   571
  \isa{match\ r\ s\ {\isasymequiv}\ nullable\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}s{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   572
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   573
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   574
  \noindent gives a positive answer if and only if \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   575
  Consequently, this regular expression matching algorithm satisfies the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   576
  usual specification for regular expression matching. While the matcher
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   577
  above calculates a provably correct YES/NO answer for whether a regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   578
  expression matches a string or not, the novel idea of Sulzmann and Lu
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   579
  \cite{Sulzmann2014} is to append another phase to this algorithm in order
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   580
  to calculate a [lexical] value. We will explain the details next.%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   581
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   582
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   583
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   584
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   585
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   586
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   587
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   588
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   589
\isamarkupsection{POSIX Regular Expression Matching\label{posixsec}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   590
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   591
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   592
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   593
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   594
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   595
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   596
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   597
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   598
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   599
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   600
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   601
There have been many previous works that use values for encoding 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   602
  \emph{how} a regular expression matches a string.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   603
  The clever idea by Sulzmann and Lu \cite{Sulzmann2014} is to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   604
  define a function on values that mirrors (but inverts) the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   605
  construction of the derivative on regular expressions. \emph{Values}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   606
  are defined as the inductive datatype
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   607
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   608
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   609
  \isa{v\ {\isacharcolon}{\kern0pt}{\isacharequal}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   610
  \isa{Empty} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   611
  \isa{Char\ c} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   612
  \isa{Left\ v} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   613
  \isa{Right\ v} $\mid$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   614
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} $\mid$ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   615
  \isa{Stars\ vs} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   616
  \end{center}  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   617
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   618
  \noindent where we use \isa{vs} to stand for a list of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   619
  values. (This is similar to the approach taken by Frisch and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   620
  Cardelli for GREEDY matching \cite{Frisch2004}, and Sulzmann and Lu
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   621
  for POSIX matching \cite{Sulzmann2014}). The string underlying a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   622
  value can be calculated by the \isa{flat} function, written
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   623
  \isa{{\isacharbar}{\kern0pt}\underline{\hspace{2mm}}{\isacharbar}{\kern0pt}} and defined as:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   624
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   625
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   626
  \begin{tabular}[t]{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   627
  \isa{{\isacharbar}{\kern0pt}Empty{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   628
  \isa{{\isacharbar}{\kern0pt}Char\ c{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   629
  \isa{{\isacharbar}{\kern0pt}Left\ v{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   630
  \isa{{\isacharbar}{\kern0pt}Right\ v{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   631
  \end{tabular}\hspace{14mm}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   632
  \begin{tabular}[t]{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   633
  \isa{{\isacharbar}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   634
  \isa{{\isacharbar}{\kern0pt}Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   635
  \isa{{\isacharbar}{\kern0pt}Stars\ {\isacharparenleft}{\kern0pt}v\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}{\isacharbar}{\kern0pt}} & $\dn$ & \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}Stars\ vs{\isacharbar}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   636
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   637
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   638
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   639
  \noindent We will sometimes refer to the underlying string of a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   640
  value as \emph{flattened value}.  We will also overload our notation and 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   641
  use \isa{{\isacharbar}{\kern0pt}vs{\isacharbar}{\kern0pt}} for flattening a list of values and concatenating
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   642
  the resulting strings.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   643
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   644
  Sulzmann and Lu define
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   645
  inductively an \emph{inhabitation relation} that associates values to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   646
  regular expressions. We define this relation as
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   647
  follows:\footnote{Note that the rule for \isa{Stars} differs from
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   648
  our earlier paper \cite{AusafDyckhoffUrban2016}. There we used the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   649
  original definition by Sulzmann and Lu which does not require that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   650
  the values \isa{v\ {\isasymin}\ vs} flatten to a non-empty
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   651
  string. The reason for introducing the more restricted version of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   652
  lexical values is convenience later on when reasoning about an
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   653
  ordering relation for values.}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   654
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   655
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   656
  \begin{tabular}{c@ {\hspace{12mm}}c}\label{prfintros}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   657
  \\[-8mm]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   658
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{Empty\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{1}}}}} & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   659
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{Char\ c\ {\isacharcolon}{\kern0pt}\ c}}}\\[4mm]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   660
  \isa{\mbox{}\inferrule{\mbox{v\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}{\mbox{Left\ v\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}}} &
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   661
  \isa{\mbox{}\inferrule{\mbox{v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}{\mbox{Right\ v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}}}\\[4mm]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   662
  \isa{\mbox{}\inferrule{\mbox{v\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}\\\ \mbox{v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}}{\mbox{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}}}  &
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   663
  \isa{\mbox{}\inferrule{\mbox{{\isasymforall}v{\isasymin}vs{\isachardot}{\kern0pt}\ v\ {\isacharcolon}{\kern0pt}\ r\ {\isasymand}\ {\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}}{\mbox{Stars\ vs\ {\isacharcolon}{\kern0pt}\ r\isactrlsup {\isasymstar}}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   664
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   665
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   666
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   667
  \noindent where in the clause for \isa{Stars} we use the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   668
  notation \isa{v\ {\isasymin}\ vs} for indicating that \isa{v} is a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   669
  member in the list \isa{vs}.  We require in this rule that every
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   670
  value in \isa{vs} flattens to a non-empty string. The idea is that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   671
  \isa{Stars}-values satisfy the informal Star Rule (see Introduction)
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   672
  where the $^\star$ does not match the empty string unless this is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   673
  the only match for the repetition.  Note also that no values are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   674
  associated with the regular expression \isa{\isactrlbold {\isadigit{0}}}, and that the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   675
  only value associated with the regular expression \isa{\isactrlbold {\isadigit{1}}} is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   676
  \isa{Empty}.  It is routine to establish how values ``inhabiting''
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   677
  a regular expression correspond to the language of a regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   678
  expression, namely
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   679
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   680
  \begin{proposition}\label{inhabs}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   681
  \isa{L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbraceleft}{\kern0pt}{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ \mbox{\boldmath$\mid$}\ v\ {\isacharcolon}{\kern0pt}\ r{\isacharbraceright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   682
  \end{proposition}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   683
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   684
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   685
  Given a regular expression \isa{r} and a string \isa{s}, we define the 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   686
  set of all \emph{Lexical Values} inhabited by \isa{r} with the underlying string 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   687
  being \isa{s}:\footnote{Okui and Suzuki refer to our lexical values 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   688
  as \emph{canonical values} in \cite{OkuiSuzuki2010}. The notion of \emph{non-problematic
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   689
  values} by Cardelli and Frisch \cite{Frisch2004} is related, but not identical
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   690
  to our lexical values.}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   691
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   692
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   693
  \isa{LV\ r\ s\ {\isasymequiv}\ {\isacharbraceleft}{\kern0pt}v\ \mbox{\boldmath$\mid$}\ v\ {\isacharcolon}{\kern0pt}\ r\ {\isasymand}\ {\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ s{\isacharbraceright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   694
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   695
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   696
  \noindent The main property of \isa{LV\ r\ s} is that it is alway finite.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   697
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   698
  \begin{proposition}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   699
  \isa{finite\ {\isacharparenleft}{\kern0pt}LV\ r\ s{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   700
  \end{proposition}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   701
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   702
  \noindent This finiteness property does not hold in general if we
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   703
  remove the side-condition about \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} in the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   704
  \isa{Stars}-rule above. For example using Sulzmann and Lu's
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   705
  less restrictive definition, \isa{LV\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} would contain
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   706
  infinitely many values, but according to our more restricted
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   707
  definition only a single value, namely \isa{LV\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbraceleft}{\kern0pt}Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   708
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   709
  If a regular expression \isa{r} matches a string \isa{s}, then
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   710
  generally the set \isa{LV\ r\ s} is not just a singleton set.  In
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   711
  case of POSIX matching the problem is to calculate the unique lexical value
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   712
  that satisfies the (informal) POSIX rules from the Introduction.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   713
  Graphically the POSIX value calculation algorithm by Sulzmann and Lu
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   714
  can be illustrated by the picture in Figure~\ref{Sulz} where the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   715
  path from the left to the right involving \isa{derivatives}/\isa{nullable} is the first phase of the algorithm
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   716
  (calculating successive \Brz's derivatives) and \isa{mkeps}/\isa{inj}, the path from right to left, the second
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   717
  phase. This picture shows the steps required when a regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   718
  expression, say \isa{r\isactrlsub {\isadigit{1}}}, matches the string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}}. We first build the three derivatives (according to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   719
  \isa{a}, \isa{b} and \isa{c}). We then use \isa{nullable}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   720
  to find out whether the resulting derivative regular expression
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   721
  \isa{r\isactrlsub {\isadigit{4}}} can match the empty string. If yes, we call the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   722
  function \isa{mkeps} that produces a value \isa{v\isactrlsub {\isadigit{4}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   723
  for how \isa{r\isactrlsub {\isadigit{4}}} can match the empty string (taking into
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   724
  account the POSIX constraints in case there are several ways). This
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   725
  function is defined by the clauses:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   726
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   727
\begin{figure}[t]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   728
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   729
\begin{tikzpicture}[scale=2,node distance=1.3cm,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   730
                    every node/.style={minimum size=6mm}]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   731
\node (r1)  {\isa{r\isactrlsub {\isadigit{1}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   732
\node (r2) [right=of r1]{\isa{r\isactrlsub {\isadigit{2}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   733
\draw[->,line width=1mm](r1)--(r2) node[above,midway] {\isa{\underline{\hspace{2mm}}{\isacharbackslash}{\kern0pt}a}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   734
\node (r3) [right=of r2]{\isa{r\isactrlsub {\isadigit{3}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   735
\draw[->,line width=1mm](r2)--(r3) node[above,midway] {\isa{\underline{\hspace{2mm}}{\isacharbackslash}{\kern0pt}b}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   736
\node (r4) [right=of r3]{\isa{r\isactrlsub {\isadigit{4}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   737
\draw[->,line width=1mm](r3)--(r4) node[above,midway] {\isa{\underline{\hspace{2mm}}{\isacharbackslash}{\kern0pt}c}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   738
\draw (r4) node[anchor=west] {\;\raisebox{3mm}{\isa{nullable}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   739
\node (v4) [below=of r4]{\isa{v\isactrlsub {\isadigit{4}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   740
\draw[->,line width=1mm](r4) -- (v4);
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   741
\node (v3) [left=of v4] {\isa{v\isactrlsub {\isadigit{3}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   742
\draw[->,line width=1mm](v4)--(v3) node[below,midway] {\isa{inj\ r\isactrlsub {\isadigit{3}}\ c}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   743
\node (v2) [left=of v3]{\isa{v\isactrlsub {\isadigit{2}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   744
\draw[->,line width=1mm](v3)--(v2) node[below,midway] {\isa{inj\ r\isactrlsub {\isadigit{2}}\ b}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   745
\node (v1) [left=of v2] {\isa{v\isactrlsub {\isadigit{1}}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   746
\draw[->,line width=1mm](v2)--(v1) node[below,midway] {\isa{inj\ r\isactrlsub {\isadigit{1}}\ a}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   747
\draw (r4) node[anchor=north west] {\;\raisebox{-8mm}{\isa{mkeps}}};
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   748
\end{tikzpicture}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   749
\end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   750
\mbox{}\\[-13mm]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   751
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   752
\caption{The two phases of the algorithm by Sulzmann \& Lu \cite{Sulzmann2014},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   753
matching the string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}}. The first phase (the arrows from 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   754
left to right) is \Brz's matcher building successive derivatives. If the 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   755
last regular expression is \isa{nullable}, then the functions of the 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   756
second phase are called (the top-down and right-to-left arrows): first 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   757
\isa{mkeps} calculates a value \isa{v\isactrlsub {\isadigit{4}}} witnessing
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   758
how the empty string has been recognised by \isa{r\isactrlsub {\isadigit{4}}}. After
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   759
that the function \isa{inj} ``injects back'' the characters of the string into
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   760
the values.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   761
\label{Sulz}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   762
\end{figure} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   763
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   764
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   765
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   766
  \isa{mkeps\ \isactrlbold {\isadigit{1}}} & $\dn$ & \isa{Empty}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   767
  \isa{mkeps\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   768
  \isa{mkeps\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{\textrm{if}\ nullable\ r\isactrlsub {\isadigit{1}}\ \textrm{then}\ Left\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ \textrm{else}\ Right\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   769
  \isa{mkeps\ {\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   770
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   771
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   772
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   773
  \noindent Note that this function needs only to be partially defined,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   774
  namely only for regular expressions that are nullable. In case \isa{nullable} fails, the string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}} cannot be matched by \isa{r\isactrlsub {\isadigit{1}}} and the null value \isa{None} is returned. Note also how this function
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   775
  makes some subtle choices leading to a POSIX value: for example if an
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   776
  alternative regular expression, say \isa{r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}, can
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   777
  match the empty string and furthermore \isa{r\isactrlsub {\isadigit{1}}} can match the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   778
  empty string, then we return a \isa{Left}-value. The \isa{Right}-value will only be returned if \isa{r\isactrlsub {\isadigit{1}}} cannot match the empty
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   779
  string.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   780
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   781
  The most interesting idea from Sulzmann and Lu \cite{Sulzmann2014} is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   782
  the construction of a value for how \isa{r\isactrlsub {\isadigit{1}}} can match the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   783
  string \isa{{\isacharbrackleft}{\kern0pt}a{\isacharcomma}{\kern0pt}\ b{\isacharcomma}{\kern0pt}\ c{\isacharbrackright}{\kern0pt}} from the value how the last derivative, \isa{r\isactrlsub {\isadigit{4}}} in Fig.~\ref{Sulz}, can match the empty string. Sulzmann and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   784
  Lu achieve this by stepwise ``injecting back'' the characters into the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   785
  values thus inverting the operation of building derivatives, but on the level
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   786
  of values. The corresponding function, called \isa{inj}, takes three
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   787
  arguments, a regular expression, a character and a value. For example in
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   788
  the first (or right-most) \isa{inj}-step in Fig.~\ref{Sulz} the regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   789
  expression \isa{r\isactrlsub {\isadigit{3}}}, the character \isa{c} from the last
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   790
  derivative step and \isa{v\isactrlsub {\isadigit{4}}}, which is the value corresponding
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   791
  to the derivative regular expression \isa{r\isactrlsub {\isadigit{4}}}. The result is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   792
  the new value \isa{v\isactrlsub {\isadigit{3}}}. The final result of the algorithm is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   793
  the value \isa{v\isactrlsub {\isadigit{1}}}. The \isa{inj} function is defined by recursion on regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   794
  expressions and by analysing the shape of values (corresponding to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   795
  the derivative regular expressions).
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   796
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   797
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   798
  \begin{tabular}{l@ {\hspace{5mm}}lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   799
  \textit{(1)} & \isa{inj\ d\ c\ {\isacharparenleft}{\kern0pt}Empty{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Char\ d}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   800
  \textit{(2)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Left\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   801
      \isa{Left\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   802
  \textit{(3)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Right\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   803
      \isa{Right\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   804
  \textit{(4)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   805
      & \isa{Seq\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   806
  \textit{(5)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Left\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}} & $\dn$ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   807
      & \isa{Seq\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   808
  \textit{(6)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Right\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   809
      & \isa{Seq\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   810
  \textit{(7)} & \isa{inj\ {\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Seq\ v\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}} & $\dn$ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   811
      & \isa{Stars\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ v\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   812
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   813
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   814
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   815
  \noindent To better understand what is going on in this definition it
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   816
  might be instructive to look first at the three sequence cases (clauses
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   817
  \textit{(4)} -- \textit{(6)}). In each case we need to construct an ``injected value'' for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   818
  \isa{r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}. This must be a value of the form \isa{Seq\ \underline{\hspace{2mm}}\ \underline{\hspace{2mm}}}\,. Recall the clause of the \isa{derivative}-function
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   819
  for sequence regular expressions:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   820
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   821
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   822
  \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} $\dn$ \isa{\textrm{if}\ nullable\ r\isactrlsub {\isadigit{1}}\ \textrm{then}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ \textrm{else}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   823
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   824
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   825
  \noindent Consider first the \isa{else}-branch where the derivative is \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}. The corresponding value must therefore
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   826
  be of the form \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}}, which matches the left-hand
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   827
  side in clause~\textit{(4)} of \isa{inj}. In the \isa{if}-branch the derivative is an
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   828
  alternative, namely \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}. This means we either have to consider a \isa{Left}- or
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   829
  \isa{Right}-value. In case of the \isa{Left}-value we know further it
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   830
  must be a value for a sequence regular expression. Therefore the pattern
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   831
  we match in the clause \textit{(5)} is \isa{Left\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   832
  while in \textit{(6)} it is just \isa{Right\ v\isactrlsub {\isadigit{2}}}. One more interesting
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   833
  point is in the right-hand side of clause \textit{(6)}: since in this case the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   834
  regular expression \isa{r\isactrlsub {\isadigit{1}}} does not ``contribute'' to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   835
  matching the string, that means it only matches the empty string, we need to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   836
  call \isa{mkeps} in order to construct a value for how \isa{r\isactrlsub {\isadigit{1}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   837
  can match this empty string. A similar argument applies for why we can
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   838
  expect in the left-hand side of clause \textit{(7)} that the value is of the form
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   839
  \isa{Seq\ v\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}}---the derivative of a star is \isa{{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsup {\isasymstar}}. Finally, the reason for why we can ignore the second argument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   840
  in clause \textit{(1)} of \isa{inj} is that it will only ever be called in cases
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   841
  where \isa{c\ {\isacharequal}{\kern0pt}\ d}, but the usual linearity restrictions in patterns do
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   842
  not allow us to build this constraint explicitly into our function
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   843
  definition.\footnote{Sulzmann and Lu state this clause as \isa{inj\ c\ c\ {\isacharparenleft}{\kern0pt}Empty{\isacharparenright}{\kern0pt}} $\dn$ \isa{Char\ c},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   844
  but our deviation is harmless.}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   845
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   846
  The idea of the \isa{inj}-function to ``inject'' a character, say
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   847
  \isa{c}, into a value can be made precise by the first part of the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   848
  following lemma, which shows that the underlying string of an injected
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   849
  value has a prepended character \isa{c}; the second part shows that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   850
  the underlying string of an \isa{mkeps}-value is always the empty
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   851
  string (given the regular expression is nullable since otherwise
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   852
  \isa{mkeps} might not be defined).
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   853
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   854
  \begin{lemma}\mbox{}\smallskip\\\label{Prf_injval_flat}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   855
  \begin{tabular}{ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   856
  (1) & \isa{{\normalsize{}If\,}\ v\ {\isacharcolon}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c\ {\normalsize \,then\,}\ {\isacharbar}{\kern0pt}inj\ r\ c\ v{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}{\isachardot}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   857
  (2) & \isa{{\normalsize{}If\,}\ nullable\ r\ {\normalsize \,then\,}\ {\isacharbar}{\kern0pt}mkeps\ r{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   858
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   859
  \end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   860
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   861
  \begin{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   862
  Both properties are by routine inductions: the first one can, for example,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   863
  be proved by induction over the definition of \isa{derivatives}; the second by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   864
  an induction on \isa{r}. There are no interesting cases.\qed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   865
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   866
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   867
  Having defined the \isa{mkeps} and \isa{inj} function we can extend
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   868
  \Brz's matcher so that a value is constructed (assuming the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   869
  regular expression matches the string). The clauses of the Sulzmann and Lu lexer are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   870
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   871
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   872
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   873
  \isa{lexer\ r\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{\textrm{if}\ nullable\ r\ \textrm{then}\ Some\ {\isacharparenleft}{\kern0pt}mkeps\ r{\isacharparenright}{\kern0pt}\ \textrm{else}\ None}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   874
  \isa{lexer\ r\ {\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{case} \isa{lexer\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ s} \isa{of}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   875
                     & & \phantom{$|$} \isa{None}  \isa{{\isasymRightarrow}} \isa{None}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   876
                     & & $|$ \isa{Some\ v} \isa{{\isasymRightarrow}} \isa{Some\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ v{\isacharparenright}{\kern0pt}}                          
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   877
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   878
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   879
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   880
  \noindent If the regular expression does not match the string, \isa{None} is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   881
  returned. If the regular expression \emph{does}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   882
  match the string, then \isa{Some} value is returned. One important
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   883
  virtue of this algorithm is that it can be implemented with ease in any
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   884
  functional programming language and also in Isabelle/HOL. In the remaining
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   885
  part of this section we prove that this algorithm is correct.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   886
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   887
  The well-known idea of POSIX matching is informally defined by some
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   888
  rules such as the Longest Match and Priority Rules (see
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   889
  Introduction); as correctly argued in \cite{Sulzmann2014}, this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   890
  needs formal specification. Sulzmann and Lu define an ``ordering
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   891
  relation'' between values and argue that there is a maximum value,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   892
  as given by the derivative-based algorithm.  In contrast, we shall
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   893
  introduce a simple inductive definition that specifies directly what
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   894
  a \emph{POSIX value} is, incorporating the POSIX-specific choices
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   895
  into the side-conditions of our rules. Our definition is inspired by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   896
  the matching relation given by Vansummeren~\cite{Vansummeren2006}. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   897
  The relation we define is ternary and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   898
  written as \mbox{\isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}}, relating
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   899
  strings, regular expressions and values; the inductive rules are given in 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   900
  Figure~\ref{POSIXrules}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   901
  We can prove that given a string \isa{s} and regular expression \isa{r}, the POSIX value \isa{v} is uniquely determined by \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   902
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   903
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   904
  \begin{figure}[t]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   905
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   906
  \begin{tabular}{c}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   907
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ \isactrlbold {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Empty}}}\isa{P}\isa{\isactrlbold {\isadigit{1}}} \qquad
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   908
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}c{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Char\ c}}}\isa{P}\isa{c}\medskip\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   909
  \isa{\mbox{}\inferrule{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}}{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Left\ v}}}\isa{P{\isacharplus}{\kern0pt}L}\qquad
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   910
  \isa{\mbox{}\inferrule{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\\ \mbox{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}}{\mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Right\ v}}}\isa{P{\isacharplus}{\kern0pt}R}\medskip\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   911
  $\mprset{flushleft}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   912
   \inferrule
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   913
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} \qquad
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   914
    \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{2}}} \\\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   915
    \isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   916
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}}}$\isa{PS}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   917
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}}}\isa{P{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}\medskip\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   918
  $\mprset{flushleft}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   919
   \inferrule
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   920
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} \qquad
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   921
    \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Stars\ vs} \qquad
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   922
    \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} \\\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   923
    \isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   924
   {\isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Stars\ {\isacharparenleft}{\kern0pt}v\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}}}$\isa{P{\isasymstar}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   925
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   926
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   927
  \caption{Our inductive definition of POSIX values.}\label{POSIXrules}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   928
  \end{figure}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   929
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   930
   
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   931
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   932
  \begin{theorem}\mbox{}\smallskip\\\label{posixdeterm}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   933
  \begin{tabular}{ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   934
  (1) & If \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} then \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} and \isa{{\isacharbar}{\kern0pt}v{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ s}.\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   935
  (2) & \isa{{\normalsize{}If\,}\ \mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\ {\normalsize \,and\,}\ \mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}\ {\normalsize \,then\,}\ v\ {\isacharequal}{\kern0pt}\ v{\isacharprime}{\kern0pt}{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   936
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   937
  \end{theorem}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   938
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   939
  \begin{proof} Both by induction on the definition of \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   940
  The second parts follows by a case analysis of \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   941
  the first part.\qed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   942
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   943
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   944
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   945
  We claim that our \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} relation captures the idea behind the four
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   946
  informal POSIX rules shown in the Introduction: Consider for example the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   947
  rules \isa{P{\isacharplus}{\kern0pt}L} and \isa{P{\isacharplus}{\kern0pt}R} where the POSIX value for a string
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   948
  and an alternative regular expression, that is \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   949
  is specified---it is always a \isa{Left}-value, \emph{except} when the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   950
  string to be matched is not in the language of \isa{r\isactrlsub {\isadigit{1}}}; only then it
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   951
  is a \isa{Right}-value (see the side-condition in \isa{P{\isacharplus}{\kern0pt}R}).
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   952
  Interesting is also the rule for sequence regular expressions (\isa{PS}). The first two premises state that \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   953
  are the POSIX values for \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} and \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   954
  respectively. Consider now the third premise and note that the POSIX value
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   955
  of this rule should match the string \mbox{\isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}}}. According to the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   956
  Longest Match Rule, we want that the \isa{s\isactrlsub {\isadigit{1}}} is the longest initial
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   957
  split of \mbox{\isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}}} such that \isa{s\isactrlsub {\isadigit{2}}} is still recognised
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   958
  by \isa{r\isactrlsub {\isadigit{2}}}. Let us assume, contrary to the third premise, that there
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   959
  \emph{exist} an \isa{s\isactrlsub {\isadigit{3}}} and \isa{s\isactrlsub {\isadigit{4}}} such that \isa{s\isactrlsub {\isadigit{2}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   960
  can be split up into a non-empty string \isa{s\isactrlsub {\isadigit{3}}} and a possibly empty
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   961
  string \isa{s\isactrlsub {\isadigit{4}}}. Moreover the longer string \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}} can be
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   962
  matched by \isa{r\isactrlsub {\isadigit{1}}} and the shorter \isa{s\isactrlsub {\isadigit{4}}} can still be
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   963
  matched by \isa{r\isactrlsub {\isadigit{2}}}. In this case \isa{s\isactrlsub {\isadigit{1}}} would \emph{not} be the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   964
  longest initial split of \mbox{\isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}}} and therefore \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} cannot be a POSIX value for \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   965
  The main point is that our side-condition ensures the Longest 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   966
  Match Rule is satisfied.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   967
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   968
  A similar condition is imposed on the POSIX value in the \isa{P{\isasymstar}}-rule. Also there we want that \isa{s\isactrlsub {\isadigit{1}}} is the longest initial
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   969
  split of \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}} and furthermore the corresponding value
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   970
  \isa{v} cannot be flattened to the empty string. In effect, we require
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   971
  that in each ``iteration'' of the star, some non-empty substring needs to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   972
  be ``chipped'' away; only in case of the empty string we accept \isa{Stars\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} as the POSIX value. Indeed we can show that our POSIX values
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   973
  are lexical values which exclude those \isa{Stars} that contain subvalues 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   974
  that flatten to the empty string.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   975
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   976
  \begin{lemma}\label{LVposix}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   977
  \isa{{\normalsize{}If\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\ {\normalsize \,then\,}\ v\ {\isasymin}\ LV\ r\ s{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   978
  \end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   979
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   980
  \begin{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   981
  By routine induction on \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}.\qed 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   982
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   983
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   984
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   985
  Next is the lemma that shows the function \isa{mkeps} calculates
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   986
  the POSIX value for the empty string and a nullable regular expression.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   987
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   988
  \begin{lemma}\label{lemmkeps}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   989
  \isa{{\normalsize{}If\,}\ nullable\ r\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ mkeps\ r{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   990
  \end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   991
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   992
  \begin{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   993
  By routine induction on \isa{r}.\qed 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   994
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   995
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   996
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   997
  The central lemma for our POSIX relation is that the \isa{inj}-function
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   998
  preserves POSIX values.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
   999
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1000
  \begin{lemma}\label{Posix2}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1001
  \isa{{\normalsize{}If\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\ c\ v{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1002
  \end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1003
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1004
  \begin{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1005
  By induction on \isa{r}. We explain two cases.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1006
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1007
  \begin{itemize}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1008
  \item[$\bullet$] Case \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}. There are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1009
  two subcases, namely \isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}} \mbox{\isa{v\ {\isacharequal}{\kern0pt}\ Left\ v{\isacharprime}{\kern0pt}}} and \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}; and \isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}} \isa{v\ {\isacharequal}{\kern0pt}\ Right\ v{\isacharprime}{\kern0pt}}, \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}} and \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}. In \isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}} we
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1010
  know \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}, from which we can infer \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{1}}\ c\ v{\isacharprime}{\kern0pt}} by induction hypothesis and hence \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ c\ {\isacharparenleft}{\kern0pt}Left\ v{\isacharprime}{\kern0pt}{\isacharparenright}{\kern0pt}} as needed. Similarly
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1011
  in subcase \isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}} where, however, in addition we have to use
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1012
  Proposition~\ref{derprop}(2) in order to infer \isa{c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} from \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}.\smallskip
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1013
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1014
  \item[$\bullet$] Case \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}}. There are three subcases:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1015
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1016
  \begin{quote}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1017
  \begin{description}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1018
  \item[\isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}}] \isa{v\ {\isacharequal}{\kern0pt}\ Left\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} and \isa{nullable\ r\isactrlsub {\isadigit{1}}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1019
  \item[\isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}}] \isa{v\ {\isacharequal}{\kern0pt}\ Right\ v\isactrlsub {\isadigit{1}}} and \isa{nullable\ r\isactrlsub {\isadigit{1}}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1020
  \item[\isa{{\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}}] \isa{v\ {\isacharequal}{\kern0pt}\ Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} and \isa{{\isasymnot}\ nullable\ r\isactrlsub {\isadigit{1}}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1021
  \end{description}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1022
  \end{quote}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1023
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1024
  \noindent For \isa{{\isacharparenleft}{\kern0pt}a{\isacharparenright}{\kern0pt}} we know \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1025
  \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{2}}} as well as
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1026
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1027
  \[\isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1028
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1029
  \noindent From the latter we can infer by Proposition~\ref{derprop}(2):
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1030
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1031
  \[\isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymand}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1032
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1033
  \noindent We can use the induction hypothesis for \isa{r\isactrlsub {\isadigit{1}}} to obtain
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1034
  \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}}. Putting this all together allows us to infer
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1035
  \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}. The case \isa{{\isacharparenleft}{\kern0pt}c{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1036
  is similar.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1037
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1038
  For \isa{{\isacharparenleft}{\kern0pt}b{\isacharparenright}{\kern0pt}} we know \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} and 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1039
  \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}. From the former
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1040
  we have \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{1}}} by induction hypothesis
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1041
  for \isa{r\isactrlsub {\isadigit{2}}}. From the latter we can infer
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1042
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1043
  \[\isa{{\isasymnexists}s\isactrlsub {\isadigit{3}}\ s\isactrlsub {\isadigit{4}}{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ s\isactrlsub {\isadigit{3}}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{4}}\ {\isacharequal}{\kern0pt}\ c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\ {\isasymand}\ s\isactrlsub {\isadigit{3}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymand}\ s\isactrlsub {\isadigit{4}}\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1044
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1045
  \noindent By Lemma~\ref{lemmkeps} we know \isa{{\isacharparenleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ mkeps\ r\isactrlsub {\isadigit{1}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1046
  holds. Putting this all together, we can conclude with \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ {\isacharparenleft}{\kern0pt}mkeps\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}inj\ r\isactrlsub {\isadigit{2}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}, as required.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1047
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1048
  Finally suppose \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\isactrlsup {\isasymstar}}. This case is very similar to the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1049
  sequence case, except that we need to also ensure that \isa{{\isacharbar}{\kern0pt}inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isasymnoteq}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}. This follows from \isa{{\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ inj\ r\isactrlsub {\isadigit{1}}\ c\ v\isactrlsub {\isadigit{1}}}  (which in turn follows from \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}} and the induction hypothesis).\qed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1050
  \end{itemize}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1051
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1052
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1053
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1054
  With Lemma~\ref{Posix2} in place, it is completely routine to establish
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1055
  that the Sulzmann and Lu lexer satisfies our specification (returning
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1056
  the null value \isa{None} iff the string is not in the language of the regular expression,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1057
  and returning a unique POSIX value iff the string \emph{is} in the language):
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1058
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1059
  \begin{theorem}\mbox{}\smallskip\\\label{lexercorrect}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1060
  \begin{tabular}{ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1061
  (1) & \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} if and only if \isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ None}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1062
  (2) & \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} if and only if \isa{{\isasymexists}v{\isachardot}{\kern0pt}\ lexer\ r\ s\ {\isacharequal}{\kern0pt}\ Some\ v\ {\isasymand}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1063
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1064
  \end{theorem}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1065
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1066
  \begin{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1067
  By induction on \isa{s} using Lemma~\ref{lemmkeps} and \ref{Posix2}.\qed  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1068
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1069
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1070
  \noindent In \textit{(2)} we further know by Theorem~\ref{posixdeterm} that the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1071
  value returned by the lexer must be unique.   A simple corollary 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1072
  of our two theorems is:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1073
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1074
  \begin{corollary}\mbox{}\smallskip\\\label{lexercorrectcor}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1075
  \begin{tabular}{ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1076
  (1) & \isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ None} if and only if \isa{{\isasymnexists}v{\isachardot}{\kern0pt}a{\isachardot}{\kern0pt}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\ 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1077
  (2) & \isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ Some\ v} if and only if \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1078
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1079
  \end{corollary}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1080
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1081
  \noindent This concludes our correctness proof. Note that we have
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1082
  not changed the algorithm of Sulzmann and Lu,\footnote{All
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1083
  deviations we introduced are harmless.} but introduced our own
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1084
  specification for what a correct result---a POSIX value---should be.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1085
  In the next section we show that our specification coincides with
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1086
  another one given by Okui and Suzuki using a different technique.%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1087
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1088
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1089
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1090
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1091
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1092
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1093
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1094
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1095
\isamarkupsection{Ordering of Values according to Okui and Suzuki%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1096
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1097
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1098
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1099
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1100
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1101
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1102
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1103
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1104
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1105
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1106
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1107
While in the previous section we have defined POSIX values directly
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1108
  in terms of a ternary relation (see inference rules in Figure~\ref{POSIXrules}),
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1109
  Sulzmann and Lu took a different approach in \cite{Sulzmann2014}:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1110
  they introduced an ordering for values and identified POSIX values
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1111
  as the maximal elements.  An extended version of \cite{Sulzmann2014}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1112
  is available at the website of its first author; this includes more
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1113
  details of their proofs, but which are evidently not in final form
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1114
  yet. Unfortunately, we were not able to verify claims that their
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1115
  ordering has properties such as being transitive or having maximal
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1116
  elements. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1117
 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1118
  Okui and Suzuki \cite{OkuiSuzuki2010,OkuiSuzukiTech} described
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1119
  another ordering of values, which they use to establish the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1120
  correctness of their automata-based algorithm for POSIX matching.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1121
  Their ordering resembles some aspects of the one given by Sulzmann
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1122
  and Lu, but overall is quite different. To begin with, Okui and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1123
  Suzuki identify POSIX values as minimal, rather than maximal,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1124
  elements in their ordering. A more substantial difference is that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1125
  the ordering by Okui and Suzuki uses \emph{positions} in order to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1126
  identify and compare subvalues. Positions are lists of natural
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1127
  numbers. This allows them to quite naturally formalise the Longest
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1128
  Match and Priority rules of the informal POSIX standard.  Consider
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1129
  for example the value \isa{v}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1130
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1131
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1132
  \isa{v\ {\isasymequiv}\ Stars\ {\isacharbrackleft}{\kern0pt}Seq\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharcomma}{\kern0pt}\ Char\ z{\isacharbrackright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1133
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1134
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1135
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1136
  At position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharcomma}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}} of this value is the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1137
  subvalue \isa{Char\ y} and at position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}} the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1138
  subvalue \isa{Char\ z}.  At the `root' position, or empty list
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1139
  \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}}, is the whole value \isa{v}. Positions such as \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharcomma}{\kern0pt}{\isadigit{1}}{\isacharcomma}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}} or \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{2}}{\isacharbrackright}{\kern0pt}} are outside of \isa{v}. If it exists, the subvalue of \isa{v} at a position \isa{p}, written \isa{v\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub }, can be recursively defined by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1140
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1141
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1142
  \begin{tabular}{r@ {\hspace{0mm}}lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1143
  \isa{v} &  \isa{{\isasymdownharpoonleft}\isactrlbsub {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\isactrlesub } & \isa{{\isasymequiv}}& \isa{v}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1144
  \isa{Left\ v} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{0}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}}& \isa{v\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub }\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1145
  \isa{Right\ v} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{1}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}} & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1146
  \isa{v\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub }\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1147
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{0}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}} & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1148
  \isa{v\isactrlsub {\isadigit{1}}\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub } \\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1149
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} & \isa{{\isasymdownharpoonleft}\isactrlbsub {\isadigit{1}}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub }
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1150
  & \isa{{\isasymequiv}} & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1151
  \isa{v\isactrlsub {\isadigit{2}}\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub } \\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1152
  \isa{Stars\ vs} & \isa{{\isasymdownharpoonleft}\isactrlbsub n{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}ps\isactrlesub } & \isa{{\isasymequiv}}& \isa{vs\ensuremath{_{[\mathit{n}]}}\mbox{$\downharpoonleft$}\isactrlbsub ps\isactrlesub }\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1153
  \end{tabular} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1154
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1155
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1156
  \noindent In the last clause we use Isabelle's notation \isa{vs\ensuremath{_{[\mathit{n}]}}} for the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1157
  \isa{n}th element in a list.  The set of positions inside a value \isa{v},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1158
  written \isa{Pos\ v}, is given by 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1159
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1160
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1161
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1162
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Empty{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1163
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Char\ c{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1164
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Left\ v{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{0}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v{\isacharbraceright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1165
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Right\ v{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v{\isacharbraceright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1166
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1167
  & \isa{{\isasymequiv}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1168
  & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{0}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharbraceleft}{\kern0pt}{\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{2}}{\isacharbraceright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1169
  \isa{Pos\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}} & \isa{{\isasymequiv}} & \isa{{\isacharbraceleft}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymunion}\ {\isacharparenleft}{\kern0pt}{\isasymUnion}n\ {\isacharless}{\kern0pt}\ len\ vs\ {\isacharbraceleft}{\kern0pt}n\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\ \mbox{\boldmath$\mid$}\ ps\ {\isasymin}\ Pos\ vs\ensuremath{_{[\mathit{n}]}}{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1170
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1171
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1172
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1173
  \noindent 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1174
  whereby \isa{len} in the last clause stands for the length of a list. Clearly
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1175
  for every position inside a value there exists a subvalue at that position.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1176
 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1177
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1178
  To help understanding the ordering of Okui and Suzuki, consider again 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1179
  the earlier value
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1180
  \isa{v} and compare it with the following \isa{w}:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1181
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1182
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1183
  \begin{tabular}{l}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1184
  \isa{v\ {\isasymequiv}\ Stars\ {\isacharbrackleft}{\kern0pt}Seq\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Char\ y{\isacharparenright}{\kern0pt}{\isacharcomma}{\kern0pt}\ Char\ z{\isacharbrackright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1185
  \isa{w\ {\isasymequiv}\ Stars\ {\isacharbrackleft}{\kern0pt}Char\ x{\isacharcomma}{\kern0pt}\ Char\ y{\isacharcomma}{\kern0pt}\ Char\ z{\isacharbrackright}{\kern0pt}}  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1186
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1187
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1188
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1189
  \noindent Both values match the string \isa{xyz}, that means if
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1190
  we flatten these values at their respective root position, we obtain
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1191
  \isa{xyz}. However, at position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}}, \isa{v} matches
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1192
  \isa{xy} whereas \isa{w} matches only the shorter \isa{x}. So
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1193
  according to the Longest Match Rule, we should prefer \isa{v},
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1194
  rather than \isa{w} as POSIX value for string \isa{xyz} (and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1195
  corresponding regular expression). In order to
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1196
  formalise this idea, Okui and Suzuki introduce a measure for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1197
  subvalues at position \isa{p}, called the \emph{norm} of \isa{v}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1198
  at position \isa{p}. We can define this measure in Isabelle as an
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1199
  integer as follows
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1200
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1201
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1202
  \isa{{\isasymparallel}v{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isasymequiv}\ \textrm{if}\ p\ {\isasymin}\ Pos\ v\ \textrm{then}\ len\ {\isacharbar}{\kern0pt}v\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub {\isacharbar}{\kern0pt}\ \textrm{else}\ {\isacharminus}{\kern0pt}\ {\isadigit{1}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1203
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1204
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1205
  \noindent where we take the length of the flattened value at
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1206
  position \isa{p}, provided the position is inside \isa{v}; if
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1207
  not, then the norm is \isa{{\isacharminus}{\kern0pt}{\isadigit{1}}}. The default for outside
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1208
  positions is crucial for the POSIX requirement of preferring a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1209
  \isa{Left}-value over a \isa{Right}-value (if they can match the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1210
  same string---see the Priority Rule from the Introduction). For this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1211
  consider
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1212
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1213
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1214
  \isa{v\ {\isasymequiv}\ Left\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}} \qquad and \qquad \isa{w\ {\isasymequiv}\ Right\ {\isacharparenleft}{\kern0pt}Char\ x{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1215
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1216
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1217
  \noindent Both values match \isa{x}. At position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1218
  the norm of \isa{v} is \isa{{\isadigit{1}}} (the subvalue matches \isa{x}),
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1219
  but the norm of \isa{w} is \isa{{\isacharminus}{\kern0pt}{\isadigit{1}}} (the position is outside
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1220
  \isa{w} according to how we defined the `inside' positions of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1221
  \isa{Left}- and \isa{Right}-values).  Of course at position
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1222
  \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}}, the norms \isa{{\isasymparallel}v{\isasymparallel}\isactrlbsub {\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}\isactrlesub } and \isa{{\isasymparallel}w{\isasymparallel}\isactrlbsub {\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}\isactrlesub } are reversed, but the point is that subvalues
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1223
  will be analysed according to lexicographically ordered
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1224
  positions. According to this ordering, the position \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{0}}{\isacharbrackright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1225
  takes precedence over \isa{{\isacharbrackleft}{\kern0pt}{\isadigit{1}}{\isacharbrackright}{\kern0pt}} and thus also \isa{v} will be 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1226
  preferred over \isa{w}.  The lexicographic ordering of positions, written
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1227
  \isa{\underline{\hspace{2mm}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ \underline{\hspace{2mm}}}, can be conveniently formalised
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1228
  by three inference rules
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1229
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1230
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1231
  \begin{tabular}{ccc}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1232
  \isa{\mbox{}\inferrule{\mbox{}}{\mbox{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps}}}\hspace{1cm} &
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1233
  \isa{\mbox{}\inferrule{\mbox{p\isactrlsub {\isadigit{1}}\ {\isacharless}{\kern0pt}\ p\isactrlsub {\isadigit{2}}}}{\mbox{p\isactrlsub {\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{2}}}}}\hspace{1cm} &
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1234
  \isa{\mbox{}\inferrule{\mbox{ps\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ ps\isactrlsub {\isadigit{2}}}}{\mbox{p\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}ps\isactrlsub {\isadigit{2}}}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1235
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1236
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1237
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1238
  With the norm and lexicographic order in place,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1239
  we can state the key definition of Okui and Suzuki
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1240
  \cite{OkuiSuzuki2010}: a value \isa{v\isactrlsub {\isadigit{1}}} is \emph{smaller at position \isa{p}} than
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1241
  \isa{v\isactrlsub {\isadigit{2}}}, written \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub p\isactrlesub \ v\isactrlsub {\isadigit{2}}}, 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1242
  if and only if  $(i)$ the norm at position \isa{p} is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1243
  greater in \isa{v\isactrlsub {\isadigit{1}}} (that is the string \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub {\isacharbar}{\kern0pt}} is longer 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1244
  than \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}\mbox{$\downharpoonleft$}\isactrlbsub p\isactrlesub {\isacharbar}{\kern0pt}}) and $(ii)$ all subvalues at 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1245
  positions that are inside \isa{v\isactrlsub {\isadigit{1}}} or \isa{v\isactrlsub {\isadigit{2}}} and that are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1246
  lexicographically smaller than \isa{p}, we have the same norm, namely
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1247
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1248
 \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1249
 \begin{tabular}{c}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1250
 \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub p\isactrlesub \ v\isactrlsub {\isadigit{2}}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1251
 \isa{{\isasymequiv}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1252
 $\begin{cases}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1253
 (i) & \isa{{\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p\isactrlesub }   \quad\text{and}\smallskip \\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1254
 (ii) & \isa{{\isasymforall}q{\isasymin}Pos\ v\isactrlsub {\isadigit{1}}\ {\isasymunion}\ Pos\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}\ q\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p\ {\isasymlongrightarrow}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub q\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub q\isactrlesub }
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1255
 \end{cases}$
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1256
 \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1257
 \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1258
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1259
 \noindent The position \isa{p} in this definition acts as the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1260
  \emph{first distinct position} of \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}}, where both values match strings of different length
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1261
  \cite{OkuiSuzuki2010}.  Since at \isa{p} the values \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} match different strings, the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1262
  ordering is irreflexive. Derived from the definition above
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1263
  are the following two orderings:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1264
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1265
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1266
  \begin{tabular}{l}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1267
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}\ {\isasymequiv}\ {\isasymexists}p{\isachardot}{\kern0pt}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\isactrlbsub p\isactrlesub \ v\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1268
  \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}\ {\isasymequiv}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}\ {\isasymor}\ v\isactrlsub {\isadigit{1}}\ {\isacharequal}{\kern0pt}\ v\isactrlsub {\isadigit{2}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1269
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1270
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1271
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1272
 While we encountered a number of obstacles for establishing properties like
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1273
 transitivity for the ordering of Sulzmann and Lu (and which we failed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1274
 to overcome), it is relatively straightforward to establish this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1275
 property for the orderings
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1276
 \isa{\underline{\hspace{2mm}}\ {\isasymprec}\ \underline{\hspace{2mm}}} and \isa{\underline{\hspace{2mm}}\ \mbox{$\preccurlyeq$}\ \underline{\hspace{2mm}}}  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1277
 by Okui and Suzuki.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1278
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1279
 \begin{lemma}[Transitivity]\label{transitivity}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1280
 \isa{{\normalsize{}If\,}\ \mbox{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}}\ {\normalsize \,and\,}\ \mbox{v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ v\isactrlsub {\isadigit{3}}}\ {\normalsize \,then\,}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{3}}{\isachardot}{\kern0pt}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1281
 \end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1282
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1283
 \begin{proof} From the assumption we obtain two positions \isa{p}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1284
 and \isa{q}, where the values \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} (respectively \isa{v\isactrlsub {\isadigit{2}}} and \isa{v\isactrlsub {\isadigit{3}}}) are `distinct'.  Since \isa{{\isasymprec}\isactrlbsub lex\isactrlesub } is trichotomous, we need to consider
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1285
 three cases, namely \isa{p\ {\isacharequal}{\kern0pt}\ q}, \isa{p\ {\isasymprec}\isactrlbsub lex\isactrlesub \ q} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1286
 \isa{q\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p}. Let us look at the first case.  Clearly
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1287
 \isa{{\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p\isactrlesub } and \isa{{\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p\isactrlesub } imply \isa{{\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p\isactrlesub \ {\isacharless}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p\isactrlesub }.  It remains to show
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1288
 that for a \isa{p{\isacharprime}{\kern0pt}\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}\ {\isasymunion}\ Pos\ v\isactrlsub {\isadigit{3}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1289
 with \isa{p{\isacharprime}{\kern0pt}\ {\isasymprec}\isactrlbsub lex\isactrlesub \ p} that \isa{{\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub } holds.  Suppose \isa{p{\isacharprime}{\kern0pt}\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}}, then we can infer from the first assumption that \isa{{\isasymparallel}v\isactrlsub {\isadigit{1}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub }.  But this means
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1290
 that \isa{p{\isacharprime}{\kern0pt}} must be in \isa{Pos\ v\isactrlsub {\isadigit{2}}} too (the norm
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1291
 cannot be \isa{{\isacharminus}{\kern0pt}{\isadigit{1}}} given \isa{p{\isacharprime}{\kern0pt}\ {\isasymin}\ Pos\ v\isactrlsub {\isadigit{1}}}).  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1292
 Hence we can use the second assumption and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1293
 infer \isa{{\isasymparallel}v\isactrlsub {\isadigit{2}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub \ {\isacharequal}{\kern0pt}\ {\isasymparallel}v\isactrlsub {\isadigit{3}}{\isasymparallel}\isactrlbsub p{\isacharprime}{\kern0pt}\isactrlesub },
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1294
 which concludes this case with \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{3}}}.  The reasoning in the other cases is similar.\qed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1295
 \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1296
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1297
 \noindent 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1298
 The proof for $\preccurlyeq$ is similar and omitted.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1299
 It is also straightforward to show that \isa{{\isasymprec}} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1300
 $\preccurlyeq$ are partial orders.  Okui and Suzuki furthermore show that they
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1301
 are linear orderings for lexical values \cite{OkuiSuzuki2010} of a given
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1302
 regular expression and given string, but we have not formalised this in Isabelle. It is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1303
 not essential for our results. What we are going to show below is
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1304
 that for a given \isa{r} and \isa{s}, the orderings have a unique
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1305
 minimal element on the set \isa{LV\ r\ s}, which is the POSIX value
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1306
 we defined in the previous section. We start with two properties that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1307
 show how the length of a flattened value relates to the \isa{{\isasymprec}}-ordering.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1308
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1309
 \begin{proposition}\mbox{}\smallskip\\\label{ordlen}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1310
 \begin{tabular}{@ {}ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1311
 (1) &
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1312
 \isa{{\normalsize{}If\,}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}\ {\normalsize \,then\,}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isasymle}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}{\isachardot}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1313
 (2) &
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1314
 \isa{{\normalsize{}If\,}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharless}{\kern0pt}\ len\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\normalsize \,then\,}\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1315
 \end{tabular} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1316
 \end{proposition}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1317
 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1318
 \noindent Both properties follow from the definition of the ordering. Note that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1319
 \textit{(2)} entails that a value, say \isa{v\isactrlsub {\isadigit{2}}}, whose underlying 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1320
 string is a strict prefix of another flattened value, say \isa{v\isactrlsub {\isadigit{1}}}, then
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1321
 \isa{v\isactrlsub {\isadigit{1}}} must be smaller than \isa{v\isactrlsub {\isadigit{2}}}. For our proofs it
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1322
 will be useful to have the following properties---in each case the underlying strings 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1323
 of the compared values are the same: 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1324
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1325
  \begin{proposition}\mbox{}\smallskip\\\label{ordintros}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1326
  \begin{tabular}{ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1327
  \textit{(1)} & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1328
  \isa{{\normalsize{}If\,}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\normalsize \,then\,}\ Left\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Right\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1329
  \textit{(2)} & If
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1330
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1331
  \isa{Left\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Left\ v\isactrlsub {\isadigit{2}}} \;iff\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1332
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1333
  \textit{(3)} & If
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1334
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1335
  \isa{Right\ v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Right\ v\isactrlsub {\isadigit{2}}} \;iff\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1336
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1337
  \textit{(4)} & If
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1338
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1339
  \isa{Seq\ v\ v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ Seq\ v\ w\isactrlsub {\isadigit{2}}} \;iff\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1340
  \isa{v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ w\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1341
  \textit{(5)} & If
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1342
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;and\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1343
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ w\isactrlsub {\isadigit{1}}} \;then\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1344
  \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}\ {\isasymprec}\ Seq\ w\isactrlsub {\isadigit{1}}\ w\isactrlsub {\isadigit{2}}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1345
  \textit{(6)} & If
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1346
  \isa{{\isacharbar}{\kern0pt}vs\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}vs\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;then\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1347
  \isa{Stars\ {\isacharparenleft}{\kern0pt}vs\ {\isacharat}{\kern0pt}\ vs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymprec}\ Stars\ {\isacharparenleft}{\kern0pt}vs\ {\isacharat}{\kern0pt}\ vs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} \;iff\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1348
  \isa{Stars\ vs\isactrlsub {\isadigit{1}}\ {\isasymprec}\ Stars\ vs\isactrlsub {\isadigit{2}}}\\  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1349
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1350
  \textit{(7)} & If
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1351
  \isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \;and\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1352
  \isa{v\isactrlsub {\isadigit{1}}\ {\isasymprec}\ v\isactrlsub {\isadigit{2}}} \;then\;
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1353
   \isa{Stars\ {\isacharparenleft}{\kern0pt}v\isactrlsub {\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isasymprec}\ Stars\ {\isacharparenleft}{\kern0pt}v\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1354
  \end{tabular} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1355
  \end{proposition}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1356
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1357
  \noindent One might prefer that statements \textit{(4)} and \textit{(5)} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1358
  (respectively \textit{(6)} and \textit{(7)})
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1359
  are combined into a single \textit{iff}-statement (like the ones for \isa{Left} and \isa{Right}). Unfortunately this cannot be done easily: such
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1360
  a single statement would require an additional assumption about the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1361
  two values \isa{Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}} and \isa{Seq\ w\isactrlsub {\isadigit{1}}\ w\isactrlsub {\isadigit{2}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1362
  being inhabited by the same regular expression. The
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1363
  complexity of the proofs involved seems to not justify such a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1364
  `cleaner' single statement. The statements given are just the properties that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1365
  allow us to establish our theorems without any difficulty. The proofs 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1366
  for Proposition~\ref{ordintros} are routine.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1367
 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1368
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1369
  Next we establish how Okui and Suzuki's orderings relate to our
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1370
  definition of POSIX values.  Given a \isa{POSIX} value \isa{v\isactrlsub {\isadigit{1}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1371
  for \isa{r} and \isa{s}, then any other lexical value \isa{v\isactrlsub {\isadigit{2}}} in \isa{LV\ r\ s} is greater or equal than \isa{v\isactrlsub {\isadigit{1}}}, namely:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1372
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1373
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1374
  \begin{theorem}\label{orderone}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1375
  \isa{{\normalsize{}If\,}\ \mbox{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}}\ {\normalsize \,and\,}\ \mbox{v\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ r\ s}\ {\normalsize \,then\,}\ v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1376
  \end{theorem}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1377
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1378
  \begin{proof} By induction on our POSIX rules. By
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1379
  Theorem~\ref{posixdeterm} and the definition of \isa{LV}, it is clear
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1380
  that \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} have the same
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1381
  underlying string \isa{s}.  The three base cases are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1382
  straightforward: for example for \isa{v\isactrlsub {\isadigit{1}}\ {\isacharequal}{\kern0pt}\ Empty}, we have
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1383
  that \isa{v\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ \isactrlbold {\isadigit{1}}\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} must also be of the form
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1384
  \mbox{\isa{v\isactrlsub {\isadigit{2}}\ {\isacharequal}{\kern0pt}\ Empty}}. Therefore we have \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}.  The inductive cases for
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1385
  \isa{r} being of the form \isa{r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1386
  \isa{r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}} are as follows:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1387
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1388
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1389
  \begin{itemize} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1390
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1391
  \item[$\bullet$] Case \isa{P{\isacharplus}{\kern0pt}L} with \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Left\ w\isactrlsub {\isadigit{1}}}: In this case the value 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1392
  \isa{v\isactrlsub {\isadigit{2}}} is either of the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1393
  form \isa{Left\ w\isactrlsub {\isadigit{2}}} or \isa{Right\ w\isactrlsub {\isadigit{2}}}. In the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1394
  latter case we can immediately conclude with \mbox{\isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}} since a \isa{Left}-value with the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1395
  same underlying string \isa{s} is always smaller than a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1396
  \isa{Right}-value by Proposition~\ref{ordintros}\textit{(1)}.  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1397
  In the former case we have \isa{w\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ r\isactrlsub {\isadigit{1}}\ s} and can use the induction hypothesis to infer
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1398
  \isa{w\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ w\isactrlsub {\isadigit{2}}}. Because \isa{w\isactrlsub {\isadigit{1}}} and \isa{w\isactrlsub {\isadigit{2}}} have the same underlying string
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1399
  \isa{s}, we can conclude with \isa{Left\ w\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ Left\ w\isactrlsub {\isadigit{2}}} using
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1400
  Proposition~\ref{ordintros}\textit{(2)}.\smallskip
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1401
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1402
  \item[$\bullet$] Case \isa{P{\isacharplus}{\kern0pt}R} with \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Right\ w\isactrlsub {\isadigit{1}}}: This case similar to the previous
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1403
  case, except that we additionally know \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}. This is needed when \isa{v\isactrlsub {\isadigit{2}}} is of the form
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1404
  \mbox{\isa{Left\ w\isactrlsub {\isadigit{2}}}}. Since \mbox{\isa{{\isacharbar}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}w\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}} \isa{{\isacharequal}{\kern0pt}\ s}} and \isa{w\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}}, we can derive a contradiction for \mbox{\isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}} using
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1405
  Proposition~\ref{inhabs}. So also in this case \mbox{\isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}}.\smallskip
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1406
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1407
  \item[$\bullet$] Case \isa{PS} with \isa{{\isacharparenleft}{\kern0pt}s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Seq\ w\isactrlsub {\isadigit{1}}\ w\isactrlsub {\isadigit{2}}}: We can assume \isa{v\isactrlsub {\isadigit{2}}\ {\isacharequal}{\kern0pt}\ Seq\ u\isactrlsub {\isadigit{1}}\ u\isactrlsub {\isadigit{2}}} with \isa{u\isactrlsub {\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{1}}} and \mbox{\isa{u\isactrlsub {\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}}. We have \isa{s\isactrlsub {\isadigit{1}}\ {\isacharat}{\kern0pt}\ s\isactrlsub {\isadigit{2}}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}\ {\isacharat}{\kern0pt}\ {\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{2}}{\isacharbar}{\kern0pt}}.  By the side-condition of the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1408
  \isa{PS}-rule we know that either \isa{s\isactrlsub {\isadigit{1}}\ {\isacharequal}{\kern0pt}\ {\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}} or that \isa{{\isacharbar}{\kern0pt}u\isactrlsub {\isadigit{1}}{\isacharbar}{\kern0pt}} is a strict prefix of
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1409
  \isa{s\isactrlsub {\isadigit{1}}}. In the latter case we can infer \isa{w\isactrlsub {\isadigit{1}}\ {\isasymprec}\ u\isactrlsub {\isadigit{1}}} by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1410
  Proposition~\ref{ordlen}\textit{(2)} and from this \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}} by Proposition~\ref{ordintros}\textit{(5)}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1411
  (as noted above \isa{v\isactrlsub {\isadigit{1}}} and \isa{v\isactrlsub {\isadigit{2}}} must have the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1412
  same underlying string).
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1413
  In the former case we know
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1414
  \isa{u\isactrlsub {\isadigit{1}}\ {\isasymin}\ LV\ r\isactrlsub {\isadigit{1}}\ s\isactrlsub {\isadigit{1}}} and \isa{u\isactrlsub {\isadigit{2}}\ {\isasymin}\ LV\ r\isactrlsub {\isadigit{2}}\ s\isactrlsub {\isadigit{2}}}. With this we can use the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1415
  induction hypotheses to infer \isa{w\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ u\isactrlsub {\isadigit{1}}} and \isa{w\isactrlsub {\isadigit{2}}\ \mbox{$\preccurlyeq$}\ u\isactrlsub {\isadigit{2}}}. By
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1416
  Proposition~\ref{ordintros}\textit{(4,5)} we can again infer 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1417
  \isa{v\isactrlsub {\isadigit{1}}\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{2}}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1418
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1419
  \end{itemize}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1420
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1421
  \noindent The case for \isa{P{\isasymstar}} is similar to the \isa{PS}-case and omitted.\qed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1422
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1423
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1424
  \noindent This theorem shows that our \isa{POSIX} value for a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1425
  regular expression \isa{r} and string \isa{s} is in fact a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1426
  minimal element of the values in \isa{LV\ r\ s}. By
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1427
  Proposition~\ref{ordlen}\textit{(2)} we also know that any value in
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1428
  \isa{LV\ r\ s{\isacharprime}{\kern0pt}}, with \isa{s{\isacharprime}{\kern0pt}} being a strict prefix, cannot be
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1429
  smaller than \isa{v\isactrlsub {\isadigit{1}}}. The next theorem shows the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1430
  opposite---namely any minimal element in \isa{LV\ r\ s} must be a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1431
  \isa{POSIX} value. This can be established by induction on \isa{r}, but the proof can be drastically simplified by using the fact
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1432
  from the previous section about the existence of a \isa{POSIX} value
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1433
  whenever a string \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1434
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1435
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1436
  \begin{theorem}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1437
  \isa{{\normalsize{}If\,}\ \mbox{v\isactrlsub {\isadigit{1}}\ {\isasymin}\ LV\ r\ s}\ {\normalsize \,and\,}\ \mbox{{\isasymforall}v\isactrlsub {\isadigit{2}}{\isasymin}LV\ r\ s{\isachardot}{\kern0pt}\ v\isactrlsub {\isadigit{2}}\ \mbox{$\not\prec$}\ v\isactrlsub {\isadigit{1}}}\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub {\isadigit{1}}{\isachardot}{\kern0pt}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1438
  \end{theorem}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1439
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1440
  \begin{proof} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1441
  If \isa{v\isactrlsub {\isadigit{1}}\ {\isasymin}\ LV\ r\ s} then 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1442
  \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}} by Proposition~\ref{inhabs}. Hence by Theorem~\ref{lexercorrect}(2) 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1443
  there exists a
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1444
  \isa{POSIX} value \isa{v\isactrlsub P} with \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\isactrlsub P}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1445
  and by Lemma~\ref{LVposix} we also have \mbox{\isa{v\isactrlsub P\ {\isasymin}\ LV\ r\ s}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1446
  By Theorem~\ref{orderone} we therefore have 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1447
  \isa{v\isactrlsub P\ \mbox{$\preccurlyeq$}\ v\isactrlsub {\isadigit{1}}}. If \isa{v\isactrlsub P\ {\isacharequal}{\kern0pt}\ v\isactrlsub {\isadigit{1}}} then
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1448
  we are done. Otherwise we have \isa{v\isactrlsub P\ {\isasymprec}\ v\isactrlsub {\isadigit{1}}}, which 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1449
  however contradicts the second assumption about \isa{v\isactrlsub {\isadigit{1}}} being the smallest
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1450
  element in \isa{LV\ r\ s}. So we are done in this case too.\qed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1451
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1452
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1453
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1454
  From this we can also show 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1455
  that if \isa{LV\ r\ s} is non-empty (or equivalently \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}) then 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1456
  it has a unique minimal element:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1457
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1458
  \begin{corollary}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1459
  \isa{{\normalsize{}If\,}\ LV\ r\ s\ {\isasymnoteq}\ {\isasymemptyset}\ {\normalsize \,then\,}\ {\isasymexists}{\isacharbang}{\kern0pt}vmin{\isachardot}{\kern0pt}\ vmin\ {\isasymin}\ LV\ r\ s\ {\isasymand}\ {\isacharparenleft}{\kern0pt}{\isasymforall}v{\isasymin}LV\ r\ s{\isachardot}{\kern0pt}\ vmin\ \mbox{$\preccurlyeq$}\ v{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1460
  \end{corollary}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1461
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1462
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1463
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1464
  \noindent To sum up, we have shown that the (unique) minimal elements 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1465
  of the ordering by Okui and Suzuki are exactly the \isa{POSIX}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1466
  values we defined inductively in Section~\ref{posixsec}. This provides
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1467
  an independent confirmation that our ternary relation formalises the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1468
  informal POSIX rules.%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1469
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1470
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1471
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1472
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1473
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1474
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1475
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1476
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1477
\isamarkupsection{Bitcoded Lexing%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1478
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1479
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1480
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1481
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1482
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1483
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1484
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1485
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1486
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1487
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1488
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1489
Incremental calculation of the value. To simplify the proof we first define the function
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1490
\isa{flex} which calculates the ``iterated'' injection function. With this we can 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1491
rewrite the lexer as
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1492
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1493
\begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1494
\isa{lexer\ r\ s\ {\isacharequal}{\kern0pt}\ {\isacharparenleft}{\kern0pt}\textrm{if}\ nullable\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}s{\isacharparenright}{\kern0pt}\ \textrm{then}\ Some\ {\isacharparenleft}{\kern0pt}flex\ r\ id\ s\ {\isacharparenleft}{\kern0pt}mkeps\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}s{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ \textrm{else}\ None{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1495
\end{center}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1496
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1497
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1498
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1499
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1500
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1501
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1502
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1503
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1504
\isamarkupsection{Optimisations%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1505
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1506
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1507
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1508
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1509
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1510
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1511
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1512
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1513
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1514
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1515
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1516
Derivatives as calculated by \Brz's method are usually more complex
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1517
  regular expressions than the initial one; the result is that the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1518
  derivative-based matching and lexing algorithms are often abysmally slow.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1519
  However, various optimisations are possible, such as the simplifications
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1520
  of \isa{\isactrlbold {\isadigit{0}}\ {\isacharplus}{\kern0pt}\ r}, \isa{r\ {\isacharplus}{\kern0pt}\ \isactrlbold {\isadigit{0}}}, \isa{\isactrlbold {\isadigit{1}}\ {\isasymcdot}\ r} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1521
  \isa{r\ {\isasymcdot}\ \isactrlbold {\isadigit{1}}} to \isa{r}. These simplifications can speed up the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1522
  algorithms considerably, as noted in \cite{Sulzmann2014}. One of the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1523
  advantages of having a simple specification and correctness proof is that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1524
  the latter can be refined to prove the correctness of such simplification
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1525
  steps. While the simplification of regular expressions according to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1526
  rules like
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1527
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1528
  \begin{equation}\label{Simpl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1529
  \begin{array}{lcllcllcllcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1530
  \isa{\isactrlbold {\isadigit{0}}\ {\isacharplus}{\kern0pt}\ r} & \isa{{\isasymRightarrow}} & \isa{r} \hspace{8mm}%\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1531
  \isa{r\ {\isacharplus}{\kern0pt}\ \isactrlbold {\isadigit{0}}} & \isa{{\isasymRightarrow}} & \isa{r} \hspace{8mm}%\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1532
  \isa{\isactrlbold {\isadigit{1}}\ {\isasymcdot}\ r}  & \isa{{\isasymRightarrow}} & \isa{r} \hspace{8mm}%\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1533
  \isa{r\ {\isasymcdot}\ \isactrlbold {\isadigit{1}}}  & \isa{{\isasymRightarrow}} & \isa{r}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1534
  \end{array}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1535
  \end{equation}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1536
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1537
  \noindent is well understood, there is an obstacle with the POSIX value
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1538
  calculation algorithm by Sulzmann and Lu: if we build a derivative regular
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1539
  expression and then simplify it, we will calculate a POSIX value for this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1540
  simplified derivative regular expression, \emph{not} for the original (unsimplified)
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1541
  derivative regular expression. Sulzmann and Lu \cite{Sulzmann2014} overcome this obstacle by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1542
  not just calculating a simplified regular expression, but also calculating
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1543
  a \emph{rectification function} that ``repairs'' the incorrect value.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1544
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1545
  The rectification functions can be (slightly clumsily) implemented  in
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1546
  Isabelle/HOL as follows using some auxiliary functions:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1547
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1548
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1549
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1550
  \isa{F\isactrlbsub Right\isactrlesub \ f\ v} & $\dn$ & \isa{Right\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1551
  \isa{F\isactrlbsub Left\isactrlesub \ f\ v} & $\dn$ & \isa{Left\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1552
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1553
  \isa{F\isactrlbsub Alt\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}Right\ v{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Right\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1554
  \isa{F\isactrlbsub Alt\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}Left\ v{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Left\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1555
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1556
  \isa{F\isactrlbsub Seq{\isadigit{1}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ v} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1557
  \isa{F\isactrlbsub Seq{\isadigit{2}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ v} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1558
  \isa{F\isactrlbsub Seq\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}Seq\ v\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\medskip\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1559
  %\end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1560
  %
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1561
  %\begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1562
  \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharcomma}{\kern0pt}\ \underline{\hspace{2mm}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Right\isactrlesub \ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1563
  \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{0}}{\isacharcomma}{\kern0pt}\ \underline{\hspace{2mm}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Left\isactrlesub \ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1564
  \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Alt\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1565
  \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Seq{\isadigit{1}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1566
  \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}\isactrlbold {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Seq{\isadigit{2}}\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1567
  \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F\isactrlbsub Seq\isactrlesub \ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1568
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1569
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1570
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1571
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1572
  The functions \isa{simp\isactrlbsub Alt\isactrlesub } and \isa{simp\isactrlbsub Seq\isactrlesub } encode the simplification rules
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1573
  in \eqref{Simpl} and compose the rectification functions (simplifications can occur
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1574
  deep inside the regular expression). The main simplification function is then 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1575
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1576
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1577
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1578
  \isa{simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{simp\isactrlbsub Alt\isactrlesub \ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1579
  \isa{simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} & $\dn$ & \isa{simp\isactrlbsub Seq\isactrlesub \ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1580
  \isa{simp\ r} & $\dn$ & \isa{{\isacharparenleft}{\kern0pt}r{\isacharcomma}{\kern0pt}\ id{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1581
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1582
  \end{center} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1583
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1584
  \noindent where \isa{id} stands for the identity function. The
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1585
  function \isa{simp} returns a simplified regular expression and a corresponding
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1586
  rectification function. Note that we do not simplify under stars: this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1587
  seems to slow down the algorithm, rather than speed it up. The optimised
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1588
  lexer is then given by the clauses:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1589
  
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1590
  \begin{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1591
  \begin{tabular}{lcl}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1592
  \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} & $\dn$ & \isa{\textrm{if}\ nullable\ r\ \textrm{then}\ Some\ {\isacharparenleft}{\kern0pt}mkeps\ r{\isacharparenright}{\kern0pt}\ \textrm{else}\ None}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1593
  \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ {\isacharparenleft}{\kern0pt}c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s{\isacharparenright}{\kern0pt}} & $\dn$ & 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1594
                         \isa{let\ {\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharcomma}{\kern0pt}\ f\isactrlsub r{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ simp\ {\isacharparenleft}{\kern0pt}r}$\backslash$\isa{c{\isacharparenright}{\kern0pt}\ in}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1595
                     & & \isa{case} \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\isactrlsub s\ s} \isa{of}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1596
                     & & \phantom{$|$} \isa{None}  \isa{{\isasymRightarrow}} \isa{None}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1597
                     & & $|$ \isa{Some\ v} \isa{{\isasymRightarrow}} \isa{Some\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ {\isacharparenleft}{\kern0pt}f\isactrlsub r\ v{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}                          
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1598
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1599
  \end{center}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1600
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1601
  \noindent
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1602
  In the second clause we first calculate the derivative \isa{r{\isacharbackslash}{\kern0pt}c}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1603
  and then simpli
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1604
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1605
text \isa{\ \ Incremental\ calculation\ of\ the\ value{\isachardot}{\kern0pt}\ To\ simplify\ the\ proof\ we\ first\ define\ the\ function\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ flex{\isacharbraceright}{\kern0pt}\ which\ calculates\ the\ {\isacharbackquote}{\kern0pt}{\isacharbackquote}{\kern0pt}iterated{\isacharprime}{\kern0pt}{\isacharprime}{\kern0pt}\ injection\ function{\isachardot}{\kern0pt}\ With\ this\ we\ can\ rewrite\ the\ lexer\ as\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ lexer{\isacharunderscore}{\kern0pt}flex{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}v\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{7}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ code{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{7}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ areg{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}{\isacharequal}{\kern0pt}{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}AZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}AONE\ bs{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ACHAR\ bs\ c{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}AALT\ bs\ r{\isadigit{1}}\ r{\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ASEQ\ bs\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}mid{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ASTAR\ bs\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ intern{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ erase{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ Some\ simple\ facts\ about\ erase\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ erase{\isacharunderscore}{\kern0pt}bder{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ erase{\isacharunderscore}{\kern0pt}intern{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bnullable{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}medskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ \ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharpercent}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{5}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bder{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{6}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{3}}{\isacharparenright}{\kern0pt}{\isacharbrackleft}{\kern0pt}of\ bs\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}\ {\isachardoublequote}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ bmkeps{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{4}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}medskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharbrackleft}{\kern0pt}mode{\isacharequal}{\kern0pt}IfThen{\isacharbrackright}{\kern0pt}\ bder{\isacharunderscore}{\kern0pt}retrieve{\isacharbraceright}{\kern0pt}\ \ By\ induction\ on\ {\isasymopen}r{\isasymclose}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}{\isacharbrackleft}{\kern0pt}Main\ Lemma{\isacharbrackright}{\kern0pt}{\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharbrackleft}{\kern0pt}mode{\isacharequal}{\kern0pt}IfThen{\isacharbrackright}{\kern0pt}\ MAIN{\isacharunderscore}{\kern0pt}decode{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ Definition\ of\ the\ bitcoded\ lexer\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ blexer{\isacharunderscore}{\kern0pt}def{\isacharbraceright}{\kern0pt}\ \ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ blexer{\isacharunderscore}{\kern0pt}correctness{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ \ }
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1606
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1607
section \isa{Optimisations}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1608
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1609
text \isa{\ \ Derivatives\ as\ calculated\ by\ {\isacharbackslash}{\kern0pt}Brz{\isacharprime}{\kern0pt}s\ method\ are\ usually\ more\ complex\ regular\ expressions\ than\ the\ initial\ one{\isacharsemicolon}{\kern0pt}\ the\ result\ is\ that\ the\ derivative{\isacharminus}{\kern0pt}based\ matching\ and\ lexing\ algorithms\ are\ often\ abysmally\ slow{\isachardot}{\kern0pt}\ However{\isacharcomma}{\kern0pt}\ various\ optimisations\ are\ possible{\isacharcomma}{\kern0pt}\ such\ as\ the\ simplifications\ of\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ ZERO\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ r\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ ONE\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ r\ ONE{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ to\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ These\ simplifications\ can\ speed\ up\ the\ algorithms\ considerably{\isacharcomma}{\kern0pt}\ as\ noted\ in\ {\isacharbackslash}{\kern0pt}cite{\isacharbraceleft}{\kern0pt}Sulzmann{\isadigit{2}}{\isadigit{0}}{\isadigit{1}}{\isadigit{4}}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ One\ of\ the\ advantages\ of\ having\ a\ simple\ specification\ and\ correctness\ proof\ is\ that\ the\ latter\ can\ be\ refined\ to\ prove\ the\ correctness\ of\ such\ simplification\ steps{\isachardot}{\kern0pt}\ While\ the\ simplification\ of\ regular\ expressions\ according\ to\ rules\ like\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}equation{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}label{\isacharbraceleft}{\kern0pt}Simpl{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}array{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcllcllcllcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ ZERO\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}hspace{\isacharbraceleft}{\kern0pt}{\isadigit{8}}mm{\isacharbraceright}{\kern0pt}{\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}ALT\ r\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}hspace{\isacharbraceleft}{\kern0pt}{\isadigit{8}}mm{\isacharbraceright}{\kern0pt}{\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ ONE\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}hspace{\isacharbraceleft}{\kern0pt}{\isadigit{8}}mm{\isacharbraceright}{\kern0pt}{\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}SEQ\ r\ ONE{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \ {\isacharampersand}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}array{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}equation{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ is\ well\ understood{\isacharcomma}{\kern0pt}\ there\ is\ an\ obstacle\ with\ the\ POSIX\ value\ calculation\ algorithm\ by\ Sulzmann\ and\ Lu{\isacharcolon}{\kern0pt}\ if\ we\ build\ a\ derivative\ regular\ expression\ and\ then\ simplify\ it{\isacharcomma}{\kern0pt}\ we\ will\ calculate\ a\ POSIX\ value\ for\ this\ simplified\ derivative\ regular\ expression{\isacharcomma}{\kern0pt}\ {\isacharbackslash}{\kern0pt}emph{\isacharbraceleft}{\kern0pt}not{\isacharbraceright}{\kern0pt}\ for\ the\ original\ {\isacharparenleft}{\kern0pt}unsimplified{\isacharparenright}{\kern0pt}\ derivative\ regular\ expression{\isachardot}{\kern0pt}\ Sulzmann\ and\ Lu\ {\isacharbackslash}{\kern0pt}cite{\isacharbraceleft}{\kern0pt}Sulzmann{\isadigit{2}}{\isadigit{0}}{\isadigit{1}}{\isadigit{4}}{\isacharbraceright}{\kern0pt}\ overcome\ this\ obstacle\ by\ not\ just\ calculating\ a\ simplified\ regular\ expression{\isacharcomma}{\kern0pt}\ but\ also\ calculating\ a\ {\isacharbackslash}{\kern0pt}emph{\isacharbraceleft}{\kern0pt}rectification\ function{\isacharbraceright}{\kern0pt}\ that\ {\isacharbackquote}{\kern0pt}{\isacharbackquote}{\kern0pt}repairs{\isacharprime}{\kern0pt}{\isacharprime}{\kern0pt}\ the\ incorrect\ value{\isachardot}{\kern0pt}\ \ The\ rectification\ functions\ can\ be\ {\isacharparenleft}{\kern0pt}slightly\ clumsily{\isacharparenright}{\kern0pt}\ implemented\ \ in\ Isabelle{\isacharslash}{\kern0pt}HOL\ as\ follows\ using\ some\ auxiliary\ functions{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}RIGHT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Right\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}LEFT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Left\ {\isacharparenleft}{\kern0pt}f\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}ALT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Right\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}ALT{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Left\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ \ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{1}}{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{2}}{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ {\isacharparenleft}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}Seq\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{1}}\ v\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}f\isactrlsub {\isadigit{2}}\ v\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isasymclose}{\isacharbackslash}{\kern0pt}medskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharpercent}{\kern0pt}\ {\isacharpercent}{\kern0pt}{\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}ZERO{\isacharcomma}{\kern0pt}\ DUMMY{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}RIGHT\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}ZERO{\isacharcomma}{\kern0pt}\ DUMMY{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}LEFT\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}ALT\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}ONE{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{1}}\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}ONE{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ{\isadigit{2}}\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}SEQ\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharcomma}{\kern0pt}\ F{\isacharunderscore}{\kern0pt}SEQ\ f\isactrlsub {\isadigit{1}}\ f\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ The\ functions\ {\isasymopen}simp\isactrlbsub Alt\isactrlesub {\isasymclose}\ and\ {\isasymopen}simp\isactrlbsub Seq\isactrlesub {\isasymclose}\ encode\ the\ simplification\ rules\ in\ {\isacharbackslash}{\kern0pt}eqref{\isacharbraceleft}{\kern0pt}Simpl{\isacharbraceright}{\kern0pt}\ and\ compose\ the\ rectification\ functions\ {\isacharparenleft}{\kern0pt}simplifications\ can\ occur\ deep\ inside\ the\ regular\ expression{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ The\ main\ simplification\ function\ is\ then\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}ALT\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}SEQ\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp{\isacharunderscore}{\kern0pt}SEQ\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}simp\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharparenleft}{\kern0pt}r{\isacharcomma}{\kern0pt}\ id{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ where\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}id{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ stands\ for\ the\ identity\ function{\isachardot}{\kern0pt}\ The\ function\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ simp{\isacharbraceright}{\kern0pt}\ returns\ a\ simplified\ regular\ expression\ and\ a\ corresponding\ rectification\ function{\isachardot}{\kern0pt}\ Note\ that\ we\ do\ not\ simplify\ under\ stars{\isacharcolon}{\kern0pt}\ this\ seems\ to\ slow\ down\ the\ algorithm{\isacharcomma}{\kern0pt}\ rather\ than\ speed\ it\ up{\isachardot}{\kern0pt}\ The\ optimised\ lexer\ is\ then\ given\ by\ the\ clauses{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}lcl{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ slexer{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}rhs{\isacharparenright}{\kern0pt}\ slexer{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ {\isacharparenleft}{\kern0pt}lhs{\isacharparenright}{\kern0pt}\ slexer{\isachardot}{\kern0pt}simps{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}dn{\isachardollar}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}let\ {\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharcomma}{\kern0pt}\ f\isactrlsub r{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ simp\ {\isacharparenleft}{\kern0pt}r\ {\isasymclose}{\isachardollar}{\kern0pt}{\isacharbackslash}{\kern0pt}backslash{\isachardollar}{\kern0pt}{\isasymopen}\ c{\isacharparenright}{\kern0pt}\ in{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isasymopen}case{\isasymclose}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer\ r\isactrlsub s\ s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymopen}of{\isasymclose}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharbackslash}{\kern0pt}phantom{\isacharbraceleft}{\kern0pt}{\isachardollar}{\kern0pt}{\isacharbar}{\kern0pt}{\isachardollar}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ \ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ None{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isachardollar}{\kern0pt}{\isacharbar}{\kern0pt}{\isachardollar}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}Some\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ {\isasymopen}{\isasymRightarrow}{\isasymclose}\ {\isasymopen}Some\ {\isacharparenleft}{\kern0pt}inj\ r\ c\ {\isacharparenleft}{\kern0pt}f\isactrlsub r\ v{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isasymclose}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}center{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ In\ the\ second\ clause\ we\ first\ calculate\ the\ derivative\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}der\ c\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ then\ simplify\ the\ result{\isachardot}{\kern0pt}\ This\ gives\ us\ a\ simplified\ derivative\ {\isasymopen}r\isactrlsub s{\isasymclose}\ and\ a\ rectification\ function\ {\isasymopen}f\isactrlsub r{\isasymclose}{\isachardot}{\kern0pt}\ The\ lexer\ is\ then\ recursively\ called\ with\ the\ simplified\ derivative{\isacharcomma}{\kern0pt}\ but\ before\ we\ inject\ the\ character\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ c{\isacharbraceright}{\kern0pt}\ into\ the\ value\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ v{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ we\ need\ to\ rectify\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ v{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}that\ is\ construct\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}f\isactrlsub r\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ Before\ we\ can\ establish\ the\ correctness\ of\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ we\ need\ to\ show\ that\ simplification\ preserves\ the\ language\ and\ simplification\ preserves\ our\ POSIX\ relation\ once\ the\ value\ is\ rectified\ {\isacharparenleft}{\kern0pt}recall\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ {\isachardoublequote}{\kern0pt}simp{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ generates\ a\ {\isacharparenleft}{\kern0pt}regular\ expression{\isacharcomma}{\kern0pt}\ rectification\ function{\isacharparenright}{\kern0pt}\ pair{\isacharparenright}{\kern0pt}{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}smallskip{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}label{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}{\isacharbraceleft}{\kern0pt}ll{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ L{\isacharunderscore}{\kern0pt}fst{\isacharunderscore}{\kern0pt}simp{\isacharbrackleft}{\kern0pt}symmetric{\isacharbrackright}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharbackslash}{\kern0pt}{\isacharbackslash}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isacharampersand}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm{\isacharbrackleft}{\kern0pt}mode{\isacharequal}{\kern0pt}IfThen{\isacharbrackright}{\kern0pt}\ Posix{\isacharunderscore}{\kern0pt}simp{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}tabular{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}lemma{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ Both\ are\ by\ induction\ on\ {\isasymopen}r{\isasymclose}{\isachardot}{\kern0pt}\ There\ is\ no\ interesting\ case\ for\ the\ first\ statement{\isachardot}{\kern0pt}\ For\ the\ second\ statement{\isacharcomma}{\kern0pt}\ of\ interest\ are\ the\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\ {\isacharequal}{\kern0pt}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\ {\isacharequal}{\kern0pt}\ SEQ\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ cases{\isachardot}{\kern0pt}\ In\ each\ case\ we\ have\ to\ analyse\ four\ subcases\ whether\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ equals\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ ZERO{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}respectively\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ ONE{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ For\ example\ for\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\ {\isacharequal}{\kern0pt}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ consider\ the\ subcase\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymnoteq}\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ By\ assumption\ we\ know\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ From\ this\ we\ can\ infer\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ by\ IH\ also\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ r\isactrlsub {\isadigit{2}}\ {\isasymrightarrow}\ {\isacharparenleft}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ Given\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ ZERO{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ we\ know\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}L\ {\isacharparenleft}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isacharbraceleft}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ By\ the\ first\ statement\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}L\ r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ is\ the\ empty\ set{\isacharcomma}{\kern0pt}\ meaning\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymnotin}\ L\ r\isactrlsub {\isadigit{1}}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ Taking\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ and\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ together\ gives\ by\ the\ {\isacharbackslash}{\kern0pt}mbox{\isacharbraceleft}{\kern0pt}{\isasymopen}P{\isacharplus}{\kern0pt}R{\isasymclose}{\isacharbraceright}{\kern0pt}{\isacharminus}{\kern0pt}rule\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}\ {\isasymrightarrow}\ Right\ {\isacharparenleft}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ In\ turn\ this\ gives\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}ALT\ r\isactrlsub {\isadigit{1}}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ as\ we\ need\ to\ show{\isachardot}{\kern0pt}\ The\ other\ cases\ are\ similar{\isachardot}{\kern0pt}{\isacharbackslash}{\kern0pt}qed\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}noindent\ We\ can\ now\ prove\ relatively\ straightforwardly\ that\ the\ optimised\ lexer\ produces\ the\ expected\ result{\isacharcolon}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}thm\ slexer{\isacharunderscore}{\kern0pt}correctness{\isacharbraceright}{\kern0pt}\ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}theorem{\isacharbraceright}{\kern0pt}\ \ {\isacharbackslash}{\kern0pt}begin{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ By\ induction\ on\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ s{\isacharbraceright}{\kern0pt}\ generalising\ over\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ The\ case\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ is\ trivial{\isachardot}{\kern0pt}\ For\ the\ cons{\isacharminus}{\kern0pt}case\ suppose\ the\ string\ is\ of\ the\ form\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}c\ {\isacharhash}{\kern0pt}\ s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ By\ induction\ hypothesis\ we\ know\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ holds\ for\ all\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ r{\isacharbraceright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}in\ particular\ for\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ being\ the\ derivative\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}der\ c\ r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ Let\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}r\isactrlsub s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ be\ the\ simplified\ derivative\ regular\ expression{\isacharcomma}{\kern0pt}\ that\ is\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharcomma}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}f\isactrlsub r{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ be\ the\ rectification\ function{\isacharcomma}{\kern0pt}\ that\ is\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ \ We\ distinguish\ the\ cases\ whether\ {\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ L\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ or\ not{\isachardot}{\kern0pt}\ In\ the\ first\ case\ we\ have\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ a\ value\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ so\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ Some\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ der\ c\ r\ {\isasymrightarrow}\ v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ hold{\isachardot}{\kern0pt}\ By\ Lemma{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ we\ can\ also\ infer\ from{\isachartilde}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isacharasterisk}{\kern0pt}{\isacharparenright}{\kern0pt}\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ L\ r\isactrlsub s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ holds{\isachardot}{\kern0pt}\ \ Hence\ we\ know\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ that\ there\ exists\ a\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ with\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ Some\ v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ r\isactrlsub s\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ From\ the\ latter\ we\ know\ by\ Lemma{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{2}}{\isacharparenright}{\kern0pt}\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymin}\ der\ c\ r\ {\isasymrightarrow}\ {\isacharparenleft}{\kern0pt}f\isactrlsub r\ v{\isacharprime}{\kern0pt}{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ holds{\isachardot}{\kern0pt}\ By\ the\ uniqueness\ of\ the\ POSIX\ relation\ {\isacharparenleft}{\kern0pt}Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}posixdeterm{\isacharbraceright}{\kern0pt}{\isacharparenright}{\kern0pt}\ we\ can\ infer\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ v{\isacharbraceright}{\kern0pt}\ is\ equal\ to\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}f\isactrlsub r\ v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isacharminus}{\kern0pt}{\isacharminus}{\kern0pt}{\isacharminus}{\kern0pt}that\ is\ the\ rectification\ function\ applied\ to\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isacharprime}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ produces\ the\ original\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}v{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ \ Now\ the\ case\ follows\ by\ the\ definitions\ of\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ lexer{\isacharbraceright}{\kern0pt}\ and\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}const\ slexer{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ \ In\ the\ second\ case\ where\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymnotin}\ L\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ we\ have\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ {\isacharparenleft}{\kern0pt}der\ c\ r{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}\ \ We\ also\ know\ by\ Lemma{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}slexeraux{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ that\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}s\ {\isasymnotin}\ L\ r\isactrlsub s{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ Hence\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}\ by\ Theorem{\isachartilde}{\kern0pt}{\isacharbackslash}{\kern0pt}ref{\isacharbraceleft}{\kern0pt}lexercorrect{\isacharbraceright}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isadigit{1}}{\isacharparenright}{\kern0pt}\ and\ by\ IH\ then\ also\ {\isacharat}{\kern0pt}{\isacharbraceleft}{\kern0pt}term\ {\isachardoublequote}{\kern0pt}slexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None{\isachardoublequote}{\kern0pt}{\isacharbraceright}{\kern0pt}{\isachardot}{\kern0pt}\ With\ this\ we\ can\ conclude\ in\ this\ case\ too{\isachardot}{\kern0pt}{\isacharbackslash}{\kern0pt}qed\ \ {\isacharbackslash}{\kern0pt}end{\isacharbraceleft}{\kern0pt}proof{\isacharbraceright}{\kern0pt}\ \ }
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1610
fy the result. This gives us a simplified derivative
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1611
  \isa{r\isactrlsub s} and a rectification function \isa{f\isactrlsub r}. The lexer
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1612
  is then recursively called with the simplified derivative, but before
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1613
  we inject the character \isa{c} into the value \isa{v}, we need to rectify
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1614
  \isa{v} (that is construct \isa{f\isactrlsub r\ v}). Before we can establish the correctness
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1615
  of \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}}, we need to show that simplification preserves the language
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1616
  and simplification preserves our POSIX relation once the value is rectified
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1617
  (recall \isa{simp} generates a (regular expression, rectification function) pair):
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1618
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1619
  \begin{lemma}\mbox{}\smallskip\\\label{slexeraux}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1620
  \begin{tabular}{ll}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1621
  (1) & \isa{L{\isacharparenleft}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ L{\isacharparenleft}{\kern0pt}r{\isacharparenright}{\kern0pt}}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1622
  (2) & \isa{{\normalsize{}If\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ fst\ {\isacharparenleft}{\kern0pt}simp\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v\ {\normalsize \,then\,}\ {\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ r{\isacharparenright}{\kern0pt}\ v{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1623
  \end{tabular}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1624
  \end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1625
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1626
  \begin{proof} Both are by induction on \isa{r}. There is no
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1627
  interesting case for the first statement. For the second statement,
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1628
  of interest are the \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}} and \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isasymcdot}\ r\isactrlsub {\isadigit{2}}} cases. In each case we have to analyse four subcases whether
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1629
  \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} and \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}} equals \isa{\isactrlbold {\isadigit{0}}} (respectively \isa{\isactrlbold {\isadigit{1}}}). For example for \isa{r\ {\isacharequal}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}}, consider the subcase \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ \isactrlbold {\isadigit{0}}} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1630
  \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymnoteq}\ \isactrlbold {\isadigit{0}}}. By assumption we know \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}. From this we can infer \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1631
  and by IH also (*) \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v}. Given \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ \isactrlbold {\isadigit{0}}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1632
  we know \isa{L{\isacharparenleft}{\kern0pt}fst\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharequal}{\kern0pt}\ {\isasymemptyset}}. By the first statement
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1633
  \isa{L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}} is the empty set, meaning (**) \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}{\isacharparenright}{\kern0pt}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1634
  Taking (*) and (**) together gives by the \mbox{\isa{P{\isacharplus}{\kern0pt}R}}-rule 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1635
  \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ Right\ {\isacharparenleft}{\kern0pt}snd\ {\isacharparenleft}{\kern0pt}simp\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ v{\isacharparenright}{\kern0pt}}. In turn this
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1636
  gives \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\ {\isacharplus}{\kern0pt}\ r\isactrlsub {\isadigit{2}}{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v} as we need to show.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1637
  The other cases are similar.\qed
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1638
  \end{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1639
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1640
  \noindent We can now prove relatively straightforwardly that the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1641
  optimised lexer produces the expected result:
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1642
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1643
  \begin{theorem}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1644
  \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1645
  \end{theorem}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1646
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1647
  \begin{proof} By induction on \isa{s} generalising over \isa{r}. The case \isa{{\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}} is trivial. For the cons-case suppose the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1648
  string is of the form \isa{c\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}s}. By induction hypothesis we
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1649
  know \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\ s\ {\isacharequal}{\kern0pt}\ lexer\ r\ s} holds for all \isa{r} (in
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1650
  particular for \isa{r} being the derivative \isa{r{\isacharbackslash}{\kern0pt}c}). Let \isa{r\isactrlsub s} be the simplified derivative regular expression, that is \isa{fst\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}, and \isa{f\isactrlsub r} be the rectification
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1651
  function, that is \isa{snd\ {\isacharparenleft}{\kern0pt}simp\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}}.  We distinguish the cases
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1652
  whether (*) \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}} or not. In the first case we
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1653
  have by Theorem~\ref{lexercorrect}(2) a value \isa{v} so that \isa{lexer\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ Some\ v} and \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v} hold.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1654
  By Lemma~\ref{slexeraux}(1) we can also infer from~(*) that \isa{s\ {\isasymin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharparenright}{\kern0pt}} holds.  Hence we know by Theorem~\ref{lexercorrect}(2) that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1655
  there exists a \isa{v{\isacharprime}{\kern0pt}} with \isa{lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ Some\ v{\isacharprime}{\kern0pt}} and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1656
  \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r\isactrlsub s{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ v{\isacharprime}{\kern0pt}}. From the latter we know by
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1657
  Lemma~\ref{slexeraux}(2) that \isa{{\isacharparenleft}{\kern0pt}s{\isacharcomma}{\kern0pt}\ r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymrightarrow}\ f\isactrlsub r\ v{\isacharprime}{\kern0pt}} holds.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1658
  By the uniqueness of the POSIX relation (Theorem~\ref{posixdeterm}) we
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1659
  can infer that \isa{v} is equal to \isa{f\isactrlsub r\ v{\isacharprime}{\kern0pt}}---that is the 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1660
  rectification function applied to \isa{v{\isacharprime}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1661
  produces the original \isa{v}.  Now the case follows by the
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1662
  definitions of \isa{lexer} and \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1663
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1664
  In the second case where \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}} we have that
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1665
  \isa{lexer\ {\isacharparenleft}{\kern0pt}r{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ s\ {\isacharequal}{\kern0pt}\ None} by Theorem~\ref{lexercorrect}(1).  We
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1666
  also know by Lemma~\ref{slexeraux}(1) that \isa{s\ {\isasymnotin}\ L{\isacharparenleft}{\kern0pt}r\isactrlsub s{\isacharparenright}{\kern0pt}}. Hence
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1667
  \isa{lexer\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None} by Theorem~\ref{lexercorrect}(1) and
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1668
  by IH then also \isa{lexer\isactrlsup {\isacharplus}{\kern0pt}\ r\isactrlsub s\ s\ {\isacharequal}{\kern0pt}\ None}. With this we can
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1669
  conclude in this case too.\qed   
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1670
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1671
  \end{proof}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1672
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1673
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1674
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1675
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1676
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1677
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1678
\isatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1679
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1680
\isamarkupsection{HERE%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1681
}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1682
\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1683
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1684
\endisatagdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1685
{\isafolddocument}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1686
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1687
\isadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1688
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1689
\endisadelimdocument
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1690
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1691
\begin{isamarkuptext}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1692
\begin{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1693
  \isa{{\normalsize{}If\,}\ v\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c\ {\normalsize \,then\,}\ retrieve\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}\ v\ {\isacharequal}{\kern0pt}\ retrieve\ r\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isacharparenright}{\kern0pt}{\isachardot}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1694
  \end{lemma}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1695
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1696
  \begin{proof}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1697
  By induction on the definition of \isa{r\mbox{$^\downarrow$}}. The cases for rule 1) and 2) are
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1698
  straightforward as \isa{\isactrlbold {\isadigit{0}}{\isacharbackslash}{\kern0pt}c} and \isa{\isactrlbold {\isadigit{1}}{\isacharbackslash}{\kern0pt}c} are both equal to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1699
  \isa{\isactrlbold {\isadigit{0}}}. This means \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{0}}} cannot hold. Similarly in case of rule 3)
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1700
  where \isa{r} is of the form \isa{ACHAR\ d} with \isa{c\ {\isacharequal}{\kern0pt}\ d}. Then by assumption
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1701
  we know \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{1}}}, which implies \isa{v\ {\isacharequal}{\kern0pt}\ Empty}. The equation follows by 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1702
  simplification of left- and right-hand side. In  case \isa{c\ {\isasymnoteq}\ d} we have again
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1703
  \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{0}}}, which cannot  hold. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1704
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1705
  For rule 4a) we have again \isa{v\ {\isacharcolon}{\kern0pt}\ \isactrlbold {\isadigit{0}}}. The property holds by IH for rule 4b).
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1706
  The  induction hypothesis is 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1707
  \[
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1708
  \isa{retrieve\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}\ v\ {\isacharequal}{\kern0pt}\ retrieve\ r\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1709
  \]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1710
  which is what left- and right-hand side simplify to.  The slightly more interesting case
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1711
  is for 4c). By assumption  we have 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1712
  \isa{v\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isacharplus}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}AALTs\ bs\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}rs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}}. This means we 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1713
  have either (*) \isa{v{\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{1}}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} with \isa{v\ {\isacharequal}{\kern0pt}\ Left\ v{\isadigit{1}}} or
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1714
  (**) \isa{v{\isadigit{2}}\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}AALTs\ bs\ {\isacharparenleft}{\kern0pt}r\isactrlsub {\isadigit{2}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}rs{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c} with \isa{v\ {\isacharequal}{\kern0pt}\ Right\ v{\isadigit{2}}}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1715
  The former  case is straightforward by simplification. The second case is \ldots TBD.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1716
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1717
  Rule 5) TBD.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1718
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1719
  Finally for rule 6) the reasoning is as follows:   By assumption we  have
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1720
  \isa{v\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c{\isacharparenright}{\kern0pt}\ {\isasymcdot}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}}. This means we also have
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1721
  \isa{v\ {\isacharequal}{\kern0pt}\ Seq\ v{\isadigit{1}}\ v{\isadigit{2}}}, \isa{v{\isadigit{1}}\ {\isacharcolon}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}{\isacharbackslash}{\kern0pt}c}  and \isa{v{\isadigit{2}}\ {\isacharequal}{\kern0pt}\ Stars\ vs}.
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1722
  We want to prove
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1723
  \begin{align}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1724
  & \isa{retrieve\ {\isacharparenleft}{\kern0pt}ASEQ\ bs\ {\isacharparenleft}{\kern0pt}fuse\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}ASTAR\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ r{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v}\\
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1725
  &= \isa{retrieve\ {\isacharparenleft}{\kern0pt}ASTAR\ bs\ r{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}{\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\isactrlsup {\isasymstar}{\isacharparenright}{\kern0pt}\ c\ v{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1726
  \end{align}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1727
  The right-hand side \isa{inj}-expression is equal to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1728
  \isa{Stars\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isadigit{1}}\mbox{$\,$}{\isacharcolon}{\kern0pt}{\isacharcolon}{\kern0pt}\mbox{$\,$}vs{\isacharparenright}{\kern0pt}}, which means the \isa{retrieve}-expression
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1729
  simplifies to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1730
  \[
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1731
  \isa{bs\ {\isacharat}{\kern0pt}\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}\ {\isacharat}{\kern0pt}\ retrieve\ r\ {\isacharparenleft}{\kern0pt}inj\ {\isacharparenleft}{\kern0pt}r\mbox{$^\downarrow$}{\isacharparenright}{\kern0pt}\ c\ v{\isadigit{1}}{\isacharparenright}{\kern0pt}\ {\isacharat}{\kern0pt}\ retrieve\ {\isacharparenleft}{\kern0pt}ASTAR\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1732
  \]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1733
  The left-hand side (3) above simplifies to 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1734
  \[
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1735
  \isa{bs\ {\isacharat}{\kern0pt}\ retrieve\ {\isacharparenleft}{\kern0pt}fuse\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}r\mbox{$\bbslash$}c{\isacharparenright}{\kern0pt}{\isacharparenright}{\kern0pt}\ v{\isadigit{1}}\ {\isacharat}{\kern0pt}\ retrieve\ {\isacharparenleft}{\kern0pt}ASTAR\ {\isacharbrackleft}{\kern0pt}{\isacharbrackright}{\kern0pt}\ r{\isacharparenright}{\kern0pt}\ {\isacharparenleft}{\kern0pt}Stars\ vs{\isacharparenright}{\kern0pt}} 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1736
  \]
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1737
  We can move out the \isa{fuse\ {\isacharbrackleft}{\kern0pt}Z{\isacharbrackright}{\kern0pt}} and then use the IH to show that left-hand side
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1738
  and right-hand side are equal. This completes the proof. 
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1739
  \end{proof}   
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1740
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1741
   
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1742
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1743
  \bibliographystyle{plain}
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1744
  \bibliography{root}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1745
\end{isamarkuptext}\isamarkuptrue%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1746
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1747
\isadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1748
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1749
\endisadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1750
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1751
\isatagtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1752
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1753
\endisatagtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1754
{\isafoldtheory}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1755
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1756
\isadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1757
\isanewline
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1758
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1759
\endisadelimtheory
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1760
\isanewline
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1761
\isanewline
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1762
%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1763
\end{isabellebody}%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1764
\endinput
386
0efa7ffd96ff updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 384
diff changeset
  1765
%:%file=Paper.tex%:%
384
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1766
%:%50=134%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1767
%:%62=136%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1768
%:%63=137%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1769
%:%64=138%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1770
%:%65=139%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1771
%:%66=140%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1772
%:%67=141%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1773
%:%68=142%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1774
%:%69=143%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1775
%:%70=144%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1776
%:%71=145%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1777
%:%72=146%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1778
%:%73=147%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1779
%:%74=148%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1780
%:%75=149%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1781
%:%76=150%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1782
%:%77=151%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1783
%:%78=152%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1784
%:%79=153%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1785
%:%80=154%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1786
%:%81=155%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1787
%:%82=156%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1788
%:%83=157%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1789
%:%84=158%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1790
%:%85=159%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1791
%:%86=160%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1792
%:%87=161%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1793
%:%88=162%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1794
%:%89=163%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1795
%:%90=164%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1796
%:%91=165%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1797
%:%92=166%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1798
%:%93=167%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1799
%:%94=168%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1800
%:%95=169%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1801
%:%96=170%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1802
%:%97=171%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1803
%:%98=172%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1804
%:%99=173%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1805
%:%100=174%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1806
%:%101=175%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1807
%:%102=176%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1808
%:%103=177%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1809
%:%104=178%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1810
%:%105=179%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1811
%:%106=180%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1812
%:%107=181%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1813
%:%108=182%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1814
%:%109=183%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1815
%:%110=184%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1816
%:%111=185%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1817
%:%112=186%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1818
%:%113=187%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1819
%:%114=188%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1820
%:%115=189%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1821
%:%116=190%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1822
%:%117=191%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1823
%:%118=192%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1824
%:%119=193%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1825
%:%120=194%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1826
%:%121=195%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1827
%:%122=196%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1828
%:%123=197%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1829
%:%124=198%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1830
%:%125=199%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1831
%:%126=200%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1832
%:%127=201%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1833
%:%128=202%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1834
%:%129=203%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1835
%:%130=204%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1836
%:%131=205%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1837
%:%132=206%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1838
%:%133=207%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1839
%:%134=208%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1840
%:%135=209%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1841
%:%136=210%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1842
%:%137=211%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1843
%:%138=212%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1844
%:%139=213%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1845
%:%140=214%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1846
%:%141=215%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1847
%:%142=216%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1848
%:%143=217%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1849
%:%144=218%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1850
%:%145=219%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1851
%:%146=220%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1852
%:%147=221%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1853
%:%148=222%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1854
%:%149=223%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1855
%:%150=224%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1856
%:%151=225%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1857
%:%152=226%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1858
%:%153=227%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1859
%:%154=228%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1860
%:%155=229%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1861
%:%156=230%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1862
%:%157=231%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1863
%:%158=232%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1864
%:%159=233%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1865
%:%160=234%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1866
%:%161=235%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1867
%:%162=236%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1868
%:%163=237%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1869
%:%164=238%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1870
%:%165=239%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1871
%:%166=240%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1872
%:%167=241%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1873
%:%168=242%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1874
%:%169=243%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1875
%:%170=244%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1876
%:%171=245%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1877
%:%172=246%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1878
%:%173=247%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1879
%:%174=248%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1880
%:%175=249%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1881
%:%176=250%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1882
%:%177=251%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1883
%:%178=252%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1884
%:%179=253%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1885
%:%180=254%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1886
%:%181=255%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1887
%:%182=256%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1888
%:%183=257%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1889
%:%184=258%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1890
%:%185=259%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1891
%:%186=260%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1892
%:%187=261%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1893
%:%188=262%:%
f5866f1d6a59 from christian
Chengsong
parents:
diff changeset
  1894
%:%189=263%:%
389
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1895
%:%198=271%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1896
%:%210=275%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1897
%:%211=276%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1898
%:%212=277%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1899
%:%213=278%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1900
%:%214=279%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1901
%:%215=280%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1902
%:%216=281%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1903
%:%217=282%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1904
%:%218=283%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1905
%:%219=284%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1906
%:%220=285%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1907
%:%221=286%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1908
%:%222=287%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1909
%:%223=288%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1910
%:%224=289%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1911
%:%225=290%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1912
%:%226=291%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1913
%:%227=292%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1914
%:%228=293%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1915
%:%229=294%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1916
%:%230=295%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1917
%:%231=296%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1918
%:%232=297%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1919
%:%241=304%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1920
%:%253=310%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1921
%:%254=311%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1922
%:%255=312%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1923
%:%256=313%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1924
%:%256=314%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1925
%:%257=315%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1926
%:%258=316%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1927
%:%259=317%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1928
%:%260=318%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1929
%:%261=319%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1930
%:%262=320%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1931
%:%263=321%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1932
%:%264=322%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1933
%:%265=323%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1934
%:%266=324%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1935
%:%267=325%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1936
%:%268=326%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1937
%:%269=327%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1938
%:%270=328%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1939
%:%271=329%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1940
%:%272=330%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1941
%:%273=331%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1942
%:%274=332%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1943
%:%275=333%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1944
%:%276=334%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1945
%:%277=335%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1946
%:%278=336%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1947
%:%279=337%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1948
%:%280=338%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1949
%:%281=339%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1950
%:%282=340%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1951
%:%283=341%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1952
%:%284=342%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1953
%:%285=343%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1954
%:%286=344%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1955
%:%287=345%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1956
%:%288=346%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1957
%:%289=347%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1958
%:%290=348%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1959
%:%291=349%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1960
%:%292=350%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1961
%:%293=351%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1962
%:%294=352%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1963
%:%295=353%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1964
%:%296=354%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1965
%:%297=355%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1966
%:%298=356%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1967
%:%299=357%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1968
%:%300=358%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1969
%:%301=359%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1970
%:%302=360%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1971
%:%303=361%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1972
%:%304=362%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1973
%:%305=363%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1974
%:%306=364%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1975
%:%307=365%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1976
%:%308=366%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1977
%:%309=367%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1978
%:%310=368%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1979
%:%311=369%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1980
%:%312=370%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1981
%:%313=371%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1982
%:%314=372%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1983
%:%315=373%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1984
%:%316=374%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1985
%:%317=375%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1986
%:%318=376%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1987
%:%319=377%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1988
%:%320=378%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1989
%:%320=379%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1990
%:%321=380%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1991
%:%322=381%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1992
%:%323=382%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1993
%:%324=383%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1994
%:%325=384%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1995
%:%326=385%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1996
%:%327=386%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1997
%:%328=387%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1998
%:%329=388%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  1999
%:%330=389%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2000
%:%331=390%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2001
%:%332=391%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2002
%:%333=392%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2003
%:%334=393%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2004
%:%335=394%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2005
%:%336=395%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2006
%:%337=396%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2007
%:%338=397%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2008
%:%339=398%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2009
%:%340=399%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2010
%:%341=400%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2011
%:%342=401%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2012
%:%343=402%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2013
%:%344=403%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2014
%:%345=404%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2015
%:%346=405%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2016
%:%347=406%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2017
%:%348=407%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2018
%:%349=408%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2019
%:%350=409%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2020
%:%351=410%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2021
%:%352=411%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2022
%:%353=412%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2023
%:%354=413%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2024
%:%355=414%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2025
%:%356=415%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2026
%:%357=416%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2027
%:%358=417%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2028
%:%359=418%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2029
%:%360=419%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2030
%:%361=420%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2031
%:%362=421%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2032
%:%363=422%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2033
%:%364=423%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2034
%:%365=424%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2035
%:%366=425%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2036
%:%367=426%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2037
%:%368=427%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2038
%:%369=428%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2039
%:%370=429%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2040
%:%371=430%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2041
%:%372=431%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2042
%:%373=432%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2043
%:%374=433%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2044
%:%375=434%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2045
%:%376=435%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2046
%:%377=436%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2047
%:%378=437%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2048
%:%379=438%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2049
%:%380=439%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2050
%:%381=440%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2051
%:%382=441%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2052
%:%383=442%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2053
%:%384=443%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2054
%:%385=444%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2055
%:%386=445%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2056
%:%387=446%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2057
%:%388=447%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2058
%:%389=448%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2059
%:%390=449%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2060
%:%391=450%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2061
%:%392=451%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2062
%:%393=452%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2063
%:%394=453%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2064
%:%395=454%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2065
%:%396=455%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2066
%:%397=456%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2067
%:%398=457%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2068
%:%399=458%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2069
%:%400=459%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2070
%:%401=460%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2071
%:%402=461%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2072
%:%403=462%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2073
%:%404=463%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2074
%:%405=464%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2075
%:%406=465%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2076
%:%407=466%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2077
%:%408=467%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2078
%:%409=468%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2079
%:%410=469%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2080
%:%411=470%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2081
%:%412=471%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2082
%:%413=472%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2083
%:%414=473%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2084
%:%415=474%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2085
%:%416=475%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2086
%:%417=476%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2087
%:%418=477%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2088
%:%419=478%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2089
%:%420=479%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2090
%:%421=480%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2091
%:%422=481%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2092
%:%423=482%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2093
%:%424=483%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2094
%:%425=484%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2095
%:%434=491%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2096
%:%446=493%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2097
%:%447=494%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2098
%:%447=495%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2099
%:%448=496%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2100
%:%449=497%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2101
%:%450=498%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2102
%:%451=499%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2103
%:%452=500%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2104
%:%453=501%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2105
%:%454=502%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2106
%:%455=503%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2107
%:%456=504%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2108
%:%457=505%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2109
%:%458=506%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2110
%:%459=507%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2111
%:%460=508%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2112
%:%461=509%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2113
%:%462=510%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2114
%:%463=511%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2115
%:%464=512%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2116
%:%465=513%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2117
%:%466=514%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2118
%:%467=515%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2119
%:%468=516%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2120
%:%469=517%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2121
%:%470=518%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2122
%:%471=519%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2123
%:%472=520%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2124
%:%473=521%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2125
%:%474=522%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2126
%:%475=523%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2127
%:%476=524%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2128
%:%477=525%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2129
%:%478=526%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2130
%:%479=527%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2131
%:%480=528%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2132
%:%481=529%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2133
%:%482=530%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2134
%:%483=531%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2135
%:%484=532%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2136
%:%485=533%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2137
%:%486=534%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2138
%:%486=535%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2139
%:%487=536%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2140
%:%488=537%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2141
%:%489=538%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2142
%:%490=539%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2143
%:%491=540%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2144
%:%491=541%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2145
%:%492=542%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2146
%:%493=543%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2147
%:%494=544%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2148
%:%495=545%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2149
%:%496=546%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2150
%:%497=547%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2151
%:%498=548%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2152
%:%499=549%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2153
%:%500=550%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2154
%:%501=551%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2155
%:%502=552%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2156
%:%503=553%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2157
%:%504=554%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2158
%:%505=555%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2159
%:%506=556%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2160
%:%507=557%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2161
%:%508=558%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2162
%:%509=559%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2163
%:%510=560%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2164
%:%511=561%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2165
%:%512=562%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2166
%:%513=563%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2167
%:%514=564%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2168
%:%515=565%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2169
%:%516=566%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2170
%:%517=567%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2171
%:%518=568%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2172
%:%519=569%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2173
%:%520=570%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2174
%:%521=571%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2175
%:%522=572%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2176
%:%523=573%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2177
%:%524=574%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2178
%:%525=575%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2179
%:%526=576%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2180
%:%527=577%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2181
%:%528=578%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2182
%:%529=579%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2183
%:%530=580%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2184
%:%531=581%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2185
%:%532=582%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2186
%:%533=583%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2187
%:%534=584%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2188
%:%535=585%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2189
%:%536=586%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2190
%:%537=587%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2191
%:%538=588%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2192
%:%539=589%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2193
%:%540=590%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2194
%:%541=591%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2195
%:%542=592%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2196
%:%543=593%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2197
%:%544=594%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2198
%:%545=595%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2199
%:%546=596%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2200
%:%547=597%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2201
%:%548=598%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2202
%:%549=599%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2203
%:%550=600%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2204
%:%551=601%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2205
%:%552=602%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2206
%:%553=603%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2207
%:%554=604%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2208
%:%555=605%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2209
%:%556=606%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2210
%:%557=607%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2211
%:%558=608%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2212
%:%559=609%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2213
%:%560=610%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2214
%:%561=611%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2215
%:%562=612%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2216
%:%563=613%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2217
%:%564=614%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2218
%:%565=615%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2219
%:%566=616%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2220
%:%567=617%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2221
%:%568=618%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2222
%:%569=619%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2223
%:%570=620%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2224
%:%571=621%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2225
%:%572=622%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2226
%:%573=623%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2227
%:%574=624%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2228
%:%575=625%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2229
%:%576=626%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2230
%:%577=627%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2231
%:%578=628%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2232
%:%579=629%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2233
%:%580=630%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2234
%:%589=634%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2235
%:%601=638%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2236
%:%602=639%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2237
%:%603=640%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2238
%:%604=641%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2239
%:%605=642%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2240
%:%606=643%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2241
%:%607=644%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2242
%:%608=645%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2243
%:%609=646%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2244
%:%610=647%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2245
%:%611=648%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2246
%:%612=649%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2247
%:%613=650%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2248
%:%614=651%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2249
%:%615=652%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2250
%:%616=653%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2251
%:%617=654%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2252
%:%618=655%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2253
%:%619=656%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2254
%:%620=657%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2255
%:%621=658%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2256
%:%622=659%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2257
%:%623=660%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2258
%:%624=661%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2259
%:%625=662%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2260
%:%626=663%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2261
%:%627=664%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2262
%:%628=665%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2263
%:%629=666%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2264
%:%630=667%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2265
%:%631=668%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2266
%:%632=669%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2267
%:%633=670%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2268
%:%634=671%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2269
%:%635=672%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2270
%:%636=673%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2271
%:%637=674%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2272
%:%638=675%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2273
%:%639=676%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2274
%:%640=677%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2275
%:%641=678%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2276
%:%642=679%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2277
%:%643=680%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2278
%:%644=681%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2279
%:%645=682%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2280
%:%646=683%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2281
%:%647=684%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2282
%:%648=685%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2283
%:%649=686%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2284
%:%650=687%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2285
%:%651=688%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2286
%:%652=689%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2287
%:%653=690%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2288
%:%654=691%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2289
%:%655=692%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2290
%:%656=693%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2291
%:%657=694%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2292
%:%658=695%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2293
%:%659=696%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2294
%:%660=697%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2295
%:%661=698%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2296
%:%662=699%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2297
%:%663=700%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2298
%:%664=701%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2299
%:%665=702%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2300
%:%666=703%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2301
%:%667=704%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2302
%:%668=705%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2303
%:%669=706%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2304
%:%670=707%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2305
%:%671=708%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2306
%:%672=709%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2307
%:%673=710%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2308
%:%674=711%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2309
%:%675=712%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2310
%:%676=713%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2311
%:%677=714%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2312
%:%678=715%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2313
%:%679=716%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2314
%:%680=717%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2315
%:%681=718%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2316
%:%682=719%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2317
%:%683=720%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2318
%:%684=721%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2319
%:%685=722%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2320
%:%686=723%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2321
%:%687=724%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2322
%:%688=725%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2323
%:%689=726%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2324
%:%690=727%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2325
%:%691=728%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2326
%:%692=729%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2327
%:%693=730%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2328
%:%694=731%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2329
%:%695=732%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2330
%:%696=733%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2331
%:%697=734%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2332
%:%698=735%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2333
%:%699=736%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2334
%:%700=737%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2335
%:%701=738%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2336
%:%702=739%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2337
%:%703=740%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2338
%:%704=741%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2339
%:%705=742%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2340
%:%706=743%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2341
%:%707=744%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2342
%:%708=745%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2343
%:%709=746%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2344
%:%710=747%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2345
%:%711=748%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2346
%:%712=749%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2347
%:%713=750%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2348
%:%714=751%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2349
%:%715=752%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2350
%:%715=753%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2351
%:%716=754%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2352
%:%716=755%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2353
%:%717=756%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2354
%:%718=757%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2355
%:%718=758%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2356
%:%719=759%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2357
%:%720=760%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2358
%:%721=761%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2359
%:%722=762%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2360
%:%723=763%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2361
%:%724=764%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2362
%:%725=765%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2363
%:%726=766%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2364
%:%727=767%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2365
%:%728=768%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2366
%:%729=769%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2367
%:%730=770%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2368
%:%731=771%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2369
%:%732=772%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2370
%:%733=773%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2371
%:%734=774%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2372
%:%735=775%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2373
%:%736=776%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2374
%:%737=777%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2375
%:%738=778%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2376
%:%739=779%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2377
%:%740=780%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2378
%:%741=781%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2379
%:%742=782%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2380
%:%743=783%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2381
%:%744=784%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2382
%:%745=785%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2383
%:%746=786%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2384
%:%747=787%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2385
%:%748=788%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2386
%:%749=789%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2387
%:%750=790%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2388
%:%751=791%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2389
%:%752=792%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2390
%:%753=793%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2391
%:%754=794%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2392
%:%755=795%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2393
%:%756=796%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2394
%:%757=797%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2395
%:%758=798%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2396
%:%759=799%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2397
%:%760=800%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2398
%:%761=801%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2399
%:%762=802%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2400
%:%763=803%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2401
%:%764=804%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2402
%:%765=805%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2403
%:%766=806%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2404
%:%767=807%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2405
%:%768=808%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2406
%:%769=809%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2407
%:%770=810%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2408
%:%771=811%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2409
%:%772=812%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2410
%:%773=813%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2411
%:%774=814%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2412
%:%774=815%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2413
%:%774=816%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2414
%:%775=817%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2415
%:%776=818%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2416
%:%777=819%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2417
%:%778=820%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2418
%:%779=821%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2419
%:%780=822%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2420
%:%781=823%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2421
%:%782=824%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2422
%:%783=825%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2423
%:%783=826%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2424
%:%784=827%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2425
%:%785=828%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2426
%:%786=829%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2427
%:%787=830%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2428
%:%788=831%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2429
%:%789=832%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2430
%:%790=833%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2431
%:%791=834%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2432
%:%792=835%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2433
%:%793=836%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2434
%:%794=837%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2435
%:%795=838%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2436
%:%796=839%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2437
%:%797=840%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2438
%:%798=841%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2439
%:%799=842%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2440
%:%800=843%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2441
%:%801=844%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2442
%:%802=845%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2443
%:%803=846%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2444
%:%804=847%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2445
%:%805=848%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2446
%:%806=849%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2447
%:%807=850%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2448
%:%808=851%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2449
%:%809=852%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2450
%:%810=853%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2451
%:%811=854%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2452
%:%812=855%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2453
%:%813=856%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2454
%:%814=857%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2455
%:%815=858%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2456
%:%816=859%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2457
%:%817=860%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2458
%:%818=861%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2459
%:%818=862%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2460
%:%819=863%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2461
%:%820=864%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2462
%:%821=865%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2463
%:%822=866%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2464
%:%823=867%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2465
%:%824=868%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2466
%:%825=869%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2467
%:%825=870%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2468
%:%826=871%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2469
%:%827=872%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2470
%:%828=873%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2471
%:%828=874%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2472
%:%829=875%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2473
%:%830=876%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2474
%:%831=877%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2475
%:%832=878%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2476
%:%833=879%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2477
%:%834=880%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2478
%:%835=881%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2479
%:%836=882%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2480
%:%837=883%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2481
%:%838=884%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2482
%:%839=885%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2483
%:%839=886%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2484
%:%840=887%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2485
%:%841=888%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2486
%:%842=889%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2487
%:%843=890%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2488
%:%843=891%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2489
%:%844=892%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2490
%:%845=893%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2491
%:%846=894%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2492
%:%847=895%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2493
%:%848=896%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2494
%:%849=897%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2495
%:%850=898%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2496
%:%851=899%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2497
%:%852=900%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2498
%:%853=901%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2499
%:%854=902%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2500
%:%855=903%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2501
%:%856=904%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2502
%:%857=905%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2503
%:%858=906%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2504
%:%859=907%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2505
%:%860=908%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2506
%:%861=909%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2507
%:%862=910%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2508
%:%863=911%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2509
%:%864=912%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2510
%:%865=913%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2511
%:%866=914%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2512
%:%867=915%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2513
%:%868=916%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2514
%:%869=917%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2515
%:%870=918%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2516
%:%871=919%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2517
%:%872=920%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2518
%:%873=921%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2519
%:%874=922%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2520
%:%875=923%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2521
%:%876=924%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2522
%:%877=925%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2523
%:%878=926%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2524
%:%879=927%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2525
%:%880=928%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2526
%:%881=929%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2527
%:%882=930%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2528
%:%883=931%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2529
%:%884=932%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2530
%:%885=933%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2531
%:%886=934%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2532
%:%887=935%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2533
%:%888=936%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2534
%:%889=937%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2535
%:%890=938%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2536
%:%891=939%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2537
%:%892=940%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2538
%:%893=941%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2539
%:%894=942%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2540
%:%895=943%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2541
%:%896=944%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2542
%:%897=945%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2543
%:%898=946%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2544
%:%899=947%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2545
%:%900=948%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2546
%:%901=949%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2547
%:%901=950%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2548
%:%902=951%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2549
%:%903=952%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2550
%:%904=953%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2551
%:%905=954%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2552
%:%906=955%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2553
%:%907=956%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2554
%:%908=957%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2555
%:%909=958%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2556
%:%910=959%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2557
%:%911=960%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2558
%:%912=961%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2559
%:%913=962%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2560
%:%914=963%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2561
%:%915=964%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2562
%:%916=965%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2563
%:%917=966%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2564
%:%918=967%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2565
%:%919=968%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2566
%:%920=969%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2567
%:%921=970%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2568
%:%922=971%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2569
%:%923=972%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2570
%:%924=973%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2571
%:%925=974%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2572
%:%926=975%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2573
%:%927=976%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2574
%:%928=977%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2575
%:%929=978%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2576
%:%930=979%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2577
%:%931=980%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2578
%:%932=981%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2579
%:%933=982%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2580
%:%934=983%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2581
%:%934=984%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2582
%:%935=985%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2583
%:%936=986%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2584
%:%937=987%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2585
%:%938=988%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2586
%:%939=989%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2587
%:%940=990%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2588
%:%941=991%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2589
%:%942=992%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2590
%:%943=993%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2591
%:%944=994%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2592
%:%945=995%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2593
%:%946=996%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2594
%:%947=997%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2595
%:%948=998%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2596
%:%949=999%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2597
%:%950=1000%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2598
%:%951=1001%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2599
%:%952=1002%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2600
%:%953=1003%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2601
%:%954=1004%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2602
%:%955=1005%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2603
%:%956=1006%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2604
%:%957=1007%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2605
%:%958=1008%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2606
%:%959=1009%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2607
%:%960=1010%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2608
%:%961=1011%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2609
%:%962=1012%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2610
%:%963=1013%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2611
%:%964=1014%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2612
%:%964=1015%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2613
%:%965=1016%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2614
%:%966=1017%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2615
%:%967=1018%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2616
%:%968=1019%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2617
%:%969=1020%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2618
%:%970=1021%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2619
%:%971=1022%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2620
%:%972=1023%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2621
%:%972=1024%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2622
%:%973=1025%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2623
%:%974=1026%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2624
%:%975=1027%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2625
%:%976=1028%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2626
%:%977=1029%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2627
%:%978=1030%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2628
%:%979=1031%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2629
%:%980=1032%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2630
%:%981=1033%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2631
%:%982=1034%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2632
%:%983=1035%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2633
%:%984=1036%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2634
%:%985=1037%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2635
%:%986=1038%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2636
%:%987=1039%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2637
%:%988=1040%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2638
%:%989=1041%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2639
%:%990=1042%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2640
%:%991=1043%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2641
%:%992=1044%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2642
%:%993=1045%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2643
%:%994=1046%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2644
%:%995=1047%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2645
%:%996=1048%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2646
%:%997=1049%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2647
%:%998=1050%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2648
%:%999=1051%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2649
%:%1000=1052%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2650
%:%1001=1053%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2651
%:%1002=1054%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2652
%:%1003=1055%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2653
%:%1004=1056%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2654
%:%1005=1057%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2655
%:%1006=1058%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2656
%:%1007=1059%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2657
%:%1008=1060%:%
387
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
  2658
%:%1009=1061%:%
389
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2659
%:%1009=1062%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2660
%:%1009=1063%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2661
%:%1010=1064%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2662
%:%1010=1065%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2663
%:%1010=1066%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2664
%:%1011=1067%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2665
%:%1012=1068%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2666
%:%1012=1069%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2667
%:%1013=1070%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2668
%:%1014=1071%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2669
%:%1015=1072%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2670
%:%1016=1073%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2671
%:%1017=1074%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2672
%:%1018=1075%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2673
%:%1019=1076%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2674
%:%1020=1077%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2675
%:%1021=1078%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2676
%:%1022=1079%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2677
%:%1023=1080%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2678
%:%1024=1081%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2679
%:%1025=1082%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2680
%:%1026=1083%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2681
%:%1027=1084%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2682
%:%1028=1085%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2683
%:%1029=1086%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2684
%:%1030=1087%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2685
%:%1031=1088%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2686
%:%1032=1089%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2687
%:%1033=1090%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2688
%:%1034=1091%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2689
%:%1035=1092%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2690
%:%1036=1093%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2691
%:%1037=1094%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2692
%:%1038=1095%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2693
%:%1039=1096%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2694
%:%1040=1097%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2695
%:%1041=1098%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2696
%:%1042=1099%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2697
%:%1043=1100%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2698
%:%1044=1101%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2699
%:%1045=1102%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2700
%:%1046=1103%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2701
%:%1046=1104%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2702
%:%1047=1105%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2703
%:%1048=1106%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2704
%:%1049=1107%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2705
%:%1049=1108%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2706
%:%1049=1109%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2707
%:%1049=1110%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2708
%:%1050=1111%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2709
%:%1051=1112%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2710
%:%1052=1113%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2711
%:%1053=1114%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2712
%:%1054=1115%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2713
%:%1055=1116%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2714
%:%1056=1117%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2715
%:%1057=1118%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2716
%:%1058=1119%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2717
%:%1059=1120%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2718
%:%1060=1121%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2719
%:%1061=1122%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2720
%:%1062=1123%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2721
%:%1063=1124%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2722
%:%1064=1125%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2723
%:%1065=1126%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2724
%:%1066=1127%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2725
%:%1067=1128%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2726
%:%1068=1129%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2727
%:%1069=1130%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2728
%:%1070=1131%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2729
%:%1071=1132%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2730
%:%1072=1133%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2731
%:%1073=1134%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2732
%:%1074=1135%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2733
%:%1075=1136%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2734
%:%1076=1137%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2735
%:%1077=1138%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2736
%:%1078=1139%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2737
%:%1079=1140%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2738
%:%1080=1141%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2739
%:%1081=1142%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2740
%:%1082=1143%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2741
%:%1083=1144%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2742
%:%1084=1145%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2743
%:%1085=1146%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2744
%:%1086=1147%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2745
%:%1095=1151%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2746
%:%1107=1155%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2747
%:%1108=1156%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2748
%:%1109=1157%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2749
%:%1110=1158%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2750
%:%1111=1159%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2751
%:%1112=1160%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2752
%:%1113=1161%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2753
%:%1114=1162%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2754
%:%1115=1163%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2755
%:%1116=1164%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2756
%:%1117=1165%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2757
%:%1118=1166%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2758
%:%1119=1167%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2759
%:%1120=1168%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2760
%:%1121=1169%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2761
%:%1122=1170%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2762
%:%1123=1171%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2763
%:%1124=1172%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2764
%:%1125=1173%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2765
%:%1126=1174%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2766
%:%1127=1175%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2767
%:%1128=1176%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2768
%:%1129=1177%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2769
%:%1130=1178%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2770
%:%1131=1179%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2771
%:%1132=1180%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2772
%:%1133=1181%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2773
%:%1134=1182%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2774
%:%1135=1183%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2775
%:%1136=1184%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2776
%:%1137=1185%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2777
%:%1138=1186%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2778
%:%1139=1187%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2779
%:%1140=1188%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2780
%:%1141=1189%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2781
%:%1142=1190%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2782
%:%1143=1191%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2783
%:%1144=1192%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2784
%:%1145=1193%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2785
%:%1146=1194%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2786
%:%1147=1195%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2787
%:%1148=1196%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2788
%:%1149=1197%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2789
%:%1150=1198%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2790
%:%1151=1199%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2791
%:%1152=1200%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2792
%:%1153=1201%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2793
%:%1154=1202%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2794
%:%1155=1203%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2795
%:%1156=1204%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2796
%:%1157=1205%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2797
%:%1158=1206%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2798
%:%1159=1207%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2799
%:%1160=1208%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2800
%:%1161=1209%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2801
%:%1162=1210%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2802
%:%1163=1211%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2803
%:%1164=1212%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2804
%:%1165=1213%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2805
%:%1166=1214%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2806
%:%1167=1215%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2807
%:%1168=1216%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2808
%:%1169=1217%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2809
%:%1170=1218%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2810
%:%1171=1219%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2811
%:%1172=1220%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2812
%:%1173=1221%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2813
%:%1174=1222%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2814
%:%1175=1223%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2815
%:%1176=1224%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2816
%:%1177=1225%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2817
%:%1178=1226%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2818
%:%1179=1227%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2819
%:%1180=1228%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2820
%:%1181=1229%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2821
%:%1182=1230%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2822
%:%1183=1231%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2823
%:%1184=1232%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2824
%:%1185=1233%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2825
%:%1186=1234%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2826
%:%1187=1235%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2827
%:%1188=1236%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2828
%:%1189=1237%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2829
%:%1190=1238%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2830
%:%1191=1239%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2831
%:%1192=1240%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2832
%:%1193=1241%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2833
%:%1194=1242%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2834
%:%1195=1243%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2835
%:%1196=1244%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2836
%:%1197=1245%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2837
%:%1198=1246%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2838
%:%1199=1247%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2839
%:%1200=1248%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2840
%:%1201=1249%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2841
%:%1202=1250%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2842
%:%1203=1251%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2843
%:%1204=1252%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2844
%:%1205=1253%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2845
%:%1206=1254%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2846
%:%1207=1255%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2847
%:%1208=1256%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2848
%:%1209=1257%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2849
%:%1210=1258%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2850
%:%1211=1259%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2851
%:%1212=1260%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2852
%:%1213=1261%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2853
%:%1214=1262%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2854
%:%1215=1263%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2855
%:%1216=1264%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2856
%:%1217=1265%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2857
%:%1218=1266%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2858
%:%1219=1267%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2859
%:%1220=1268%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2860
%:%1221=1269%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2861
%:%1222=1270%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2862
%:%1222=1271%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2863
%:%1223=1272%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2864
%:%1224=1273%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2865
%:%1225=1274%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2866
%:%1226=1275%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2867
%:%1227=1276%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2868
%:%1228=1277%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2869
%:%1229=1278%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2870
%:%1230=1279%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2871
%:%1231=1280%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2872
%:%1232=1281%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2873
%:%1233=1282%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2874
%:%1233=1283%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2875
%:%1234=1284%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2876
%:%1235=1285%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2877
%:%1236=1286%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2878
%:%1237=1287%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2879
%:%1238=1288%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2880
%:%1239=1289%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2881
%:%1240=1290%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2882
%:%1241=1291%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2883
%:%1242=1292%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2884
%:%1243=1293%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2885
%:%1244=1294%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2886
%:%1245=1295%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2887
%:%1246=1296%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2888
%:%1247=1297%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2889
%:%1248=1298%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2890
%:%1249=1299%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2891
%:%1250=1300%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2892
%:%1251=1301%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2893
%:%1252=1302%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2894
%:%1253=1303%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2895
%:%1254=1304%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2896
%:%1255=1305%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2897
%:%1256=1306%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2898
%:%1257=1307%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2899
%:%1258=1308%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2900
%:%1259=1309%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2901
%:%1260=1310%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2902
%:%1261=1311%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2903
%:%1262=1312%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2904
%:%1263=1313%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2905
%:%1264=1314%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2906
%:%1265=1315%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2907
%:%1266=1316%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2908
%:%1267=1317%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2909
%:%1268=1318%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2910
%:%1269=1319%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2911
%:%1270=1320%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2912
%:%1271=1321%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2913
%:%1272=1322%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2914
%:%1273=1323%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2915
%:%1274=1324%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2916
%:%1275=1325%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2917
%:%1276=1326%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2918
%:%1277=1327%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2919
%:%1278=1328%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2920
%:%1279=1329%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2921
%:%1280=1330%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2922
%:%1281=1331%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2923
%:%1282=1332%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2924
%:%1283=1333%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2925
%:%1284=1334%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2926
%:%1285=1335%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2927
%:%1286=1336%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2928
%:%1287=1337%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2929
%:%1287=1338%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2930
%:%1287=1339%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2931
%:%1288=1340%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2932
%:%1289=1341%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2933
%:%1289=1342%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2934
%:%1289=1343%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2935
%:%1289=1344%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2936
%:%1290=1345%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2937
%:%1291=1346%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2938
%:%1292=1347%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2939
%:%1293=1348%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2940
%:%1294=1349%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2941
%:%1294=1350%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2942
%:%1295=1351%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2943
%:%1296=1352%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2944
%:%1297=1353%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2945
%:%1298=1354%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2946
%:%1299=1355%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2947
%:%1300=1356%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2948
%:%1301=1357%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2949
%:%1302=1358%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2950
%:%1303=1359%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2951
%:%1304=1360%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2952
%:%1305=1361%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2953
%:%1306=1362%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2954
%:%1307=1363%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2955
%:%1308=1364%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2956
%:%1309=1365%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2957
%:%1310=1366%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2958
%:%1311=1367%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2959
%:%1312=1368%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2960
%:%1313=1369%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2961
%:%1314=1370%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2962
%:%1315=1371%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2963
%:%1316=1372%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2964
%:%1317=1373%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2965
%:%1318=1374%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2966
%:%1319=1375%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2967
%:%1320=1376%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2968
%:%1321=1377%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2969
%:%1322=1378%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2970
%:%1323=1379%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2971
%:%1324=1380%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2972
%:%1325=1381%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2973
%:%1326=1382%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2974
%:%1327=1383%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2975
%:%1328=1384%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2976
%:%1329=1385%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2977
%:%1330=1386%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2978
%:%1331=1387%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2979
%:%1332=1388%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2980
%:%1333=1389%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2981
%:%1334=1390%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2982
%:%1335=1391%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2983
%:%1336=1392%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2984
%:%1337=1393%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2985
%:%1338=1394%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2986
%:%1339=1395%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2987
%:%1340=1396%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2988
%:%1341=1397%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2989
%:%1342=1398%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2990
%:%1342=1399%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2991
%:%1343=1400%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2992
%:%1343=1401%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2993
%:%1344=1402%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2994
%:%1344=1403%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2995
%:%1345=1404%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2996
%:%1346=1405%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2997
%:%1347=1406%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2998
%:%1348=1407%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  2999
%:%1349=1408%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3000
%:%1350=1409%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3001
%:%1351=1410%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3002
%:%1351=1411%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3003
%:%1352=1412%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3004
%:%1352=1413%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3005
%:%1353=1414%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3006
%:%1353=1415%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3007
%:%1354=1416%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3008
%:%1355=1417%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3009
%:%1356=1418%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3010
%:%1357=1419%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3011
%:%1358=1420%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3012
%:%1359=1421%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3013
%:%1360=1422%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3014
%:%1361=1423%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3015
%:%1362=1424%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3016
%:%1363=1425%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3017
%:%1364=1426%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3018
%:%1365=1427%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3019
%:%1366=1428%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3020
%:%1367=1429%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3021
%:%1368=1430%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3022
%:%1369=1431%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3023
%:%1370=1432%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3024
%:%1371=1433%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3025
%:%1372=1434%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3026
%:%1373=1435%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3027
%:%1374=1436%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3028
%:%1375=1437%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3029
%:%1376=1438%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3030
%:%1377=1439%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3031
%:%1378=1440%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3032
%:%1379=1441%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3033
%:%1380=1442%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3034
%:%1381=1443%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3035
%:%1382=1444%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3036
%:%1383=1445%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3037
%:%1384=1446%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3038
%:%1384=1447%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3039
%:%1385=1448%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3040
%:%1386=1449%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3041
%:%1387=1450%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3042
%:%1388=1451%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3043
%:%1389=1452%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3044
%:%1390=1453%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3045
%:%1391=1454%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3046
%:%1391=1455%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3047
%:%1392=1456%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3048
%:%1393=1457%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3049
%:%1394=1458%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3050
%:%1394=1459%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3051
%:%1395=1460%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3052
%:%1396=1461%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3053
%:%1397=1462%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3054
%:%1397=1463%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3055
%:%1398=1464%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3056
%:%1398=1465%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3057
%:%1399=1466%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3058
%:%1399=1467%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3059
%:%1400=1468%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3060
%:%1401=1469%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3061
%:%1402=1470%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3062
%:%1402=1471%:%
387
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
  3063
%:%1403=1472%:%
389
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3064
%:%1403=1473%:%
387
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
  3065
%:%1404=1474%:%
389
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3066
%:%1404=1475%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3067
%:%1404=1476%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3068
%:%1404=1477%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3069
%:%1405=1478%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3070
%:%1405=1479%:%
387
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
  3071
%:%1406=1480%:%
389
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3072
%:%1407=1481%:%
387
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
  3073
%:%1407=1483%:%
b257b9ba8a25 concatlen
Chengsong
parents: 386
diff changeset
  3074
%:%1407=1484%:%
389
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3075
%:%1407=1485%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3076
%:%1407=1486%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3077
%:%1407=1487%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3078
%:%1408=1488%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3079
%:%1408=1489%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3080
%:%1409=1490%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3081
%:%1409=1491%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3082
%:%1410=1492%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3083
%:%1410=1493%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3084
%:%1411=1494%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3085
%:%1412=1495%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3086
%:%1413=1496%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3087
%:%1414=1497%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3088
%:%1414=1498%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3089
%:%1415=1499%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3090
%:%1415=1500%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3091
%:%1416=1501%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3092
%:%1417=1502%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3093
%:%1417=1503%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3094
%:%1418=1504%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3095
%:%1419=1505%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3096
%:%1420=1506%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3097
%:%1421=1507%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3098
%:%1422=1508%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3099
%:%1423=1509%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3100
%:%1424=1510%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3101
%:%1425=1511%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3102
%:%1426=1512%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3103
%:%1427=1513%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3104
%:%1428=1514%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3105
%:%1429=1515%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3106
%:%1430=1516%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3107
%:%1431=1517%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3108
%:%1432=1518%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3109
%:%1433=1519%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3110
%:%1434=1520%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3111
%:%1435=1521%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3112
%:%1436=1522%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3113
%:%1437=1523%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3114
%:%1438=1524%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3115
%:%1439=1525%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3116
%:%1440=1526%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3117
%:%1441=1527%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3118
%:%1442=1528%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3119
%:%1443=1529%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3120
%:%1444=1530%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3121
%:%1445=1531%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3122
%:%1446=1532%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3123
%:%1447=1533%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3124
%:%1448=1534%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3125
%:%1449=1535%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3126
%:%1450=1536%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3127
%:%1451=1537%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3128
%:%1452=1538%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3129
%:%1453=1539%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3130
%:%1454=1540%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3131
%:%1455=1541%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3132
%:%1456=1542%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3133
%:%1457=1543%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3134
%:%1458=1544%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3135
%:%1459=1545%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3136
%:%1460=1546%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3137
%:%1461=1547%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3138
%:%1462=1548%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3139
%:%1463=1549%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3140
%:%1464=1550%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3141
%:%1465=1551%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3142
%:%1466=1552%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3143
%:%1467=1553%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3144
%:%1468=1554%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3145
%:%1477=1558%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3146
%:%1489=1565%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3147
%:%1490=1566%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3148
%:%1491=1567%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3149
%:%1492=1568%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3150
%:%1493=1569%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3151
%:%1494=1570%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3152
%:%1495=1571%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3153
%:%1504=1576%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3154
%:%1516=1580%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3155
%:%1517=1581%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3156
%:%1518=1582%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3157
%:%1519=1583%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3158
%:%1520=1584%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3159
%:%1521=1585%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3160
%:%1522=1586%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3161
%:%1523=1587%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3162
%:%1524=1588%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3163
%:%1525=1589%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3164
%:%1526=1590%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3165
%:%1527=1591%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3166
%:%1528=1592%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3167
%:%1529=1593%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3168
%:%1530=1594%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3169
%:%1531=1595%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3170
%:%1532=1596%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3171
%:%1533=1597%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3172
%:%1534=1598%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3173
%:%1535=1599%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3174
%:%1536=1600%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3175
%:%1537=1601%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3176
%:%1538=1602%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3177
%:%1539=1603%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3178
%:%1540=1604%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3179
%:%1541=1605%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3180
%:%1542=1606%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3181
%:%1543=1607%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3182
%:%1544=1608%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3183
%:%1545=1609%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3184
%:%1546=1610%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3185
%:%1547=1611%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3186
%:%1548=1612%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3187
%:%1549=1613%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3188
%:%1550=1614%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3189
%:%1551=1615%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3190
%:%1552=1616%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3191
%:%1553=1617%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3192
%:%1554=1618%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3193
%:%1555=1619%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3194
%:%1556=1620%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3195
%:%1557=1621%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3196
%:%1558=1622%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3197
%:%1559=1623%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3198
%:%1560=1624%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3199
%:%1561=1625%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3200
%:%1562=1626%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3201
%:%1563=1627%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3202
%:%1564=1628%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3203
%:%1565=1629%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3204
%:%1566=1630%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3205
%:%1567=1631%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3206
%:%1568=1632%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3207
%:%1569=1633%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3208
%:%1570=1634%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3209
%:%1571=1635%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3210
%:%1572=1636%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3211
%:%1573=1637%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3212
%:%1574=1638%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3213
%:%1575=1639%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3214
%:%1576=1640%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3215
%:%1577=1641%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3216
%:%1578=1642%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3217
%:%1579=1643%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3218
%:%1580=1644%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3219
%:%1581=1645%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3220
%:%1582=1646%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3221
%:%1583=1647%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3222
%:%1584=1648%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3223
%:%1585=1649%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3224
%:%1586=1650%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3225
%:%1587=1651%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3226
%:%1588=1652%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3227
%:%1589=1653%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3228
%:%1590=1654%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3229
%:%1591=1655%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3230
%:%1592=1656%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3231
%:%1593=1657%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3232
%:%1594=1658%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3233
%:%1595=1659%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3234
%:%1596=1660%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3235
%:%1597=1661%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3236
%:%1598=1662%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3237
%:%1599=1663%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3238
%:%1600=1664%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3239
%:%1601=1665%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3240
%:%1602=1666%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3241
%:%1603=1667%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3242
%:%1604=1668%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3243
%:%1605=1669%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3244
%:%1605=1785%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3245
%:%1606=1786%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3246
%:%1607=1787%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3247
%:%1608=1788%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3248
%:%1609=1789%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3249
%:%1609=1950%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3250
%:%1610=1951%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3251
%:%1611=1952%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3252
%:%1612=1953%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3253
%:%1613=1954%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3254
%:%1614=1955%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3255
%:%1615=1956%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3256
%:%1616=1957%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3257
%:%1617=1958%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3258
%:%1618=1959%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3259
%:%1619=1960%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3260
%:%1620=1961%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3261
%:%1621=1962%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3262
%:%1622=1963%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3263
%:%1623=1964%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3264
%:%1624=1965%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3265
%:%1625=1966%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3266
%:%1626=1967%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3267
%:%1627=1968%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3268
%:%1628=1969%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3269
%:%1628=1970%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3270
%:%1629=1971%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3271
%:%1629=1972%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3272
%:%1629=1973%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3273
%:%1630=1974%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3274
%:%1630=1975%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3275
%:%1631=1976%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3276
%:%1632=1977%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3277
%:%1633=1978%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3278
%:%1634=1979%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3279
%:%1635=1980%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3280
%:%1636=1981%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3281
%:%1637=1982%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3282
%:%1638=1983%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3283
%:%1639=1984%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3284
%:%1640=1985%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3285
%:%1641=1986%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3286
%:%1642=1987%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3287
%:%1643=1988%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3288
%:%1644=1989%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3289
%:%1645=1990%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3290
%:%1646=1991%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3291
%:%1647=1992%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3292
%:%1647=1993%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3293
%:%1648=1994%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3294
%:%1649=1995%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3295
%:%1650=1996%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3296
%:%1650=1997%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3297
%:%1650=1998%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3298
%:%1651=1999%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3299
%:%1652=2000%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3300
%:%1653=2001%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3301
%:%1653=2002%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3302
%:%1654=2003%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3303
%:%1654=2004%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3304
%:%1655=2005%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3305
%:%1656=2006%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3306
%:%1657=2007%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3307
%:%1658=2008%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3308
%:%1659=2009%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3309
%:%1660=2010%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3310
%:%1661=2011%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3311
%:%1662=2012%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3312
%:%1663=2013%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3313
%:%1664=2014%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3314
%:%1665=2015%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3315
%:%1666=2016%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3316
%:%1667=2017%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3317
%:%1668=2018%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3318
%:%1669=2019%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3319
%:%1670=2020%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3320
%:%1671=2021%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3321
%:%1680=2026%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3322
%:%1692=2030%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3323
%:%1693=2031%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3324
%:%1694=2032%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3325
%:%1695=2033%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3326
%:%1696=2034%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3327
%:%1697=2035%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3328
%:%1698=2036%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3329
%:%1699=2037%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3330
%:%1700=2038%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3331
%:%1701=2039%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3332
%:%1702=2040%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3333
%:%1703=2041%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3334
%:%1704=2042%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3335
%:%1705=2043%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3336
%:%1706=2044%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3337
%:%1707=2045%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3338
%:%1708=2046%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3339
%:%1709=2047%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3340
%:%1710=2048%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3341
%:%1711=2049%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3342
%:%1712=2050%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3343
%:%1713=2051%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3344
%:%1714=2052%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3345
%:%1715=2053%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3346
%:%1716=2054%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3347
%:%1717=2055%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3348
%:%1718=2056%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3349
%:%1719=2057%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3350
%:%1720=2058%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3351
%:%1721=2059%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3352
%:%1722=2060%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3353
%:%1723=2061%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3354
%:%1724=2062%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3355
%:%1725=2063%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3356
%:%1726=2064%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3357
%:%1727=2065%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3358
%:%1728=2066%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3359
%:%1729=2067%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3360
%:%1730=2068%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3361
%:%1731=2069%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3362
%:%1732=2070%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3363
%:%1733=2071%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3364
%:%1734=2072%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3365
%:%1735=2073%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3366
%:%1736=2074%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3367
%:%1737=2075%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3368
%:%1738=2076%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3369
%:%1739=2077%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3370
%:%1740=2078%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3371
%:%1741=2079%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3372
%:%1742=2080%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3373
%:%1743=2081%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3374
%:%1744=2082%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3375
%:%1757=2088%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3376
%:%1760=2089%:%
d4b3b0f942f4 aaastar
Chengsong
parents: 387
diff changeset
  3377
%:%1761=2090%:%