Ignore:
Timestamp:
Aug 23, 2011, 5:40:29 PM (8 years ago)
Author:
cameron
Message:

Use of ccc and Pablo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/HPCA2012/03b-research.tex

    r1339 r1355  
    22\label{section:parser}
    33\subsection{Parser Structure}
    4 \begin{figure}
     4
     5\begin{figure}[h]
    56\begin{center}
    67\includegraphics[width=1\textwidth]{plots/parabix_arch.pdf}
     
    2728The final output reports any well-formedness error detected and its position within the input file.
    2829
    29 \subsection{Parallel Bit Stream Compilation}
    30 
    31 
    32 While the description of parallel bit stream parsing in the previous section works conceptually on
    33 unbounded bit streams, in practice, a corresponding C implementation to process input streams into blocks
    34 of size equal to the SIMD register width of the target processor is required. In our work, we leverage the unbounded
    35 integer type of the Python programming language. Using a restricted subset of Python, we prototype and validate the
    36 functionality of applications, such as XML validation and UTF-8 to UTF-16 transcoding. We then compile this Python code
    37 into equivalent block-at-a-time C code. The key question becomes how to transfer information from one block to the next whenever
    38 token scans cross block boundaries.
    39 
    40 The answer lies in carry bit propagation. Since the parallel $scanto$ operation relies solely on bit-wise addition and logical operations,
    41 block-to-block information transfer is captured in entirety by the carry bit associated with each underlying addition operation. Logical operations
    42 do not require information flow across block boundaries. Properly determining, initializing and inserting carry bits into a block-by-block
    43 implementation is tedious and error prone. Thus we have developed compiler technology to automatically transform parallel bit stream
    44 Python code to block-at-a-time C implementations. Details are beyond the scope of this paper, but are described in the on-line
    45 source code repository at parabix.costar.sfu.ca.
    46 
     30Within this structure, all functions in the four shaded modules consist entirely of parallel bit stream
     31operations.  Of these, the Classification function consists of XML character class definitions that
     32are generated using ccc, while much of the U8\_Validation similarly consists of UTF-8 byte class
     33definitions that are also generated by ccc.  The remainder of these functions are programmed using
     34our unbounded bitstream language following the logical requirements of XML parsing.   All the functions
     35in the four shaded modules are then compiled to low-level C/C++ code using our Pablo compiler.   This
     36code is then linked in with the general Transposition code available in the Parabix run-time library,
     37as well as the hand-written Postprocessing code that completes the well-formed checking.
Note: See TracChangeset for help on using the changeset viewer.