I want to compare min, max of values of two subtypes. In Ada language it is possible to assign between two different subtypes, for example
procedure Example_1 is
subtype Type_1 is Integer range 0 .. 10;
subtype Type_2 is Integer range 0 .. 30;
A : Type_1 := 0;
B : Type_2 := 12;
begin
A := B;
end Example_1;
At run time A := B
can give range overflow error. In ASIS, is it possible to compare subtypes, min/max values of subtypes (integer, real, enumeration types) so that I can identify overflow problem before run-time?