csupp.tex
author zhang
Fri, 02 Sep 2011 14:29:54 +0000
changeset 230 6bb8ad9093e6
parent 229 2087fc59f2a1
child 232 114064363ef0
permissions -rwxr-xr-x
More modification by Xingyuan.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     1
\documentclass{article}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     2
\usepackage{a4wide,ot1patch}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     3
\usepackage[latin1]{inputenc}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     4
\usepackage{multicol}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     5
\usepackage{charter}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     6
\usepackage{amsmath,amssymb,amsthm}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     7
\usepackage{fancyheadings}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     8
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
     9
\addtolength{\oddsidemargin}{-6mm}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    10
\addtolength{\evensidemargin}{-6mm}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    11
\addtolength{\textwidth}{11mm}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    12
\addtolength{\columnsep}{3mm}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    13
\addtolength{\textheight}{8mm}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    14
\addtolength{\topmargin}{-7.5mm}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    15
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    16
\pagestyle{fancyplain}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    17
\lhead[\fancyplain{}{A}]{\fancyplain{}{}}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    18
\rhead[\fancyplain{}{C}]{\fancyplain{}{}}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    19
\renewcommand{\headrulewidth}{0pt}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    20
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    21
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    22
\begin{document}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    23
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    24
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    25
\begin{center}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    26
\begin{tabular}{c}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    27
\\[-5mm]
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    28
\LARGE\bf Certified Parsing\\[-10mm]
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    29
\mbox{}
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    30
\end{tabular}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    31
\end{center}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    32
\thispagestyle{empty}
228
87a8dc29d7ae latest changes
urbanc
parents: 227
diff changeset
    33
\mbox{}\\[-5mm]
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    34
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    35
\begin{multicols}{2}
228
87a8dc29d7ae latest changes
urbanc
parents: 227
diff changeset
    36
\section*{Background}
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    37
\noindent
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    38
Parsing is the act of transforming plain text into some
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    39
structure that can be analysed by computers for further processing.
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    40
One might think that parsing has been studied to death and after
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    41
\emph{yacc} and \emph{lex} no new results can be obtained in this area.
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    42
However recent results and novel approaches make it increasingly clear,
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    43
that this is not true anymore.
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    44
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    45
We propose to approach the subject of parsing from a certification point
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    46
of view. Parsers are increasingly part of certified compilers, like \mbox{\emph{CompCert}},
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    47
which are guaranteed to be correct and bug-free. Such certified compilers are
228
87a8dc29d7ae latest changes
urbanc
parents: 227
diff changeset
    48
crucial in areas where software just cannot fail. However, so far the
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    49
parsers of these compilers have been left out of the certification.
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    50
This is because parsing algorithms are often adhoc and their semantics
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    51
is not clearly specified. Unfortunately, this means parsers can harbour
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    52
errors that potentially invalidate the whole certification and correctness
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    53
of the compiler. In this project, we like to change that.
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    54
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    55
Only in the last few years, theorem provers have become good enough
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    56
for establishing the correctness of some standard lexing and
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    57
parsing algorithms. For this, the algorithms need to be formulated
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    58
in way so that it is easy to reason about them. In earlier work
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    59
about lexing and regular languages, the authors showed that this
227
9c281a4b767d small change
urbanc
parents: 225
diff changeset
    60
precludes well-known algorithms working over graphs. However regular
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    61
languages can be formulated and reasoned about entirely in terms
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    62
regular expressions, which can be easily represented in theorem
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    63
provers. This work uses the device of derivatives of regular
227
9c281a4b767d small change
urbanc
parents: 225
diff changeset
    64
expressions. We like to extend this device to parsers and grammars.
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    65
The aim is to come up with elegant and useful parsing algorithms
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    66
whose correctness and the absence of bugs can be certified in a
228
87a8dc29d7ae latest changes
urbanc
parents: 227
diff changeset
    67
theorem prover.
87a8dc29d7ae latest changes
urbanc
parents: 227
diff changeset
    68
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    69
\section*{Proposed Work}
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    70
230
6bb8ad9093e6 More modification by Xingyuan.
zhang
parents: 229
diff changeset
    71
One new development in formal grammar is the Parsing Expression Grammar (PEG) which is proposed as an refinement of standard Context Free Grammar. The aim of this extension is to internalize disambiguition normally done with semantic methods. 
6bb8ad9093e6 More modification by Xingyuan.
zhang
parents: 229
diff changeset
    72
The idea is to introduce negative, conjunctive operators as well as production priorities, so that the grammars written in
6bb8ad9093e6 More modification by Xingyuan.
zhang
parents: 229
diff changeset
    73
PEG are unambiguous in the first place. Another benefit of PEG is that it admits a very efficient linear parsing algorithm.
6bb8ad9093e6 More modification by Xingyuan.
zhang
parents: 229
diff changeset
    74
6bb8ad9093e6 More modification by Xingyuan.
zhang
parents: 229
diff changeset
    75
However, one disadvantage of PEG is that it does not allow left recursion in grammar specification, i.e., standard parsing algorithms of PEG can not deal with left recursion. Although some authors claimed PEG parsing algorithms for left recursion, none of them provide correctness proof, not even in paper-and-pencil form. 
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    76
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    77
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    78
\mbox{}\\[15cm]
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    79
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    80
\noindent
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    81
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    82
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    83
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    84
%\small
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
    85
%\bibliography{../../bib/all}
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    86
%\bibliographystyle{abbrv}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    87
\end{multicols}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    88
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    89
%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    90
%  \noindent {\bf Objectives:} The overall goals of the project are as follows:
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    91
%  \begin{itemize}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    92
%  \item To solve the POPLmark challenge.
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    93
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    94
%  \item To complete and greatly improve the existing implementation of the
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    95
%    nominal datatype package.
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    96
%  \item To explore the strengths of this package by proving the
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    97
%    safety of SML.
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    98
%  \item To provide a basis for extracting programs from safety proofs.
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
    99
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
   100
%  \item To make the nominal datatype package usable for teaching
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   101
%    students about the lambda-calculus and the theory of programming
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   102
%    languages. \smallskip
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   103
%  \end{itemize}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   104
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   105
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   106
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   107
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   108
\end{document}
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   109
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
   110
%%% Local Variables:
225
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   111
%%% mode: latex
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   112
%%% TeX-master: t
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   113
%%% TeX-command-default: "PdfLaTeX"
bc3ffe0dd1d8 added a start for a proposal
urbanc
parents:
diff changeset
   114
%%% TeX-view-style: (("." "kpdf %s.pdf"))
229
2087fc59f2a1 One passage added.
zhang
parents: 228
diff changeset
   115
%%% End: