Question: Which film is a derivative work of Empire of the Sun (which was authored by J. G. Ballard)?
Choices:
Empire of the Sun
The Fifth Element
A Prairie Home Companion
Training Day
Rebecca
Moonraker
The Towering Inferno
Pleasantville
There Will Be Blood
The Ghost Writer
Answer: Empire of the Sun
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "film" . ?e_1 <derivative_work> ?e . ?e_1 <pred:name> "Empire of the Sun" . ?e_1 <author> ?e_2 . ?e_2 <pred:name> "J. G. Ballard" .   }
Program:
function: Find
inputs: J. G. Ballard
function: Relate
dependencies: 0
inputs: author
backward
function: Find
inputs: Empire of the Sun
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: derivative work
forward
function: FilterConcept
dependencies: 4
inputs: film
function: What
dependencies: 5