isl_input.c: read_map_tuple: do not take separate rational flag
commita870fccbc657519518da41d35498b5c14fdbe6fc
authorSven Verdoolaege <sven@cerebras.net>
Fri, 17 Feb 2023 12:49:13 +0000 (17 13:49 +0100)
committerSven Verdoolaege <sven@cerebras.net>
Fri, 3 Mar 2023 19:50:01 +0000 (3 20:50 +0100)
treea3acd1cd9124ea58f12146907fa0733c5770a8d2
parentc657721355df7476c45932a19e6632d8d669142a
isl_input.c: read_map_tuple: do not take separate rational flag

Instead, determine whether a rational set is being constructed
from the "map" argument.
This is slightly more expensive, but avoids inconsistencies.
In particular, in several places, a rational parameter domain
was being created, while the tuple domain (and the rest
of the expression) was not being created as a rational set.
This could in some cases result in piecewise affine expressions
with a rational domain, even though no rational domain
was explicitly specified in the input, causing the newly
added test case to fail.
In particular, the parsed result (with an incorrect rational domain)
would not be considered equal to the constructed result
(with the correct integral domain).

The problem appears to have been introduce when support for
rational sets was first added in isl-0.10-176-gce84f3f800
(isl_stream_read_map: add partial support for reading rational sets,
Sun Jul 15 09:52:53 2012 +0200).
For example, in isl_stream_read_multi_aff, the parameter domain
was being read as a rational set.

Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
isl_input.c
isl_multi_read_no_explicit_domain_templ.c
isl_test2.cc