Ada: Add volatile abstract state to Interfaces.C.Strings creation functions
Adds volatile abstract state to C string creation functions in Ada to accurately model new pointer values for verification.
This commit introduces a volatile abstract state to the creation functions in Interfaces.C.Strings to model the value of newly created pointers accurately. This addition is necessary for verification purposes, ensuring that the behavior of these functions is correctly represented in abstract models.
In Details
The Interfaces.C.Strings package in Ada provides interoperability with C strings. The introduction of a volatile abstract state, C_Addresses, in libgnat/i-cstrin.ads allows the modeling of the value of the new pointer being created by New_String and New_Char_Array. This is crucial for verification tools to accurately represent the behavior of these functions.
For Context
When interfacing with C code from Ada, it's essential to manage memory and pointers correctly. This commit enhances the Interfaces.C.Strings package, which provides tools for working with C strings in Ada, by adding a volatile state to accurately model the behavior of memory allocation functions. This improvement is aimed at supporting formal verification, which helps ensure the correctness and reliability of code that mixes Ada and C.