Question: Which movie is shorter, Slaughterhouse-Five (the one whose genre is film based on literature) or Montana (the one whose distributor is Warner Bros.)?
Choices:
Montana
Training Day
Talk to Her
Curse of the Golden Flower
Pleasantville
The Fifth Element
The Hunchback of Notre Dame
A Prairie Home Companion
Rebecca
Slaughterhouse-Five
Program:
function: Find
inputs: film based on literature
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: Slaughterhouse-Five
function: And
dependencies: 1
2
function: Find
inputs: Warner Bros.
function: Relate
dependencies: 4
inputs: distributor
backward
function: Find
inputs: Montana
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Slaughterhouse-Five" . ?e <genre> ?e_1 . ?e_1 <pred:name> "film based on literature" .   } UNION { ?e <pred:name> "Montana" . ?e <distributor> ?e_2 . ?e_2 <pred:name> "Warner Bros." .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Montana