Final Exam

CS 479/579 Semantic Web Programming

December 11, 2006

Name:

Problem 1: XML

TL-Mobile, a new phone company, would like to create a database about its (current or potential) customers by developing a web site to collect personal information (interest and habit). TL-Mobile would like to deploy the application using XML-technologies. To achieve its goal, TL-Mobile develops a front-end for displaying its products and getting customers’ inputs. The inputs from customers will be stored and used for marketing purpose. The front-end consists of two pages:

• Phones and Plans: this page displays the information related to the phones and the plans offerred by the company. In particular, it displays the following information

– for each phone: the model (alpha-numeric string, which is unique), product number, producer, and price; and

– for each plan: plan code (which is unique), minutes, cost, number of lines, special features.

• Comment: this page displays a form in which a customer would fill in the folloing information: ID (an integer, which is unique), Name (First, Last, Middle), Address (Street, City, State, Zip), Phone number, Plan of interest (or used), Phone to buy, Time stamp (Date and Time), and Question/Comment. The information will be stored as soon as the customer submits it. Note that before accessing this form, the customer will need to register and obtain an unique ID from the web site. For simplicity, let us assume that each customer already obtains her unique ID. Note also that a customer cannot submit two questions/comments at the same time.

Answer the following to help TL-Mobile.

1. Create the necessary XML-Schema for the two forms that the company develops. Use commonsense to decide about the properties of each piece of information that needs to be stored. If you need to make an assumption about something, state it clearly.

2. Assume that the information is stored in accordance with your XML schema. Write a XML queries that displays the comments/questions that customers from the city of Las Cruces have submitted during the period from September 01, 2006 to December 01, 2006. (You can assume that a Boolean comparison between the time stamp and a date, denoted by ≤, can be made and is available for use).

Problem 2: OWL and Description Logics

We wish to create a small ontology to describe computers. We wish to have the following characteristics:

• there are different types of computers (pdas, laptops, desktops, servers) – use union to express this

• a pda is a computer which is small device, all its components are tiny, and there exist a component which is wireless.

• a server is a computer which is big, and all its components are big, and all its components are expensive

• the property of being big is the opposite of the property of being small • tiny things are also small things

• a server is more expensive than a laptop which is more expensive than a desktop which is more expensive than a pda; more expensive should be a transitive property.

• every computer has a price Describe these statements using Description Logic; translate them into appropriate OWL constructions.

Problem 3: RDF and RDFS

Consider the problem of describing students in a department. Each student • has an advisor,

• is registered for a number of classes

• has a rank (freshment, sophomore, junior, senior)

• has a GPA

• has some deficiencies Answer the following questions:

1. create RDF Schema to describe students with the above properties; in particular, you are required to use Containers to handle classes and deficiencies (in particular, the deficiencies should rely on a Collection).

2. create the RDF specification for the following student (a) name is Tom

(b) he is a sophomore

(c) he has a deficiency in Math192 and Math 185

(d) he is registered in Fall 2006 for CS 171, CS 272, Math 278

(e) his GPA is 2.95

(f) his advisor is Dr. Son Tran

3. create a meta statement (via reification) that asserts that the description of the student is valid until Dec. 31st, 2006.

Problem 4: Rules and RuleML

Consider the following statement:

If a computer is modern then it is a fast computer, unless it is a Toshiba. Toshiba are modern computers. A fast computer can help people. A complicated computer does not help people. A computer is fast if it has a CPU clock of 3.0GHz.

Encode this statement using rules and using the language of RuleML. In particular:

• The rules will have some “exceptions” and conflicting conclusions. Encode them using

– negation as failure to handle exceptions (e.g., toshiba)

– degrees of preference to handle conflicting conclusions (in particular, complication of computers is a more serious issue than speed).