Currently, it is not possible to build a program builder that supports efficient expression of the dependence of inner loop parameters on the outer loop index.
body_pt.with_iteration('inner_idx', 'outer_idx').with_iteration('outer_idx', (1, 20))
The reason is that Program.with_iteration only accepts an evaluated range and not a "dynamic value" like argument. This also means that RangeExpression.to_range needs to be altered.