Skip to content

Commit f843206

Browse files
committed
Add a warning in the UG about ghost code removal
To make it clear that the verification is only sound when the same options are passed to GNATprove and to compilation regarding ghost code removal.
1 parent 671fc14 commit f843206

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/ug/en/source/specification_features.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,18 @@ executable. For example on Unix-like platforms::
23612361

23622362
nm <object files or executable> | grep my_unit
23632363

2364+
.. warning::
2365+
2366+
Using :ref:`Assertion Levels` or :ref:`Pragma Assertion_Policy`, it is
2367+
possible to decide which ghost code, assertion, or contract is kept at
2368+
execution and which is discarded.
2369+
If some ghost code is enabled in the final executable, then it
2370+
is necessary for the soundness of the verification to ensure that disabled
2371+
ghost code cannot affect ghost code that is enabled at execution.
2372+
The necessary compatibility checks are performed
2373+
by |GNATprove| by default, provided it is given the same directives with
2374+
respect to ghost code removal as those used for the final executable.
2375+
23642376
.. index:: quantified-expression
23652377

23662378
Quantified Expressions

0 commit comments

Comments
 (0)