[comp.lang.ada] case stmt check algorithm/method

bruno@inmic.se (Bruno Poterie) (05/22/89)

Hello,
as part of a VHDL analyser i have (among others) to write
the range completion checks for the CASE statement. This
is pretty much the same as in ADA, so i do not want to
reinvent the wheel. Could anybody point me to relevant
litterature on the subject, if any? More generaly, papers
or documents on semantic checks methodology (for ADA or
related) would be very helpfull.

Thank you in advance,
Bruno Poterie, IM, Kista, Sverige.   email: bruno@inmic.se

stt@inmet (05/24/89)

The general approach to ensuring that all values
of a range are covered exactly once involves sorting the individual
sub-ranges (using qsort or your favorite sorting method),
and then making sure that there is no overlap between
successive sub-ranges, and in the absence of "others,"
making sure that the sub-ranges "touch" with no
gaps between them.

S. Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138