Question: Which human is a cast member of Little Nicky (which has Ozzy Osbourne as a cast member) and is educated at University of California, Irvine?-
Choices:
Harvey Keitel
James LeGros
Bob Gunton
Rhys Ifans
Sylvester Stallone
Robert Smigel
Regis Philbin
Jon Lovitz
Michael Chabon
Max Fleischer
Program:
function: Find
inputs: Ozzy Osbourne
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Little Nicky
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: cast member
forward
function: FilterConcept
dependencies: 4
inputs: human
function: Find
inputs: University of California, Irvine
function: Relate
dependencies: 6
inputs: educated at
backward
function: FilterConcept
dependencies: 7
inputs: human
function: And
dependencies: 5
8
function: What
dependencies: 9
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "human" . ?e_1 <cast_member> ?e . ?e_1 <pred:name> "Little Nicky" . ?e_1 <cast_member> ?e_2 . ?e_2 <pred:name> "Ozzy Osbourne" .  ?e <educated_at> ?e_3 . ?e_3 <pred:name> "University of California, Irvine" .  }
Answer: Jon Lovitz