Skip to content

Commit 7ff93b3

Browse files
committed
power series removed
1 parent 1b6f45e commit 7ff93b3

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

intro.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ \section{Introduction}
5151
that certainly do not match a given (extended) regular expression.
5252

5353
Our algorithms produce lazy streams, which are guaranteed to be
54-
productive. A user can gauge the string size or the
55-
number of generated strings without risking partiality.
54+
productive (i.e., their next element is computed in finite time). A
55+
user can limit the string length or the number of generated strings
56+
without risking partiality.
5657

5758
Source code for implementations in Haskell and in OCaml is available
5859
on GitHub. Examples can be run in a Web App.\footnote{%

main.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\newif\ifsubmit
22
\submitfalse
33
%% 12 pp + bib
4-
\documentclass[sigplan,review,anonymous]{acmart}%
4+
\documentclass[sigplan,authorversion]{acmart}%
55
\settopmatter{printfolios=true,printccs=false,printacmref=false}
66

77
% Encoding and lang

motivation.tex

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -338,17 +338,13 @@ \section{Generation by Cross Section}
338338
\textbf{$n^{th}$ segment of $L$} is $L_n := L \cap \Sigma^n$, the set of
339339
words of length $n$ in $L$. As $L = \bigcup_{n\ge0} L_n$ we
340340
define the \textbf{segment representation of $L$} by the
341-
sequence of all segments, which we can write formally as a
342-
power series\footnote{These power series are different
343-
from formal power series used in formal language theory
344-
\cite{DBLP:books/daglib/0067812,DBLP:books/sp/KuichS86}.}
345-
\begin{gather*}
346-
L = \Sigma_{n=0}^\infty L_nx^n\text.
347-
\end{gather*}
341+
sequence of all segments $(L_n)_{n\ge0}$.
342+
% \begin{gather*}
343+
% L = \Sigma_{n=0}^\infty L_nx^n\text.
344+
% \end{gather*}
348345

349346
The language operations can be expressed on this representation by
350-
standard operations on power series over semirings
351-
$(\Power(\Sigma^*),\cup,\cdot)$ and $(\Power(\Sigma^*), \cup, \cap)$.
347+
standard operations on sequences.
352348
\begin{align}
353349
\label{eq:3}
354350
&\text{Sum:}
@@ -361,9 +357,7 @@ \section{Generation by Cross Section}
361357
& (U \cdot V)_n &= \bigcup_{i=0}^n U_i\cdot V_{n-i}
362358
\end{align}
363359

364-
By applying
365-
the usual spiel of representing a power series by its sequence of
366-
coefficients, all operations become executable.
360+
In a language that supports streams, all operations become executable.
367361
%
368362
As the alphabet $\Sigma$ is finite, each segment $L_n$ is a finite set. Hence, the sum and
369363
Hadamard product yield efficient definitions of language union and intersection. Due to
@@ -423,16 +417,16 @@ \section{Generation by Cross Section}
423417
\paragraph{Kleene Closure}
424418
It is well known that $U^* = (U\setminus\{\varepsilon\})^*$.
425419
Hence, a simple calculation yields an
426-
effective algorithm for computing the coefficients of the power series for $U^*$.
420+
effective algorithm for computing the sequence of cross sections for $U^*$.
427421
\begin{align}
428422
\label{eq:2}
429423
&%\text{Star:}
430424
& (U^*)_0 &= 1
431425
& (U^*)_n &= (U \cdot U^*)_n = \bigcup_{i=1}^n U_i\cdot (U^*)_{n-i}
432426
\end{align}
433427
The key observation is that Equation~\eqref{eq:2} is a proper
434-
inductive definition of the power series for $U^*$. It never touches $U_0$ and the union
435-
only touches the coefficients $(U^*)_{n-1}$ down to $(U^*)_0$. Hence, $(U^*)_n$ is well
428+
inductive definition of the sequence for $U^*$. It never touches $U_0$ and the union
429+
only touches the elements $(U^*)_{n-1}$ down to $(U^*)_0$. Hence, $(U^*)_n$ is well
436430
defined as it only relies on $U$ and previously computed indexes!
437431

438432
\begin{figure}[tp]
@@ -484,7 +478,7 @@ \section{Generation by Cross Section}
484478

485479
Productivity: We can generate productive segment
486480
representations from all extended regular expressions. The implementation of each
487-
operation is guided by corresponding operations on power series.
481+
operation is guided by corresponding operations on streams.
488482

489483
Easy Gauging: To restrict the generated segmented output, say \code{segs}, to words of
490484
length less than a given

ocaml.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ \section{\ocaml Implementation}
1515
and various data structures for segments.
1616
The key idea is that the internal order on words in a segment does not matter
1717
because each segment only contains words of the same length.
18-
All we need is a data structure that supports the power series
18+
All we need is a data structure that supports the stream
1919
operations.
2020
%
2121
To facilitate such experimentation, we implemented the

0 commit comments

Comments
 (0)