Modularization for the KWIC System ================================== as resulting from the discussion in the lectures on Nov. 26 / Dec. 3, 2002 first modularization ==================== input ----- interfaces: - in: lines of characters - out: array/list of lines of characters, end-of-word markers - take care that data format suits the needs of all the following modules sub-modules: - distinguish word boundaries - check for legal input permutations ------------ interfaces: - in: array/list of lines of characters, end-of-word markers - out: a permuted array/list of ... sort ---- interfaces: - in: (same as above) - out: (same as above, but sorted) output ------ interfaces: - in: (same as above) - out: printout/file with printout, formatted nicely sub-module: - inverse of: distinguish word boundaries question: -.-.-.-.- - are these write-time modules? alternative modularization ========================== input and output ---------------- sub-modules: - ... interfaces: - in: - out: permutation and sorting ----------------------- sub-modules: - ... interfaces: - in: - out: reason for this choice: -.-.-.-.-.-.-.-.-.-.-.- - input and output are related (people are usually experts for both) - permutation and sorting are related (people are usually experts for both) problem: -.-.-.-. - the interface of the "input and output" module is rather big and complex criteria for a good modularization ================================== - create a write-time modularization - assign to different people - separate different functionality - we want to use separate people/experts for writing "input" and "output" - have tiny but precisely specified interfaces - interfaces between modules should match