Summary
We would like to annotate a declare block as ghost, so all the statements and declarations it contains are considered to be ghost.
Motivation
Ghost statements in GNAT are severely limited. Only assignments into ghost variables and calls to ghost procedures are considered to be ghost. It would be interesting to be able to do a ghost conditional, or a ghost loop, without having to create a nested subprogram.
Caveats and alternatives
I am not sure where the annotation could be located, as blocks are not entities. Maybe we could write:
declare
...
begin
...
end with Ghost;
Summary
We would like to annotate a declare block as ghost, so all the statements and declarations it contains are considered to be ghost.
Motivation
Ghost statements in GNAT are severely limited. Only assignments into ghost variables and calls to ghost procedures are considered to be ghost. It would be interesting to be able to do a ghost conditional, or a ghost loop, without having to create a nested subprogram.
Caveats and alternatives
I am not sure where the annotation could be located, as blocks are not entities. Maybe we could write: