The abstract specification illustrates the role of an ADT as a purely logical definition of a new data type.
An ADT consist of two parts- a value defination and an operator defination. The value defination defines the collection of the value for the ADT and consist of two parts- a definition clause and a condition clause. Immediately following the value definition comes the operator definition. Each operator is defined as an abstract function with three parts - a header, the optional preconditions and the post conditions. The header specify any restrictions that must be setisfied before the operation can be applied. The post cordition specifies what the operation does.
Implementation- an ADT means providing the procedure or production for each abstrct operation. The ADT instance are represented bt some concrete data struction that is manipulated by those procedure, according to the ADT's specification.
No comments:
Post a Comment