cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts...

23
Domain-specific Language (DSL) Projects: These projects involve the creation of specialized sublanguages for describing given domains, as well as asking and answering questions each domain. Each sublanguage generally has a syntax, vocabulary and semantics similar to a small subset of a natural language (English in this case) including terminology and concepts related to the domain. Each language should be extendable by extanding its syntax, vocabulary and semantics. Below are descriptions of five domains for which a DSL will be developed. Your general approach may be as follows: A. Determine what types of questions you want to answer in your domain. Look at the examples given for each domain below. - Determine an abstract syntax for entering the facts which will be the domain. - Determine how you will display the facts, check for inconsistencie and make changes. - Determine an abstract syntax for the questions. e.g. How do you <do a particular task>? What is <attribute name> of <object>? Look at the examples given for each domain below. What types of syntax rules are needed to express them? Create abstract syntaxes (such as the above) that can express those questions. - Fill in the blanks and provide the concrete question. example question: What is A’s color? or What is the color of A? - Determine an answer syntax These are generally easier. They are determined by the question’s syntax. For each question syntax, you can define one or more abstract answer syntaxes. - Fill in the blanks and provide the concrete answer. E.g. <object>’s <attribute> is <attrcibute-value>. example answers : A’s color is red, or Color of A is red. Either combination is acceptable. B. Design a an abstract syntax for expressing the facts to create your domain. (Similar to the above) C. Design a general structure and storing the facts. Typically, structure consisting of triples and nested triples are used

Transcript of cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts...

Page 1: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

Domain-specific Language (DSL) Projects:

These projects involve the creation of specialized sublanguages for describing given domains, as well as asking and answering questions each domain. Each sublanguage generally has a syntax, vocabulary and semantics similar to a small subset of a natural language (English in this case) including terminology and concepts related to the domain. Each language should be extendable by extanding its syntax, vocabulary and semantics. Below are descriptions of five domains for which a DSL will be developed.

Your general approach may be as follows:A. Determine what types of questions you want to answer in your domain. Look at the examples given for each domain below.- Determine an abstract syntax for entering the facts which will be the domain.- Determine how you will display the facts, check for inconsistencie and make changes. - Determine an abstract syntax for the questions.e.g. How do you <do a particular task>? What is <attribute name> of <object>? Look at the examples given for each domain below. What types of syntax rules are needed to express them? Create abstract syntaxes (such as the above) that can express those questions.- Fill in the blanks and provide the concrete question. example question: What is A’s color? or What is the color of A?

- Determine an answer syntax These are generally easier. They are determined by the question’s syntax. For each question syntax, you can define one or more abstract answer syntaxes.- Fill in the blanks and provide the concrete answer.

E.g. <object>’s <attribute> is <attrcibute-value>. example answers : A’s color is red, or Color of A is red.

Either combination is acceptable.B. Design a an abstract syntax for expressing the facts to create your domain. (Similar to the above)C. Design a general structure and storing the facts.Typically, structure consisting of triples and nested triples are used to store such facts. Each triple expresses a relation or a fact between two things or groups of things.Examples:(is_name_of, <person>, <name>)(is_at_location, <object>, <coordinate1, coordinate2>)(is_uncle_of, <uncle_name>, <nephew_name> )(is_gamescore_of, (<team>,<team>,<date>),(<integer>,<integer>))

D: Handling the semantics:

For each type of question, as expressed in the first element of the triple, make a general design for:The overall logic, The types of facts needed based on question type, The data structures needed to store the facts, The searches over the triples needed to determine the facts and storing them in the data structures,

Page 2: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

Performing the calculations needed to create the answers from the facts.

Create a code skeleton to accomplish the above and put the answer in the desired answer syntax. Fill in the code details.

Test your algorithm for that type of question. Do lots of testing with different types of inputs for each type of question.

E: (Very Important!) Describe your design in a Design Document for which a format is provided in the project package in the web site. It will be a part of your solution to the project.

1-DSL for Information Retrieval (InfoDSL)

This DSL will operate on documents stored in a folder or on the web. It will permit:

1) Parsing texts of selected documents to extract sentences, words and word-roots using information retrieval (IR) techniques (e.g. leaving out insignificant words), 2) Measuring similarities between documents by using IR techniques,3) Searching for documents on the Web,4) Ordering them by similarity, 4) Grouping them by subject as determined from retrieved information, 5) Creating and saving links to them in an HTML file by subject,6) Identifying pictures and storing them in a folder by subject,7) Saving all folders in a folder with DSL’s name,8) Asking and answering questions about the documents.9) Displaying documents

Some sample question and answer types:

- Which are the 5 documents most similar to document D1? (A measure for similarity must have been defined.)E1,F3,G4,K3 are the 5 documents most similar to D1.- In how many documents are the words “nuclear” and “weapon” used in same document? The words “nuclear” and “weapon” are used together in 17 documents.- Show the 50 most frequent words and their usage in decreasing order . The most frequent 50 words and their usage in decreasing order are:D1,30D2,27D3,27D4,27D5,26…,..- How many unique word-stems are there in document D1? (Note: A word-stem consists of upto first 5 letters of a word.)There are 355 unique word-stems in document D1.- Show me the links for documents E1,F3,G4. <Should display a page containing the desired links.>

- Which documents use the word “atom” the most? F3 uses the word “atom” the most.-Which document contains the most pictures?

Page 3: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

G3 contains the most pictures.

-How many pictures does G3 contain?G3 contains 17 pictures.….,.. ….,.. ….,..…,..

- Which documents came from www.worldnews.com? K2,H8,D10 came from www.worldnews.com.Documents T1,T5,V19 came from www.worldnews.com

2- DSL for simple 2D scene description (2DSceneDSL)

In this project, a Domain Specific Language which provides facilities for defining a scene which contains 2 -dimensional colored geometric objects, groups of objects, and their simultaneous movements will be designed and developed. The objects will be limited to standard regular convex shapes.

The language will provide facilities for describing:i) The scene (dimensions, color)ii) Fixed and movable objects in the scene (coordinates of their vertices and their colors) iii) Executing a scenario that contains descriptions of object movements (direction, speed, duration (or destination, what happens in case of collisions etc.)

The scenario will support statements like (numbers denote pixels):

Origin at top left (0,0).X is a yellow square at 10,5 ;20,15. // Diagonal coordinates. Note that the number of points depends on shape.Y is a red triangle at 20,10;30,10;25,15. Z is a blue point at 4,4.

X is moving east at 1/sec for 2 secs. // east is assumed to be right directionY is moving southeast at 3/sec for 1 sec horizontally and vertically. //southeast means toward right and down.

It will support asking questions about the scene and objects and will provide answers by using the DSL. Sample questions:

What are the positions of X,Y after 3 secs?X is at 12,5; 20,15. // Has moved 2 pixels to the right in 2 secs and stopped.

/* For Y, moving at 3 pixels/sec for 1 sec in each directions will mean each vertex will move 3 pixels in each direction. */

Y is at 23,13;33,13;28,18.

How far is X from Y?

Page 4: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

/* This means how far apart are the centers of X and Y. We need to compute the centers of square X and triangle Y and find their distance.Center of X is at( (12+20)/2), 12+15)/2)= 16,13.5.For a triangle there are many definitions of a center. We’ll use the “centroid” as the center.Coordinates of the centroid of a triangle are found by averaging the x-xoordinates and the y-coordinates.Thus the centroid of Y at its new location is at (23+33+28)/3, (13+13+18)/3 =(28,14.7).Thus the distance between the two centers is ((28-16)^2 + (14.7-13.5)^2) ^0.5 = ((12^2) + (1.2^2))^0.5 =(144+1.44)^0.5 = 12 */

X is 12 pixels far from Y.

What color is Z? Z is blue.

3- DSL for city streets (StreetsDSL)This DSL deals with describing streets and landmarks (important locations) in a part of a city. It will consist of three sub-DSLs, one for describing the layout of streets and landmarks, one for asking questions and one for answering questions.

Each street consists of 1 or more straight parts. Each part can connect to one or more streets at an intersection. DSL will describe streets in the following way. Between any two given points, the street is assumed to run straight.

GHI street runs from 16,12 to 18,18.

ABC street runs from 4,5 to 8,9; crosses DEF; to 15,9; to 16,12; ends at GHI.

DEF street runs from 1,1 to 26,18.

….….

The program will thus build up a plan of the streets.

We then place some “landmarks” (known places) in the map:

Restaurant R1 is at 5,7; R2 is at 17,12.Cinema C1 is at 11,9.Museum M1 is at 14,12.……Let’s assume each square is 100 meters x 100 meters.

City Streets (the scene)

Page 5: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

1234 R1567 DEF ABC891011 C1121314 M11516 R2 GHI17181920 DEF21222324

Page 6: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

25262728

The user can then ask a question like: How do I go from R1 to M1 ?The program should answer something like:

- Go to ABC street. Turn left. - Go until DEF street. Turn left. - Go about 120 meters. It will be on your left.

Page 7: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

4-DSL for Football (FootballDSL)

This DSL deals with football teams and contests. It permits:

Entering,editing, deleting a game history including teams, match scores, who scored the goals and the time of each goal, as well as possibly other details.

Questions and answers will be in a form similar to the following:- How many times did team A beat team B? A beat B 5 times.- How many times did A tie with B? A tied B 3 times.- Who scored most goals in A? Ahmet scored most goals for A.- How many ties were there? There were 12 ties.- What are the current standings? G W L T GF GA P 1. A 10 8 1 1 20 17 25 2.B … 3.C …

(where A,B,C are team names.)….

- How many points does A have? A has 12 points.

- How many matches did A win? A won 4 games.

- What percentage of goals did A score in first half of games? A scored 60 percent of goals in first half of games.

You may add other types of questions.

5- Family tree (FamilyTreeDSL)It will permit:

- Giving people’s names, marriages, children (sons, daughters by name, dates of birth), deaths(date).(We shall ignore divorces and multiple marriages to simplify the problem. First names of people with same last names, i.e. first nam +last name, will be unique.)

- Defining terms such as “father”, “mother” and many others that describe relations mentioned below, in a family, Asking and answering questions about family relationships such as “Who is A’s father”, “How many uncles does B have?”, “Who is C’s maternal grandfather?” as well as others as mentined below. ….

Page 8: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

As many relation names (e.g. uncle, aunt, nephew…) as possible should be supported. Where they do not suffice to express a relationship uniquely by a single word, multiple relation names will be used, e.g. “F is E’s grandfather’s aunt.” See below for more info on relation names in English.

Questions and answers will be in a form similar to the following: Who is A’s father? A’s father is G.What is the relationship between A and G? A is G’s son.Who are G’s children? G’s children are A,B.Who are B’s uncles(or aunts…)? B’s uncles are G,H,I. (Note that unless qualified as “maternal uncle” (“dayı”) or “paternal uncle” (“amca”) , “uncle” means both, i.e. “dayı” and “amca”. Similarly for “aunt”. See below).When did A’s father die? A’s father died on 23 December 1999.

Creating the family tree:

First define the individuals as mentioned above. (name, sex, birthdate, deathdate)There should be at least 30 people.

Define the basic family relationships among the individuals

Relations are defined using triples: (relation_name, first_operand, second_operand).They should be stored in disk as tables, in XML form or a relational database in a user-designed structure.

(is_ son_of, son_name,father_name), similarly for daughter and mother.Note that the person implied by the relationship (“son” in this case) is named first in the relationship.(is_wife_of,wife_name,husband_name)

There should be at least 6 families including husbands’ sides and wives’ sides, with several boys and girls per famiiy.

Since we are ignoring divorces and multiple marriages, all brothers and sisters have same mother and father.Therefore the above definitions are suficient to create a family tree. Families will be seperated by unique family names. Only unique first names will be used within a family, i.e. people with same last name.

The family tree should be built from the above relations only. Higher relations will be introduced by definitions using the basic relations as described below.

Higher Family Relationships

Some Relation Names in English

Page 9: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

Sisters of mother and father (i.e. “teyze” and “hala”) are called “maternal aunts” and “paternal aunts” respectively.

Brothers of mother and father (i.e. “dayı” and “amca”) are called “maternal uncle” and “paternal uncle” respectively)

All brothers and sisters are called “siblings”(“kardeş”).

Mother, father, sister and brother of spouse (both wife or husband) are called “mother-in-law”, “father-in-law”, “sister-in-law” and “brother-in-law” respectively.

Sons and daughters of uncles or aunts are called “cousins”.Children of brothers, sisters or cousins are called nephews(male) or nieces (female).

Some Logic Expressions involving Relations

“ Implies” expressions:The “implies” operator is defined as in formal logic:(A implies B) means whenever A is true B is true. These can be used to identify relations which were not not initially provided.

(is_ son_of, son_name,father_name) implies (is_father_of,father_name,son_name)(is_wife_of,wife_name,husband_name) implies (is_husband_of, husband_name,wife_name)(is_brother_of, person_name1,person_name2) implies (is_brother_of, person_name2,person_name1)(is_uncle_of,person_name1,person_name3) implies (is_nephew_of, person_name3,person_name1) “Conjunctive Implies” expresions (using “and”)

((is_sibling_of, person_name1,person_name2) and (is_child_of, person_name1,parent_name)) implies (is_child_of,person_name2,parent_name.-- since we are ignoring divorces and multiple marriages.

((is_child_of,child_name1,parent_name) and (is_sibling_of,uncle_name,parent_name))implies (uncle_of,uncle_name,child_name1)-- Holds for aunts as well.

Equivalence relationships (Optional info. Use if it will be helpful.)

(equivalence_relation, person_name1,person_name2) implies that all upward relations (toward common ancestors) of person_name1 hold for person_name_2 as well.

E.g. “Is_Sibling_of”, “Is_Parent_of”, “Is_Uncle_ of”, “Is_Aunt_of” relations give the same result for both siblings. As an example, if C is A’s uncle, and B is A’s sibling, then C is B’s uncle also.

Queries which can be submitted

Queries can include higher relations. E.g. “Who are A’s cousins?”What is the relation of “G” to “A”?

Page 10: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

However if ambiguity results, the user should be asked to clarify.E.g “Who are A’s uncle’s children?” Since A can have more than one uncle, and the question was asked in singular form (i.e. uncle’s, not uncles’), only one uncle is to be used. So the user may be warned that the “uncle” is ambigous and that the question must be clarified, e.g. the uncle’name should be givrn or “uncles’” should be used, which implies all uncles.

Often there are multiple possible answers to a question. For example consider the query:What is the relation between “A” and “G”?

Let’s assume “A” is maternal great grandfather of “G”. The most basic (and longest) answer is (note that maternal means on G’s mother’s side).

-A is father of father of mother of G.

Other, shorter answers are:-A is grandfather of mother of G.-A is greatgrandfather of G.

When this is case, the longest and the shortest answers should be given (i.e. first and last answers above).

Another example:Assume K is a son of B’s paternal uncle who is U’s grandson.

Possible answers:K is son of son of son of brother U of father of BK is grandson of son of brother U of father of BK is son of grandson of brother U of father of BK is great grandson of brother U of father of BK is son of grandson of paternal uncle U of BK is great grandson of paternal uncle U of BK is great grand paternal cousin of B (lost uncle U’s name here ).

Only first and last answers should be provided. Rest may be provided optionally.

So the approach for determining relations between two persons starts with determining the most primitive (longest) relation first, and applying transformations to shorten the description (as in above example). These transformations are found from those built given above or transformations based on them, which may be stored in form mentioned above. When no more shortening is possible, the transformation stops and the result is returned.

Page 11: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

Computer Speech Projects

These projects involve using existing packages and making additions to enable the following projects. Speech recognition packages are available in Java and .NET (using C#) for Turkish and English. You should first locate and read some basic literature about Speech Recognition and Production technology in general, and then do a research into the components available for your specific project. Speech recognition may be one word at a time, or several words at a time. The latter is preferable. Speech production is always phrase or sentence-based. The projects involve a report and a presentation on the technologies available for your project and a demo application mentioned in the project description below. You should be able to discuss different aspects of the technology involved in your project.

For a good example, see the GVZ project, www.sestek.com.tr . Be sure to research your topic in Google.Also see books and theses on the subject.

6- English Speech Recognition & Production in .NETThis project will explore English speech recognition and production in .NET . The latter is preferable.Will examine available technology and implement an application such as inventory management using both speech input and speech output. It will create a unique vocabulary, word recognition and command syntax and semantics definition. It will also evaluate phone-based speech recognition and speech output Some details will be provided by instructor.

7- Turkish Speech Recognition & Production in .NETIt will do similar things for Turkish speech recognition and production. It will implement an interactive banking application. Some details will be provided by instructor.

8- English Speech Recognition & Production in JavaIt will do similar things as Project 6 but in Java. Will implement a restaurant meal ordering application.For cell phones, in particular speech input/output in Android, among others can be evaluated. Some details will be provided by instructor.

9- Turkish Speech Recognition & Production in JavaSimilar to Project 7 but in Java. Will implement a travel agency tour information application.In particular speech input/output in Android, among others, can be evaluated. Some details will be provided by instructor.

10- Voice Verification (VV)This project will survey techniques for ensuring that the voice belongs to the person it is supposed to belong to. VV is an alternative to other personal identity verification techniques such as kaptcha, fingerprint and retinal identification. It will implement a project for VV that can be used to access certain directories in a PC. Some details will be provided by instructor.

http://courses.cit.cornell.edu/ee476/FinalProjects/s2006/XL76_SL362/XL76%20SL362/index.html

Page 12: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

11- Simple English-to-Turkish Interpreter (English STT (speech-to-text) input, Turkish TTS (Text-to-speech) output)

a) Simplest case: one word at a time. Oral English-to-Turkish dictionary. English input will be one short word. The Turkish answer may be multiple words.

b) Medium difficulty: Two short words spoken slowly. “My school”, “Soccer ball”, “black dog”… The English input should be grammatically parsed. The Turkish output should be grammatically correct. E.g. “My school” should generate “Benim okulum” or just “okulum”. “Soccer ball” should generate “Futbol topu”, “black dog” should generate “siyah köpek”etc. Only a small set of words (e.g. upto 15) and only a few types of phrases may be allowed (e.g. noun-noun, adjective-noun including appropriate suffixes on Turkish side, e.g. “top-u”, “okul-um”)

c) Advanced: Dialog (two people). Short phrases spoken naturally: Person A: How are you? Nasılsınız?Person B: I am fine. Thank you. İyiyim. Teşekkür ederim…

Note that the system may be trained to accept only the same person or two persons’ speech only. Use of MATLAB-Voicebox or similar system is recommended.

12 - UML Class Diagram Editor and Java (or C#) GeneratorThe aim of this project is to create a tool by which i) Use Case, ii) Class and ii) Sequence diagrams can be drawn on the screen and printed on as few pages as possible (while keeping them readable), and from which Java “code skeletons” (as described below) can be created.

The Use Case diagrams allow an analyst to indicate the users (actors) of a software system and their actions. A use case can later be represented by a single class, with as many subclasses as needed (as shown in the class diagram).

The Class Diagram embodies the classes, their attributes and methods (with return and parameter types, if entered), and their associations with other classes, including multiplicities. Indications of special associations like “ISA”(subclass) , “HAS” (aggregation), uni-direction (arrowhead) are required. Showing rolenames is not required.

The Sequence Diagram shows the sequence of interactions among objects of the classes shown in the Class diagram.

Details are available in the book, in internet sources and books on UML. OCL is not required.

The Code Generation System will create Java class code skeletons corresponding to the classes and calls to other classes as shown in the sequence diagram. It will permit placement of links to as many objects as indicated by the multiplicities.

Page 13: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

13- Configurable Multi-processor Mathematics Machine (CMMM)Given a mathematical function containing calls to other functions, it will analyze the given function and break it up into independently calculatable subfunctions and assign each subfunction to an independent processor. Each processor will do the same thing recursively, until each processor has a directly computable function. As functions are evaluated the results will be returned to the calling processor.

The available processors will be assigned to several classes by the types of functions they can evaluate. Each processor will select a subprocessor appropriate to the function it wants to evaluate.For example, simple arithmetic expressions, nested aritmetic expressions, trigonometric and summation functions, combinatorial functions may be evaluated by different classes of processors. When all the subprocessors have returned their results, the parent processor wil complete its calculation and return the results to its superprocessor. The top-level processor will return results to the user.

The system should be able to process several problems simultaneously. Each processor will contain a list of expression types which can be evaluated by any of its subprocessors.

A standard mathematical expression language will have to be designed. Example expressions:

Def g(x)=x!/sum(x);z=random(0,0.999);t= (sin(pi/3)*tan(z))^g(w);return t;

14-Configurable Multi-Processor Directed-Graph Machine (CMDGM)Given a tree to search for an item, subtrees will be assigned to other available processors. Each processor will do the same thing recursively, assigning subtrees of its own subtree to other available processors. The results of the searches will be returned to calling processor.

The available processors will be assigned to several classes by the types of nodes they can evaluate. Each processor will select a subprocessor appropriate to the node it wants to evaluate. As an example, in parsing simple context-free language grammars, some processors may parse arithmetic expressions, other may parse string expressions, others may parse assignments, yet others may parse input/output commands. When all the subprocessors have returned their results, the parent processor will complete its calculation and return the results to its superprocessor. The top-level processor will return results to the user.

The system should be able to process several problems simultaneously.

A directed-graph description and search language will have to be designed. An example:

<DirectedGraph>

<Nodes>

<Node Id="a" content="Ahmet" birthyear=”1948”/>

<Node Id="b" content="Mehmet" birthyear=”1971”/>

Page 14: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

<Node Id="c" content=”Ayşe” birthyear=”1955”/>

<Node Id="d" content=”Mustafa” birthyear=”1955”/>

</Nodes>

<ImmediateFamily> // constant definitions for immediate family members

<IM Source="a" Target="b" relation=”father-of“/>

<IM Source="c" Target="b" relation=”mother-of“/>

<IM Source="d" Target="a" relation=”brother-of“/>

</ImmediateFamily>

<Relatives> // constant definitions for relatives

<Relative primaryRelation=”father-of” secondaryRelation=”brother-of” relation=”uncle-of”/>

<Relative primaryRelation=”mother-of” secondaryRelation=”sister-of” relation=”aunt-of”/>

.

.

</Relatives>

</DirectedGraph>

Query: What is birthyear of mother of Mehmet?

If there are multiple Mehmets, it will ask for node ID of Mehmet.

Query: Who is aunt of Mehmet?

If there are multiple aunts of Mehmet, it will ask for node ID of Mehmet.If that Mehmet has

multiple aunts, it will display all. Similarly for other relatives.

In in this example, Nodes, Immediate Family, and Relatives may be in different machines.

Thus multiple queries can be processed simultaneously in parallel.

15 - CORPORATE PURCHASING PROJECTThis project requires setting up a purchasing function in an organization. The main scenario involved is as follows:

1. The company requires some parts for its manufacturing operation. It maintains a list of required parts. As parts are purchased, this list is updated. Similarly when new requirements arise, they are added to this list.

2. The company also maintains a list of suppliers for each part. Each part has a company product code and the supplier product code of each supplier for each part. This list also contains a quality rating by users of each supplier’s product.

3. Purchase requests from users are analyzed by the analyst each day and requests for quotation (RFQ) are sent to suppliers of each product.

4. The suppliers respond to the RFQ’s by logging into the customers website and entering their response into a form including the RFQ ID. The response may be: (a) “We do not wish to quote.”, (b) The product they can supply, a unit price, date of delivery.

5. The supplier responses are entered to the database. The analyst notifies the employee which requested the parts by updating the status of the employee’s request. There is a button next to the employee’s request to display the suppliers’ responses.

6. The employee checks the status of his requests and notices that it has been updated. He then examines the supplier responses, and the rating of each product. If the response includes a new product with no rating, its rating appears as blank.

Page 15: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

7. The employee selects which product he wishes to buy from which vendor as well as the quantity, and notifies the analyst by updating the status of his original request. It is possible that he does not accept any of the supplier proposals for certain products.

8. The analyst then logs into the each vendor’s account in and fills in a form including the RFQ ID, and which items from the vendor’s proposal have been approved.

9. Each vendor logs into the system and checks his account to see if any products are being requested from him. If there are any, he creates an Invoice based on the available information, including KDV, and sends it to the customer by e-mail. The invoice should show thedetails of each product purchased, unit KDV-free price, quantity, subtotal and the general KDV-free total, as well as the grand total including KDV.

10. The product requirements table is updated automatically to reflect the fact that the requirement for each product that has been purchased has been satisfied.

Examine the above scenario carefully. Expand on the scenario with some real-life details so it can be automated.

Identify all actors, the actions each one can take, the documents and forms as well as the database tables that are required. Draw a class diagram, a state diagram for a complete purchase request and a sequence diagram for the interactions among the actors and the system. Then develop graphic user interfaces to complete all the required actions.

16.Software Infrastructure for an Organization CompanyAn organization company organizes events for customers. Events typically include trips, lodging, dining, and other activities. The organization company uses vendors, such as hotels, travel agencies, restaurants, to provide required services for these events. The customer can revise its requirements; the vendors can revise their conditions, and the organization itself can revise its proposal to the customer at anytime within deadlines.

This project focuses on handling the complexities of unexpected revisions from any of these parties properly so that the organization project can take place successfully. It also addresses the problems of proposing to the customer multiple alternatives as well as detailed budgets for each alternative to help the customer plan its budget easily, as well as the firm’s own budget.

17.Make a NewspaperThis project involves production of a newspaper. The requirements are as follows:

1. It will be displayable on a 1024*800 screen and printable on 4 pages of A4 size.2. It will have a title block on first page containing the name, date in (nn.m*.yyyy) format where

m* is the month’s name.3. Each subsequent page will contain the paper’s name, date (as above) and page number on top

of each following page.4. Each page will contain up to 4 columns.5. It will contain articles to be picked by the Editor.

Page 16: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

6. Each article contains a title, possibly a subtitle, possibly a picture and the text body.7. The text body may be divided into sections, which may be placed in following pages. In that

case the starting section will contain a phrase at the end indicating the following page (e.g. “continued on page3”). The continuing section will contain a phrase at the beginning ndicating the previous section’s page (“continued from page 1”), and possibly, as well as the “continued on..”) phrase at the end if it continues on a new page. Continuation on more than one page should be avoided where possible. There should be tools to facilitate the composition of articles on more than one page depending on the amount of space and the layout of the current page.

8. Do not use hyphenation (kelimeleri hecelerde kesme) unless it can be automated.9. The picture (if any), the title, the subtitle (if any) will come before the text body.10. The editor will pick the articles to be placed in the current issue, their page and order.11. There will be a Materials Manager who will collect article materials (text and pictures) from

various sources such as newspapers, and others. He may change sizes of title and subtitle characters and pictures.

12. There will be a Production Manager who will try to place the materials selected by the Editor graphically in the newspaper. If he(she) can not fit all the materials, it will omit some material starting with the lowest priority ones.

13. There may have to be small differences in the layouts of display and printed versions. So the Production Manager may prepare a Display version and a Print version of the same paper.Color can be used the Display version but the Print version is assumed to be blace and white.

Study the layout of some newspapers to get more ideas. However, try to keep the project simple.

---------------------------------------------------------------------------

18. Rule-driven Currency Manipulation Get a set of daily currency prices for a long period, e.g. for 5 years from CB. (See

Veriler in CB website) Create different sets of buyers with different objectives (short-term profit, long-term

safety…etc) Create an account for each buyer Each buyer creates a set of rules for buying/selling currencies for his objective.

Rules contain if-then-else rules and nested rules. The conditions testedinclude last or previous price of one of more currencies and possibly other indicators available from the CB or IMKB.

Apply buyers rules to currency prices daily for 6 months. Monitor buyers’ successes on a weekly basis, bi-weekly and monthly bases. If you wish

you can monitor other economic indicators available publicly. Try to discern patterns in successes of buyers’ rule sets. Create your own rules after every 6 months based on historical data and rule-sets

performances.

Page 17: cse.yeditepe.edu.trkserdaroglu/fall2011/cse344/term... · Web viewIt will permit: 1) Parsing texts of selected documents to extract sentences, words and word-roots using information

19.Programmable Robot Kit SimulatorContians arms, hands, legs, feet, body, head (with face) and brain. Shows movements on screen. Version 1 implements only 1 dimensional physical movement although it will permit moving of arms, legs, hands etc..in two dimensions.

The brain contains the main program. Other parts contain classes with functions that can drive their motors (i.e. muscles). Motor specifications are taken from commercially available (or can be available!) from the market or from robot kits.

Brain and organs communicate by a bus called Spinal cord. The spinal cord contains any number of “full duplex” communication busses to every organ. Each organ may also contain its own neural network to drive the extremities (fingers, toes, facial features etc.).

Suggestions: Parts are defined in the brain as a set of general interfaces, and the organs are defined as abstract classes implementing the interfaces. Models of real-life programmable hardware are driven by concrete classes exending the abstract classes. For example, there may be one “abstract foot” implementing the foot interface, and concrete “left” and “right foot” classes extending the “abstract foot” class.

The interface defines general movements of the organs, abstract classes implement some of the general functions (like connecting to the body, other organs and the nervous system) and the concrete classes the visualize physical organ and implement the movements on the screen.

The overall model would be a visual model of a programmable robot moving on the screen with motions similar to a human. The parts models may be defined at different levels of detail, as long as they maintain a natural motion.

All parts will include a high-level application programming interface (API), which drive the model directly or compile to a lower-level “machine language” suitable to the part.