Please refer to the Find-Primes example before starting with this example.
First, define the CnC graph for the partition string example:
This graph is a little more interesting than the Find-Primes example since it has two Steps:
createSpan produces Items for the
span Item Collection. This in turn trigger the prescription of the
processSpan step which writes results to the
results Item Collection. The environment reads off these values from the
results Item Collection.
Next, run the CnC-Python translator:
Next, we need to provide the python implementations for the Steps using the generated templates (as explained in the Find-Primes example ). Note the implementation of the
createAwaitsList function in both the python Step classes which defines the input dependences on values from the Item Collections.
Running this program with an input of
lllllllllaaaaaaaammmmmmmeeeeeeeeeeeeeee should produce the following output: