# junniest/bach_test_repo

### Subversion checkout URL

You can clone with HTTPS or Subversion.

# Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

# Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
• 2 commits
• 4 files changed
• 1 contributor
Commits on Mar 27, 2012
 ashinkarov Final version? 9a68a82 ashinkarov Merge branch 'master' of github.com:junniest/bach_test_repo 87d67e4
8 paper/dynamic-extensions.tex
 @@ -24,7 +24,8 @@ \subsection{Match Syntax} the left hand side of the match. The \verb|regexp| regular expression is a box standard regular -expression which is defined by the grammar at Fig.~\ref{fig:reggram}. +expression~\cite{regexp} which is defined by the grammar at +Fig.~\ref{fig:reggram}. \begin{figure}[h!] \begin{verbatim} regexp ::= concat-regexp '|' regexp @@ -157,7 +158,7 @@ \subsubsection{Type system} driving force of the inference. First of all, it is easy to define a subset relationship on two regular expressions $r_1 \sqsubseteq r_2$. As we know, we can always build a DFA for -a regular expression and minimize it, which gives us a minimal +a regular expression and minimize it~\cite{dragon-book}, which gives us a minimal possible automaton for the language recognized by a given regular expression. It means that $r_1 \sqsubseteq r_2 \Rightarrow min (det (r_1)) \sqsubseteq min (det (r_2))$. For two minimized @@ -193,7 +194,8 @@ \subsubsection{Type system} In order to propagate type information in the branches obtained from the application of \verb|type| construct, we have to know how to subtract -two regular expressions, which is, again, simple. If $T$ and $S$ are +two regular expressions~\cite{reglang}, which is, again, simple. +If $T$ and $S$ are respective DFA for subtracted types, all we have to do is to construct $C = T \times S$ and make the final states of $C$ be the pairs where $T$ states are final and $S$ states are not.
8 paper/intro.tex
 @@ -3,7 +3,8 @@ \section{\label{sec:intro}Introduction} Very often languages like C/C++ introduce new constructs in their syntax. Some of the constructs require serious modifications of the compiler to be supported properly, but some of them may be purely syntactical, -like, for example, user-defined literals in C++11. In this paper we are +like, for example, user-defined literals in C++11~\cite{cpp11}. In this +paper we are concerned with a system that allows a class of modifications at the level of the programming language itself, without the necessity to modify the compiler. @@ -32,7 +33,7 @@ \section{\label{sec:intro}Introduction} \item %The classical example from C language is a type-cast %syntax. In C, a user can define an arbitrary type using the - \verb|typedef| construct, which makes it impossible + \verb|typedef| construct~\cite{c99}, which makes it impossible to disambiguate the expression \verb|(x) + 5|, unless we know whether \verb|x| is a type or not. It could be treated as a type-casting of an application of unary @@ -119,7 +120,8 @@ \section{\label{sec:intro}Introduction} be different depending on the agreement, however the common case is to say that the unit is a sequence of characters of the same class. The number of classes is normally fixed, however -character belonging to the class may be static as in C preprocessor, +character belonging to the class may be static as in +C preprocessor~\cite{prepr}, where, for example, notion of space cannot be changed, or dynamic as in \TeX, where one could specify that a certain character is a delimiter. Then the substitution itself is a replacement of
55 paper/paper.bib
 @@ -6,6 +6,16 @@ @techreport{c99 Year = {1999} } + +@techreport{cpp11, + Author = {ISO/IEC}, + Institution = {International Organization for Standardization, + Geneva, Switzerland.}, + Title = {ISO/IEC 14882:2011, Information technology -- Programming + languages -- {C++}}, + Year = {2011} +} + @misc{gcc, author = {Free Software Foundation}, title = {{GCC}}, @@ -75,4 +85,49 @@ @article{sac2c keywords = {compiler optimisation, data parallel programming, multithreading, single assignment C}, } +@manual{prepr, + added-at = {2007-03-21T15:27:04.000+0100}, + author = {Stallman, Richard M. and Weinberg, Zachary}, + biburl = {http://www.bibsonomy.org/bibtex/298733f74d0634e006804866030988242/tmalsburg}, + interhash = {48f2e346ba08a6210b4e78113bd40051}, + intrahash = {98733f74d0634e006804866030988242}, + keywords = {macroprocessor macros manual}, + timestamp = {2007-03-21T15:27:04.000+0100}, + title = {The C Preprocessor}, + year = 2005 +} +@article{regexp, + author = {Thompson, Ken}, + title = {Programming Techniques: Regular expression search algorithm}, + journal = {Commun. ACM}, + issue_date = {June 1968}, + volume = {11}, + number = {6}, + month = jun, + year = {1968}, + issn = {0001-0782}, + pages = {419--422}, + numpages = {4}, + url = {http://doi.acm.org/10.1145/363347.363387}, + doi = {10.1145/363347.363387}, + acmid = {363387}, + publisher = {ACM}, + address = {New York, NY, USA}, + keywords = {match, regular expression, search}, +} + +@incollection{reglang, + author = {Yu, Sheng}, + chapter = {Regular languages}, + title = {Handbook of formal languages, vol. 1}, + editor = {Rozenberg, Grzegorz and Salomaa, Arto}, + year = {1997}, + isbn = {3-540-60420-0}, + pages = {41--110}, + numpages = {70}, + url = {http://dl.acm.org/citation.cfm?id=267846.267848}, + acmid = {267848}, + publisher = {Springer-Verlag New York, Inc.}, + address = {New York, NY, USA}, +}
8 paper/regexps.tex
 @@ -1,7 +1,7 @@ \section{\label{sec:regexps}Regular expressions} We have devised a method of implementing match syntax that will be time -effective during pre-processing. We have also created a prototype that +effective during the transformation. We have also created a prototype that ilustrates some of the features described in this article. This section will, in short, describe the approach we selected, for the full description, however, turn to the full paper. @@ -13,8 +13,8 @@ \section{\label{sec:regexps}Regular expressions} using the subset construction algorithm. In order to minimise execution time even further, we minimise the created DFA. -The minimisation algorithm is described in detail in the "Dragon -Book"\cite{dragon-book}. The algorithm creates sets of states that cannot be +The minimisation algorithm is described in detail in the Dragon +Book''\cite{dragon-book}. The algorithm creates sets of states that cannot be distinguished by any input token sequence. Once the algorithm fails to break the sets into smaller ones it stops. These sets of states then become new states of the minimal automaton. @@ -57,7 +57,7 @@ \subsection{DFA grouping} The second option is more complex. In this case we combine the automata created for each of the matches together into a single DFA. This is done in order to -reduce matching time, the automata megring algorithm is described in the full +reduce matching time, the automata merging algorithm is described in the full article. The second option is more interesting, as it allows matching of \verb/n/ independent patterns in $O(l)$ steps, where \verb/l/ is the amount of tokens to be matched. It is important to note as well that our method of

### No commit comments for this range

Something went wrong with that request. Please try again.