This assignment is to implement an interactive version of the KWIC index system (described in Parnas's On the Criteria To Be Used in Decomposing Systems into Modules) in the Pipe-Filter paradigm. You will be provided with two implementations of the KWIC system - one in Unix shell commands and one in C. You will be asked to extend these implementations with new functionality.
Both versions of the current system accept input at the command line and produce output to the terminal screen. Both versions implement a pipe and filter system that shifts and sorts the input, and then transforms to upper case letters the first word in each line (look at the first example on subsequent pages).
You will be provided with the source code for these systems, as well as source code for two utility programs, diverge and converge - one to split an input stream and one to join two input streams.
The source code for the current system will be made available in the directory ``/afs/cs/academic/class/15675/C++/a1".
Your assignment is to modify the existing code to support the following changes:
Here are sample outputs for the solution to each part of the problem: (The finger part is a real snapshot of some machine, therefore the choice of names has no deep meaning) % solution1.csh and solution2 BENNETT jcrb John C R C R Bennett jcrb John CERIA santi Santiago DAFNA Talmor tdafna DAFNA Talmor tdafna EHT Eric Thayer ERIC Thayer eht GALMES pepe Jose M JCRB John C R Bennett JOHN C R Bennett jcrb JOSE M Galmes pepe M Galmes pepe Jose PEPE Jose M Galmes R Bennett jcrb John C SANTI Santiago Ceria SANTIAGO Ceria santi TALMOR tdafna Dafna TALMOR tdafna Dafna TDAFNA Dafna Talmor TDAFNA Dafna Talmor THAYER eht Eric % solution3.csh BENNETT jcrb John C R C R Bennett jcrb John CERIA santi Santiago DAFNA Talmor tdafna EHT Eric Thayer ERIC Thayer eht GALMES pepe Jose M JCRB John C R Bennett JOHN C R Bennett jcrb JOSE M Galmes pepe M Galmes pepe Jose PEPE Jose M Galmes R Bennett jcrb John C SANTI Santiago Ceria SANTIAGO Ceria santi TALMOR tdafna Dafna TDAFNA Dafna Talmor THAYER eht Eric Remark: TRIVIAL_NAMES = {'tdafna','john','smith','david'} % solution4 Bennett John Ceria Santiago Dafna Talmor Dafna Talmor eht Eric Thayer Galmes Jose jcrb John Bennett Jose Galmes pepe santi Santiago Ceria Talmor Dafna Talmor Dafna Thayer Eric