add isl_basic_set_coefficients test cases
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Sat, 25 Jan 2020 17:45:54 +0000 (25 18:45 +0100)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Sun, 9 Feb 2020 22:20:20 +0000 (9 23:20 +0100)
The next commits will make changes to the isl_basic_set_coefficients
implementation.  Add some test cases that will be computed differently
after those commits.  In particular, add some test cases where
the input can be factored, including a linearly transformed product and
a rational case.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_test.c

index a1b45ad..57d2c4e 100644 (file)
@@ -10001,6 +10001,16 @@ struct {
          "{ rat: coefficients[[cst] -> [a]] }" },
        { "{ rat: [i] : }",
          "{ rat: coefficients[[cst] -> [0]] : cst >= 0 }" },
+       { "{ [0:,1,2:3] }",
+         "{ rat: coefficients[[c_cst] -> [a, b, c]] : "
+               "a >= 0 and 2c >= -c_cst - b and 3c >= -c_cst - b }" },
+       { "[M, N] -> { [x = (1 - N):-1, -4x:(M - 4x)] }",
+         "{ rat: coefficients[[c_cst, c_M = 0:, c_N = 0:] -> [a, b = -c_M:]] :"
+               "4b >= -c_N + a and 4b >= -c_cst - 2c_N + a }" },
+       { "{ rat : [x, y] : 1 <= 2x <= 9 and 2 <= 3y <= 16 }",
+         "{ rat: coefficients[[c_cst] -> [c_x, c_y]] : "
+               "4c_y >= -6c_cst - 3c_x and 4c_y >= -6c_cst - 27c_x and "
+               "32c_y >= -6c_cst - 3c_x and 32c_y >= -6c_cst - 27c_x }" },
 };
 
 struct {