procedure Main is
   package Stacks is
      type Stack is private
        with Type_Invariant => Valid (Stack);
      function Valid (S : Stack) return Boolean;
   private
      type Stack is record
         Top : Natural := 0;
      end record
        with Type_Invariant => Stack.Top <= 20;
      function Valid (S : Stack) return Boolean is (S.Top <= 10);
   end Stacks;
begin
   null;
end Main;
