wiki:PabloLanguage

Version 1 (modified by cameron, 7 years ago) (diff)

--

Pablo: A Language and Compiler for Parallel Bit Stream Programming

Bitwise Logic

The operators | (or), & (and), ^ (xor), ~ (not) are supported as well as the corresponding operators for the first three: |=, &=, ^=.

Scanning Operations

  • pablo.ScanThru(m, c)
  • pablo.ScanTo(m, c)
  • pablo.AdvanceThenScanThru(m, c)
  • pablo.AdvanceThenScanTo(m, c)

Spanning Operations

Given bitstreams marking the starts and ends of constructs of interest, Pablo defines the following span operations.

  • pablo.SpanUpTo(s, e) - all positions starting from and including positions in s, up to but not including e
  • pablo.ExclusiveSpan(s, e) - all positions between s and e, not including either
  • pablo.InclusiveSpan(s, e) - all positions between s and e, including both s and e as well

Error Streams

  • pablo.assert_0(errstrm, errcode) asserts that any 1 bits in errstrm represent errors of type errcode

Pablo may use error assertions to optimize; that is, the compiler may optimize assuming that the all bits in the asserted error stream are indeed 0.