1MODULE libadt; 2<* Warnings := FALSE *> 3 4(**Some words on the module hierarchy layout of ADT: 5 6 @itemize 7 @item 8 All modules of this library implementing abstract data types use the prefix 9 @samp{ADT:}. Test modules are not considered part of the library. They 10 reside in the top-level namespace, have @samp{Test} as prefix, and are not 11 installed together with the library modules. 12 13 @item 14 New datatypes are defined in @samp{ADT:*} modules. 15 16 @item 17 Extensions of datatypes or implementations of abstract types should also use 18 @samp{ADT:*} names. This avoids a deeply nested namespace for families of 19 datatypes structured through inheritance. 20 21 @item 22 Specialized implementations of an existing datatype that do not add any 23 relevant functionality use the name of the more general implementation as 24 prefix. Example: 25 26 @table @asis 27 @item ADT:Dictionary 28 The general purpose implementation of a dictionary. It maps objects to 29 object references. 30 31 @item ADT:Dictionary:IntValue 32 A version of a dictionary that maps objects to @code{LONGINT} values, 33 instead of object references. The same could be achieved using the 34 @samp{ADT:Dictionary} implementation, at the cost of wrapping all integer 35 values into objects. 36 37 The user is encouraged to give such modules a more sensible name on import, 38 for example @samp{IMPORT Dictionary := ADT:Dictionary:IntValue}. 39 @end table 40 41 The documentation of the general implementation should provide links to the 42 specialized versions. 43 44 @item 45 Modules providing services or algorithms for data types, but do not define a 46 new data type themselves, use the name of the base module as prefix. For 47 example, a serialization implementation is in module 48 @omodule{*ADT:Object:Storage}, because it implements the abstract rider 49 interface defined in @omodule{*ADT:Storable}. 50 @end itemize 51 52 It is expected that the @samp{ADT:*} namespace will be quite flat and broad. *) 53 54 55IMPORT 56 ADT:Storable, 57 ADT:StringBuffer, 58 ADT:ArrayList, 59 ADT:LinkedList, 60 ADT:Dictionary, 61 ADT:Dictionary:IntValue, 62 ADT:Dictionary:AddressKey, 63 Address2Int := ADT:Dictionary:AddressKey:IntValue, 64 65 ADT:Object:Storage, 66 ADT:Comparator, 67 ADT:Arrays, 68 69 StringSearch, 70 StringSearch:SubstringBF, 71 StringSearch:SubstringBM, 72 StringSearch:RegexpParser, 73 StringSearch:RegexpDFA, 74 StringSearch:NoMatch; 75 76END libadt. 77