KWIC Design Challenge Monday, May 16, 2011
Contextualized Index set of all circular shifts lines of text program in alphabetical order Monday, May 16, 2011
Contextualized Index are fluffy Clouds Clouds are fluffy great Waterloo is program Waterloo is great Clouds are fluffy ... Monday, May 16, 2011
Contextualized Index are fluffy Clouds Clouds are fluffy great Waterloo is program Waterloo is great Clouds are fluffy ... is great Waterloo fluffy Clouds are Waterloo is great Monday, May 16, 2011
Design! Parnas has 2 designs Garlan & Shaw have 4 designs Monday, May 16, 2011
Flowchart input shifter alphabetizer output Monday, May 16, 2011
Flowchart input shifter alphabetizer output file compressed + indexed RAM {<line,start>} ordered {<line,start>} Monday, May 16, 2011
Encapsulated a.k.a. information hiding Monday, May 16, 2011
Comparison Flow ADT modules can be impl. indep.? no yes change of input file format I I decision to store all text in RAM all +DiskLS decision to compress all +NormalLS decision to index or copy S+A+O C decision to alphabetize or search A+O A Monday, May 16, 2011
Direct Memory Access Master Control Subprogram Call System I/O Input Circular Shift Output Alphabetizer Alphabetized Characters Index Index Output Input Medium Medium Figure 6: KWIC – Shared Data Solution Monday, May 16, 2011
Subprogram Call Master Control System I/O Input Output Alphabetic Characters Circular Shift Shifts Input Output Medium Medium Figure 7: KWIC – Abstract Data Type Solution Monday, May 16, 2011
Implicit Invocation Master Control Subprogram Call System I/O Circular Input Output Alphabetizer Shift Output Input Medium Medium Lines Lines Figure 8: KWIC – Implicit Invocation Solution Monday, May 16, 2011
filters are logically independent of other filters. Input Circular Input Medium Shift Pipe System I/O Output Alphabetizer Output Medium Figure 9: KWIC – Pipe and Filter Solution Monday, May 16, 2011
Shared ADT Events Dataflow Memory Change in Algorithm _ _ + + Change in Data Repn _ + _ _ Change in Function + _ + + Performance + + _ _ Reuse _ + _ + Figure 10: KWIC – Comparison of Solutions Monday, May 16, 2011
Shared ADT Events Dataflow Memory Change in Algorithm _ _ + + Change in Data Repn _ + _ _ Change in Function + _ + + Performance + + _ _ Reuse _ + _ + Figure 10: KWIC – Comparison of Solutions Monday, May 16, 2011
Recommend
More recommend