Open rmonat opened 1 year ago
The problem is that, currently, due to the modulo operator, the expression is considered as non-linear and goes through the same generic linearisation process that outputs an affine expression, without modulo.
Possible fixes are:
ap_ppl_grid_assign_texpr_array
in ppl_grid.cc
to detect the modulo, apply linearization under the modulo only, and feed directly the result to Grid::generalized_affine_image
, instead of always calling ap_generic_assign_texpr_array
, which calls ap_ppl_grid_assign_linexpr
and ultimately Grid::affine_image
after getting rid of the modulo ;EQMOD
.
I'd like the assignment
m = n % 12
to be handled precisely byassign_texpr
in the PPL Grid domain. It currently does not work precisely, while a similar code meeting constraints work when we use theEQMOD
operator. I was wondering if you had any hint as to why this is imprecise, or how to fix it?