A question came to my mind when I wanted to write some assertions, I failed to (not in ATS, but I project the question to ATS).
Say I have something named A, from which I derive things named B, C, etc (there are a few). I have functions, which, from B, C, etc, retrieves things which belongs to A, and I want to assert this latter property. These functions don't need an A as an argument, which made me think this would require what SPARK names “ghost variable”: needed for a proof, but not needed for the execution, which make it close to ATS's static variables.
While close to ATS's static variables as I understand it, it's directly related to dynamic variables, as it is as if a dynamic value was there during a proof, but is not there during the execution.
Is this one of the purpose of static variables too? Is this feasible with static variables?
To go further, if this A is to be freed early, can I keep a “virtual” copy of it (in a static variable) for proofs?
I feel the answer is rather No, while I'm not sure, thus the question.
If the answer is really No, may be an option with this kind of cases, is to show B, C, etc, are other forms or representations of A (before freeing A), may be via proving the existence of a reciprocal function, but that's not the same question.
P.S. For the short story, if I failed to write these assertions, that's because it would require to keep alive some data which are is not strictly needed anymore, and I decided to avoid this waste and encumbrance of extraneous arguments, thinking I will be back to this when re-writing into ATS, with the hope it will be better suited to this.