Rewrite parallelism framework