Rationale for Ada 2012
9.3.6 Type and package invariants
This defined further pragmas similar to those in
the previous proposal but concerned with packages and types. Thus the
pragma Package_Invariant proposed for Ada
2005 identified a function returning a Boolean result. This function
would be implicitly called after the call of each subprogram in the package
and if the result were false the behaviour would be as for an Assert
pragma that failed.
This proposal was also abandoned for Ada 2005. However,
Ada 2012 has introduced type invariants thus
type Stack is private
with Type_Invariant => Is_Unduplicated(Stack);
© 2011, 2012, 2013 John Barnes Informatics.
Sponsored in part by: