KWIC Design Challenge Monday, May 16, 2011 Contextualized Index - - PowerPoint PPT Presentation

kwic
SMART_READER_LITE
LIVE PREVIEW

KWIC Design Challenge Monday, May 16, 2011 Contextualized Index - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

KWIC

Design Challenge

Monday, May 16, 2011

slide-2
SLIDE 2

Contextualized Index

lines of text set of all circular shifts in alphabetical order

program

Monday, May 16, 2011

slide-3
SLIDE 3

Contextualized Index

Clouds are fluffy Waterloo is great are fluffy Clouds great Waterloo is Clouds are fluffy ...

program

Monday, May 16, 2011

slide-4
SLIDE 4

Contextualized Index

Clouds are fluffy Waterloo is great are fluffy Clouds great Waterloo is Clouds are fluffy ...

program

is great Waterloo fluffy Clouds are Waterloo is great

Monday, May 16, 2011

slide-5
SLIDE 5

Design!

Parnas has 2 designs Garlan & Shaw have 4 designs

Monday, May 16, 2011

slide-6
SLIDE 6

Flowchart

input shifter alphabetizer

  • utput

Monday, May 16, 2011

slide-7
SLIDE 7

Flowchart

input shifter alphabetizer

  • utput

file compressed + indexed RAM {<line,start>}

  • rdered {<line,start>}

Monday, May 16, 2011

slide-8
SLIDE 8

Encapsulated

a.k.a. information hiding

Monday, May 16, 2011

slide-9
SLIDE 9

Comparison

Flow ADT modules can be impl. indep.? change of input file format decision to store all text in RAM decision to compress decision to index or copy decision to alphabetize or search

no yes I I all +DiskLS all +NormalLS S+A+O C A+O A

Monday, May 16, 2011

slide-10
SLIDE 10

Master Control Input Circular Shift Alphabetizer Output Input Medium Characters Index Alphabetized Index Output Medium Direct Memory Access System I/O Subprogram Call

Figure 6: KWIC – Shared Data Solution

Monday, May 16, 2011

slide-11
SLIDE 11

Master Control Input Output Input Medium Output Medium System I/O Subprogram Call Characters Circular Shift Alphabetic Shifts

Figure 7: KWIC – Abstract Data Type Solution

Monday, May 16, 2011

slide-12
SLIDE 12

Output Medium Master Control Input Output Input Medium Lines Circular Shift Alphabetizer Lines System I/O Subprogram Call Implicit Invocation

Figure 8: KWIC – Implicit Invocation Solution

Monday, May 16, 2011

slide-13
SLIDE 13

filters are logically independent of other filters.

Input Output Input Medium Output Medium Circular Shift Alphabetizer System I/O Pipe

Figure 9: KWIC – Pipe and Filter Solution

Monday, May 16, 2011

slide-14
SLIDE 14

_ _ + + _ Shared Memory ADT Events Dataflow _ + _ + + + _ + _ _ + _ + _ + Change in Algorithm Change in Data Repn Change in Function Performance Reuse

Figure 10: KWIC – Comparison of Solutions

Monday, May 16, 2011

slide-15
SLIDE 15

_ _ + + _ Shared Memory ADT Events Dataflow _ + _ + + + _ + _ _ + _ + _ + Change in Algorithm Change in Data Repn Change in Function Performance Reuse

Figure 10: KWIC – Comparison of Solutions

Monday, May 16, 2011