"Jean-Pierre Rosen" wrote in message news:qpahbf.s76.ln@hunter.axlog.fr... > Dmitry A. Kazakov a �crit : >> It is difficult to see how an abstract state machine is not a type. The >> very word abstract assumes generalization, reuse and instances. It is types >> and generics, the tools to express the idea of instances. >> > Sorry, but I beg to disagree here. > > Abstraction is about the reduction of a real world objet to those elements > that are relevant for a given point of view. > > A singleton is an abstraction of a single object, and does not need a type. I > don't see anything in the word abstract that assumes generalization. > -- I usually think of this, package Integer_Stack is -- no exported type procedure Push(Data : Integer); -- more operations end Integer_Stack; as a kind of ASM (an object package), where, package Stacker is type Integer_Stack is limited private; procedure Push ... private -- full type definition end Stacker; supports an ADT. In the both cases, there is internal state. In the first, no instances are possible except by putting the package in scope (with Integer_Stack). In the second, the existence of the package simply wraps the ADT, and multiple instances can be declared of the exported type. Perhaps this is an oversimplification, but it works in practice. Richard Riehle