We outline an approach to abstract data types (ADTs) that allows an object of the type specified by the ADT to take on one of many possible representations. A dynamic abstract data type (DADT) is dual to dynamic algorithm selection and facilitates profiling of data in conjunction with the profiling of code. It also permits a programmer to delay or ignore details pertaining to data representation and enhance the efficiency of some algorithms by changing representations at run time without writing code extraneous to the algorithm itself. Additionally, we demonstrate that run time optimization of data objects is possible and allows for acceptable performance compared to traditional ADTs. An implementation is presented in Common Lisp.
展开▼