1 / 8

Module Structure

Module Structure. David Parnas “On the Criteria To Be Used in Decomposing Systems into Modules” Comm. ACM 15, 12 (Dec. 1972), 1053-1058 Discusses “modularization” Module = a collection of subroutines and data elements

etoile
Download Presentation

Module Structure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Module Structure • David Parnas • “On the Criteria To Be Used in Decomposing Systems into Modules” • Comm. ACM 15,12 (Dec. 1972), 1053-1058 • Discusses “modularization” • Module = a collection of subroutines and data elements • Describes two ways to modularize a program that generates KWIC (Key Word in Context) indices. • Modularization 1 • Based on the sequence of steps to perform • Modularization 2 • Based on the principle of “information hiding” CSC407

  2. KWIC • Input Designing Software for Ease of ConstructionFigs are Good • Output Designing Software for Ease of Construction Software for Ease of Construction Designing for Ease of Construction Designing Software Ease of Construction Designing Software for of Construction Designing Software for Ease Construction Designing Software for Ease of Figs are Good are Good Figs Good Figs are CSC407

  3. Input Circular Shift Alphabetizer Output Characters Index AlphabetizedIndex KWIC Modularization 1 Master control Input medium Output medium CSC407

  4. Input Output setc(i,w,j,c) getc(i,w,j) Words(i) cssetup getc(i,w,j) words(i) alph Ith(i) Lines Circular Shifter Alphabetizer KWIC Modularization 2 Master control Input medium Output medium CSC407

  5. Crieria for decomposition • Modularization 1 • Each major step in the processing was a module • Modularization 2 • Information hiding • Each module “has a secret” • Each module is characterized by its knowledge of a design decision which it hides from all others. CSC407

  6. General Comparison • General • Note: both systems might share the same data structures and the same algorithms • Differences are in the way they are divided into work assignments • Systems are substanitally different even if identical in the runnable representation • Possible because the runnable representation is used only for running • Other representations are used for • Changing • Documenting • Understanding • … CSC407

  7. Changeability Comparison • Design decisions that may change • Input format • (1, 1) • All lines stored in memory • (all, 1) • Pack characters 4 to a word • (all, 1) • Make an index for circular shifts rather than store them • (3,1) • Alphabetize once, rather than either • Search for each item as needed • Partially alphabetize, partially search • (3,1) CSC407

  8. Independent Development • Modularization 1 • Must design all data structures before parallel work can proceed • Complex descriptions needed • Modularization 2 • Must design interfaces before parallel work can begin • Simple descriptions only • Comprehensibility • Modularization 2 is better • Parnas subjective judgment CSC407

More Related