Keyword In Context Presented by Team 2 Francisco Soria Zhiyu Zhang Xuheng Xu Irene Peysakhov.

Slides:



Advertisements
Similar presentations
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Advertisements

BITS Pilani, Pilani Campus TA C252 Computer Programming - II Vikas Singh File Handling.
Hestia: Aarthi Giridharan Govindarajan Panneerselvam Nirmal Chander Shesha Chandrika Moka Sriram Rajendran Suryanarayanan Ganesh Melarkode Vignesh Swaminathan.
Design Creative Process of transferring the problem into a solution
IS 1181 IS 118 Introduction to Development Tools VB Chapter 06.
Designing the system Conceptual design and technical design
Chapter 3 Data Abstraction: The Walls. © 2005 Pearson Addison-Wesley. All rights reserved3-2 Abstract Data Types Modularity –Keeps the complexity of a.
Software Design Project Phase 2 Team 1: Lisa Anthony Luiza da Silva Erik Hayes Diana Tetelman.
Lecture 23: Software Architectures
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Presentation by: Martin Hoffman
Team 1 Lisa Anthony Luiza da Silva Erik Hayes Diana Tetelman.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
Architectural styles and Case studies 1 | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS.
Introduction to Classes and Objects CS-2303, C-Term Introduction to Classes and Objects CS-2303 System Programming Concepts (Slides include materials.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
C++ fundamentals.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Chapter 7: Architecture Design Omar Meqdadi SE 273 Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to Classes and Objects Outline Introduction Classes, Objects, Member Functions and Data.
KWIC Project – Part 1 Mini-Project to Evaluate Architectural Patterns(Styles) Carl Chesser Ji Li EECS 761.
An Object-Oriented Approach to Programming Logic and Design
CPSC 410: Software Architectural Style (Part I) By the end of this lecture, you will be able to: list various software architectural styles describe advantages.
1 On the Criteria To Be Used in Decomposing Systems into Modules by D.L.Parnas Dec presented by Yuanhua Qu for spring 2003 CS5391.
An Introduction to Software Architecture
Modular Programming. Modular Programming (1/6) Modular programming  Goes hand-in-hand with stepwise refinement and incremental development  Makes the.
Architecture styles Pipes and filters Object-oriented design Implicit invocation Layering Repositories.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Styles.
Lecture 2 Introductory Case Studies Topics Architectural Styles Key Word In Context (KWIC) Other Cases Studies Evolution of Software Engineering January.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architectural Design Identifying system components and their interfaces.
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
Abstraction ADTs, Information Hiding and Encapsulation.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Methods. Methods also known as functions or procedures. Methods are a way of capturing a sequence of computational steps into a reusable unit. Methods.
“Architecture” The outcome of top-level design, reflecting principal design decisions Can (and should) be modified and updated Analogous to architecture.
Claudio Grandi INFN-Bologna CHEP 2000Abstract B 029 Object Oriented simulation of the Level 1 Trigger system of a CMS muon chamber Claudio Grandi INFN-Bologna.
Comparing Designs By Chris McCall. Comparing Designs A decision-making method for deciding between many designs for a single specification Provides a.
Lecture VIII: Software Architecture
1 UMBC CMSC 104, Section Fall 2002 Functions, Part 1 of 3 Topics Top-down Design The Function Concept Using Predefined Functions Programmer-Defined.
1 Chapter : Architecture & User Interface Design.
KWIC example The KWIC [key word in context] system accepts an ordered set of lines; each line is an ordered set of words, and each word is an ordered set.
NCCUCS 軟工概論 Software Design: Modules (KWIC case study)
CompSci 280 S Introduction to Software Development
Software architecture
CS 325: Software Engineering
SOFTWARE DESIGN AND ARCHITECTURE
On the Criteria to Be Used in Decomposing Systems into Modules
C Language VIVA Questions with Answers
Tutorial on BoxScript: A Component-Oriented Language
Part 3 Design What does design mean in different fields?
Prepared by Charlie Meyer, May 2009
CYBERMINER WEB SEARCH ENGINE
Procedural Programming
Layered Style Examples
Architectural Design.
Software models - Software Architecture Design Patterns
An Introduction to Software Architecture
Introduction to Data Structure
CyberMiner Software Architecture Group
Final Project Presentation
PHASE 1 - PRESENTATION Presented By - Karthik Kannambadi Sridhar
Principles of Good Design
Lecture 2b Introductory Case Studies
Module Structure David Parnas Discusses “modularization”
Presentation transcript:

Keyword In Context Presented by Team 2 Francisco Soria Zhiyu Zhang Xuheng Xu Irene Peysakhov

KWIC General Assumptions  I-Invocation Unix or DOS prompt  II-Input More than one files Line are specified in each file  III-Processing Lines are shifted Shifted lines are alphabetized  IV-Output- Processed lines are outputted to stdout.

Object Oriented(OO) Style Object Oriented Style Overview:  Consists of five components: Input, LineStorage, Circular Shift, Alphabetizer, Output  Each component supports design decision and information hiding  Data is accessed through module interfaces.

Main design decisions hidden by by each class:  Input: Source of input  LineStorage: Data Structure and algorithm to store lines.  Circular Shift: Rules and method of shifting lines  Alphabetizer: Rule and methods to alphabetize lines.  Output- Direction (ie terminal/printer), and method used to output lines. Object Oriented(OO) Style

+ String[] getStr() + setup() + Alphabetizer() + sort(String[]) + String[] eliminator(String[]) Alphabetize - int counter; - static String sortedlines[]; LineStorage - String input; - String lines[]; static char charline[][]; - int line_num; + int numWords(int) + setchar() CircularShift - String input; -char charline[][]; static char circularshiftedlines[][]; - int line_no; - int line_no2=0; - int word[][]; + setup() + cs_setchar() + char cs_Char(int, int) + int cs_Word(int) Object Oriented(OO) Style - String[] filenames - String str Input + Input(String [] ) + readStr () + String getStr() Output - String[] prtdata; + print()

Output KWIC_OO main() Input Uses CircularShift csGetChar LineStorage getChar getNumWords getString Alphabetize getStr() Calls Object Oriented(OO) Style

Future change and its effect on modules in Object Oriented Style Future Change in KWIC1 (Main)InputLine StorageCircular ShiftAlphabetizerOutput Input SourceNoYesNo Output DestinationNo Yes Line DelimiterNoYesNo Word DelimiterNo YesNo Storage Data StructureNo YesNo Circular Shift AlgorithmNo YesNo Sort AlgorithmNo YesNo Addition of Module between Shift and SortYesNo YesNo Deletion of AlphabetizerYesNo Yes

Advantages:  Easily changeable as a result of information hiding and separation of concerns between modules  Good reusability of modules Disadvantages:  Costly data storage  Complex design for a simple system Object Oriented(OO) Style

Pipe and Filter Style Pipe and Filter Style Overview:  Five Components: Input, Line Storage, CircularShift, Alphabetize and Output.  Each Components represents a filter.  The output of one filter is input of another, with exception of Input and Output filter.  Input filter only gets its data from main function.  The result of Output filter only goes to user’s terminal.

Pipe and Filter Style Input -char line_delimiter -String raw_data +Input(String[]) +ReadData(String) +String GetData() LineStorage -char line_delimiter -Vector lines +LineStorage(String) +setchar(String) +Vector GetData() CircularShift -Vector vcslines -char[] word_delimiter -int[] word_perline -int num_of_lines +CircularShift(Vector) +cs_setup(Vector) +cs_shift(Vector) +String cs_firstwordlast(String) +Vector GetData() Alphabetize -Vector Sortedlines +Alphabetize(Vector) - sort(Vector) +Vector GetData() Output +print(Vector)

Pipe and Filter Style Filter Data for Input Line Storage Circular Shift AlphabetizeOutput

Pipe and Filter Style KWIC_PIPE Input GetData Input LineStorage GetData LineStorage CircularShift GetData CircularShift Alphabetize GetData Alphabetize Output print main LineStorage CircularShiftAlphabetizeOutput Input senddata Input senddata LineStorage senddata CircularShift senddata Alphabetize print Uses

Pipe and Filter Style Future change and its effect on modules in Pipe and Filter Style Future Change in KWIC1 (Main)InputLine StorageCircular ShiftAlphabetizerOutput Input SourceYes No Output DestinationNo Yes Line DelimiterNoYes No Word DelimiterNo Yes No Storage Data StructureNo Yes Circular Shift AlgorithmNo YesNo Sort AlgorithmNo YesNo Addition of Filter between Shift and SortYes No change is required, if the new filter can accept and produce data in right format Deletion of Alphebetize FilterYesNo

Pipe and Filter Style Constraints:  Filter/Module Constraints: Format of data passed from filter to another will has to be recognized by both filters.  Hardware Constraints: If this system were going to be used for a very large data set, extension of memory in the computer hardware will be required.

Pipe and Filter Style Advantage:  Supports intuitive flow of processing, therefore ease of comprehension  Supports reuse, since each filter can function in isolation by providing data in the form it expects  New filter can be easily added in the process as long as it has the ability to process the Output of its upstream filter and produce data in the form that downstream filter is expected.

Pipe and Filter Style Disadvantage:  Difficult to change when data format is changed between filters.  Upstream and downstream filters may need to be modified, if a filter is removed.  Does not support the concept of information hiding.

Implicit Invocation Style Overview:  Pattern: Input  Implicitly Invoke next event  Next event  etc.  Consists of six components: EventHandler, Input, LineStorage, CircularShift, Alphabetizer, and Output  Input, LineStorage, CircularShift, Alphabetizer and Output are inherited from the Service class  Abstract Data Access in contrast to pipeline Implicit Invocation Style

Input static string[] filenames static String str static char line_delimiter + char getLinedelimiter() + serve() + readStr() + Input () + Input(EventHandler) Implicit Invocation Style LineStorage -String input -String lines[] static char line_delimiter staticchar[] word_delimiter - int num_of_lines static Char charline[][] + char Char(int, int) + getLineNumber() + int num_of_words(int) + serve() + char[] getWorddelimiter() + LineStorage() + LineStorage(EventHandler)

CircularShift -String input -char charline[][] static char circularshiftedlines[][] -char charline[][] -int num_of_lines -int num_of_words -Char charline2[][] -int num_oflines2 + CircularShift() +CircularShift(EventHandler) + setup() + int getLineNumber() +serve() + char cs_Char(int, int) - cs_setchar() + int cs_Word(int) Implicit Invocation Style

Alphabetizer static int counter static sortedlines[] + setup() + serve() + Alphabetizer() - sort(String[] ) +String getString() + alphabetizer() Implicit Invocation Style Output -string[] prtdata + Output() + serve() +Output(EventHandler) + setup() +print()

EventHandler -Vector events - Vector services + Register(String) + sendEvent(String) Implicit Invocation Style Service -String regEvent -String rasEvent -EventHandler eh + Service() +Service(EventHandler) +abstract void serve()

MasterControl Input Output EventHandler CircularShift Alphabetizer LineStorage Implicit Invocation Style 1,2,3,4,5 Represent the order of event Send the Event to EventHandler Implicitly invoke

CircularShift Alphabetizer LineStorage EventHandler MasterControl Output Input Send Event to sendEvent() Implicit Invocation Style

EventHandler Input LineStorage CircularShift Alphabetizer Output Invokes through Serve () Serve() Implicit Invocation Style

Service Input LineStorage CircularShift Alphabetizer Output Inheritance Implicit Invocation Style

Output KWIC_OO main() CircularShift char csGetChar LineStorage char getChar int getNumWords Input String getString Alphabetize String [] getStr() Calls Invokes KWIC

Implicit Invocation Style

Constraints  Computations are invoked implicitly  Requires modules be invoked in the correct order  Requires support of event handling Implicit Invocation Style

Advantages  Supports reusability because module only relies on existence of trigger event.  Easier system evolution  Supports abstract data representation Disadvantages  Low performance  No guarantee Implicit Invocation Style

Exception handling:  Inappropriate invocation to KWIC system  Input file does not exist  Input file is empty  Expected service is not registered for specific event. (Implicit Invocation) Keyword In Context

Summary