Aug 23, 2011, 5:40:29 PM (8 years ago)

Use of ccc and Pablo

1 edited


  • docs/HPCA2012/03b-research.tex

    r1339 r1355  
    33\subsection{Parser Structure}
    4 \begin{figure}
    2728The final output reports any well-formedness error detected and its position within the input file.
    29 \subsection{Parallel Bit Stream Compilation}
    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.
    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.
     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.