Skip to content

CIF pretty printer breaks for constants used as indices in tuples that are also field names

Consider the following model:

const int[1..1] i = 1;
group p:
  alg tuple(bool i; int x) box = (true, 3);
  alg int y = box[.i];
end

Applying CIF to CIF transformation (without an actual transformation selected), results in the following model;

const int[1..1] i = 1;
group p:
  alg tuple(bool i; int x) box = (true, 3);
  alg int y = box[i];
end

This model is broken, as i in box[i] references field i, whereas it should reference constant i.

Edited by Ferdie Reijnen