CS 6795 Semantic Web Techniques

Assignment 1


Syllabus
Assigns
Notes
Labs
Project
Resources

 

1) Using the space below, define a predicate (relation) member in Prolog, which tests whether its first argument occurs at least once as an element in the list that is its second argument.

 

 

 

 

2) Consider the following oversimplified proposal of a node-labeled ordered tree for flights starting from a fixed airport, instantiated with leaves for a particular flight:

                          flight
                       /        |            \
 
                      /         |              \
             pilots   attendants    dynamic-information
             /     \                        /         |                          \
            /       \                    /            |                            \
  name     name         date        destination                 fare
    |  \            |  \              |              /          \                         \
    |    \          |   \             |             /            \                          \
  first last   first last   8/15    code           airport              730
    |       |       |       |                   /                     |         \
  A.  Rist   B.  Meyrs           /                       |             \
                                           /                                         \
                                       YFC                   city        province
                                                                      |                      |
                                                             Fredericton          NB


a)
Do the missing leaf data for attendants cause any (XML-level) issue?

b) Give a well-formed XML element for the tree using a pretty-print layout.

c) Give a b)-equivalent Prolog term.

d) Write a DTD that defines flights according to the original a)-tree or b)-element without structural generalization (e.g. there are exactly two pilots).

e) Extend the DTD such that one or more subelements for attendants must appear, each specifying a name in a form exactly as for the pilots.
 

For a) through e), use the space below and attach more sheets of paper as necessary (write on both sides of sheets).

 


Maintained by Harold Boley