@@ -338,17 +338,13 @@ \section{Generation by Cross Section}
338
338
\textbf {$ n^{th}$ segment of $ L$ } is $ L_n := L \cap \Sigma ^n$ , the set of
339
339
words of length $ n$ in $ L$ . As $ L = \bigcup _{n\ge 0} L_n$ we
340
340
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\ge 0}$ .
342
+ % \begin{gather*}
343
+ % L = \Sigma_{n=0}^\infty L_nx^n\text.
344
+ % \end{gather*}
348
345
349
346
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.
352
348
\begin {align }
353
349
\label {eq:3 }
354
350
&\text {Sum:}
@@ -361,9 +357,7 @@ \section{Generation by Cross Section}
361
357
& (U \cdot V)_n &= \bigcup _{i=0}^n U_i\cdot V_{n-i}
362
358
\end {align }
363
359
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.
367
361
%
368
362
As the alphabet $ \Sigma $ is finite, each segment $ L_n$ is a finite set. Hence, the sum and
369
363
Hadamard product yield efficient definitions of language union and intersection. Due to
@@ -423,16 +417,16 @@ \section{Generation by Cross Section}
423
417
\paragraph {Kleene Closure }
424
418
It is well known that $ U^* = (U\setminus \{ \varepsilon \} )^*$ .
425
419
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^*$ .
427
421
\begin {align }
428
422
\label {eq:2 }
429
423
&% \text{Star:}
430
424
& (U^*)_0 &= 1
431
425
& (U^*)_n &= (U \cdot U^*)_n = \bigcup _{i=1}^n U_i\cdot (U^*)_{n-i}
432
426
\end {align }
433
427
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
436
430
defined as it only relies on $ U$ and previously computed indexes!
437
431
438
432
\begin {figure }[tp]
@@ -484,7 +478,7 @@ \section{Generation by Cross Section}
484
478
485
479
Productivity: We can generate productive segment
486
480
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 .
488
482
489
483
Easy Gauging: To restrict the generated segmented output, say \code {segs}, to words of
490
484
length less than a given
0 commit comments