Abstract
Let's get started? In the previous two Gems, we saw how aspects Static_Predicate and Dynamic_Predicate can be used to state properties of objects that should be respected at all times. This third and final Gem in the series is concerned with an aspect called Type_Invariant. The Type_Invariant aspect can be used with private types, to define a property that all objects of the types should respect outside of the package where the types are declared. Take for example a type Communication storing the messages between various parties, based on the Message type used in the previous Gem:
Recommendations
Gem #147: Su(per)btypes in Ada 2012 - Part 2
Let's get started? The previous Gem in this series showed how the aspect Static_Predicate can be used to state properties of scalar objects that should be respected at all times. This Gem is concerned with the Dynamic_Predicate aspect, which can be used ...
Gem #146: Su(per)btypes in Ada 2012 - Part 1
Let's get started? Ada 2012 is full of features for specifying a rich set of type properties. In this series of three Gems, we describe three aspects that can be used to state invariant properties of types and subtypes. This first Gem is concerned with ...
Gem #37: bounded buffer package in GNAT hierarchy (part 2)
Ada Gem #37 --- Part 1 of this Gem briefly introduced bounded buffers, protected types, and the declaration of the generic package GNAT. Bounded_Buffers, exporting protected type Bounded_Buffer. In Part 2 of the Gem we examine the private part of ...






Comments