Question: Which movie is shorter, Rules of Engagement (the one that has Samuel L. Jackson as a cast member) or Mr. & Mrs. Smith (the one whose narrative location is New York City)?
Choices:
The Towering Inferno
The Hunchback of Notre Dame
Rules of Engagement
The Fifth Element
A Prairie Home Companion
Mr. & Mrs. Smith
Curse of the Golden Flower
Rebecca
Training Day
Talk to Her
Program:
function: Find
inputs: Samuel L. Jackson
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Rules of Engagement
function: And
dependencies: 1
2
function: Find
inputs: New York City
function: Relate
dependencies: 4
inputs: narrative location
backward
function: Find
inputs: Mr. & Mrs. Smith
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Rules of Engagement" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Samuel L. Jackson" .   } UNION { ?e <pred:name> "Mr. & Mrs. Smith" . ?e <narrative_location> ?e_2 . ?e_2 <pred:name> "New York City" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Mr. & Mrs. Smith