Question: Who is shorter, Amy Adams (the one that is a cast member of Charlie Wilson's War) or Thomas Jefferson (the one that founds Democratic-Republican Party)?
Choices:
Richard Gere
Sylvester Stallone
Rahul Dev Burman
David Byrne
Simon Cowell
Max Fleischer
Amy Adams
Thomas Jefferson
William Henry Harrison
Paul Simon
Program:
function: Find
inputs: Charlie Wilson's War
function: Relate
dependencies: 0
inputs: cast member
forward
function: Find
inputs: Amy Adams
function: And
dependencies: 1
2
function: Find
inputs: Democratic-Republican Party
function: Relate
dependencies: 4
inputs: found
backward
function: Find
inputs: Thomas Jefferson
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: height
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Amy Adams" . ?e_1 <cast_member> ?e . ?e_1 <pred:name> "Charlie Wilson's War" .   } UNION { ?e <pred:name> "Thomas Jefferson" . ?e <found> ?e_2 . ?e_2 <pred:name> "Democratic-Republican Party" .  } ?e <height> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Amy Adams