Question: What is the title of The Witches of Eastwick (the one that has Jack Nicholson as a cast member)?
Choices:
Caravaggio, il pittore maledetto
24
Cheaper by the Dozen
Men in Black 3
The Ghost and the Darkness
Swept Away
A Star Is Born
Genesis
Dredd
The Witches of Eastwick
Program:
function: Find
inputs: Jack Nicholson
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: The Witches of Eastwick
function: And
dependencies: 1
2
function: QueryAttr
dependencies: 3
inputs: title
SPARQL: SELECT DISTINCT ?pv WHERE { ?e <pred:name> "The Witches of Eastwick" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Jack Nicholson" .  ?e <title> ?pv .  }
Answer: The Witches of Eastwick