Open michaelbjames opened 3 years ago
The program will also check if that "questionable" spec is expanded to be entirely inductive:
(xs: {List Int | _v == Nil || _v == (Cons 1 Nil) || _v == Cons 2 (Cons 1 Nil) || _v == (Cons 3 (Cons 2 (Cons 1 Nil))) } -> {List Int | _v == xs})
This raises the question if we would want a normalization process to prevent this kind of spec problem.
Consider this program specification:
It fails to check that compress satisfies the last refinement intersection with the error:
Confusingly, to me, this program checks if I change the last spec. Instead of:
(xs: {List Int | _v == Cons 2 (Cons 1 Nil) || _v == (Cons 3 (Cons 2 (Cons 1 Nil))) } -> {List Int | _v == xs})
I break it in two, to:The whole program and refinement passes.
I'm not sure why this is.