CS 6795 Semantic Web Techniques
1) This is RDF metadata about our course, with student numbers and names changed:
<voc:name>Semantic Web Techniques</voc:name>
Draw, maybe using a tool, the directed labeled graph (DLG) that constitutes the RDF diagram of this XML element (use space below). Hint: URLs, going into ovals or becoming arc labels, and texts, going into rectangles, may be arbitrarily shortened, as long as they remain unique (e.g.: '.../cs/').
2) Consider the following Datalog program in Prolog syntax defining a unary predicate or relation artist:
artist(X) :- painter(X).
artist(X) :- actor(X), improvising(X).
painter(X) :- expressionist(X).
a) Give, and very briefly explain, the result of the query artist(sara):
b) Give, and very briefly explain, the result of the query artist(mary):
c) Give the result(s) of the query artist(Y):
3) Using Prolog or any other logic notation, give clauses that express that (1) path(X,Y) can be proved via connected(X,Y) and (2) path(X,Z) can be proved via (a) connected(X,Y) and (b), recursively, path(Y,Z). Add clauses that express that connected(X,Y) can be proved via directed(X,Y) or undirected(X,Y).
Add facts representing directed (arrow pointing from X to Y) or undirected (link between X and Y) arcs in a graph, mentioning at least a node, one of its directed- or undirected-reachable nodes, and one of its further reachable nodes. Show a query that asks for all of the known paths, and a derivation using at least one occurrence of the rule (2).
Hint: You can test your program and queries in any Prolog engine (variables are upper-cased) -- e.g. in SWI Prolog or XSB Prolog -- or in the OO jDREW engine, which uses POSL (variables are “?”-prefixed) -- via http://jdrew.org/oojdrew/1.0/oojdrew-1.0.jnlp.
4) Consider this definition of the predicate adjaceq (i.e., 'adjacent equals’):
adjaceq([_|R]) :- adjaceq(R).
adjaceq([?|?R]) :- adjaceq(?R).
You can read the two clauses as follows:
Show the results of checking adjaceq of ground (variable-free) lists thus:
Show the results of enumerating adjaceqs of a non-ground list
explain here the number of solutions found, e.g. by studying the expanded
Briefly explain what happens when checking adjaceq of a ground list with three adjacent equal elements.
Maintained by Harold Boley