Question: Who is shorter, Jimi Hendrix (the one that is famous for heavy metal) or Dave Foley (the one that is a member of Buffalo Bills)?
Choices:
David Byrne
Paul Simon
Rahul Dev Burman
Richard Gere
Jimi Hendrix
William Henry Harrison
Sylvester Stallone
Dave Foley
James E. Reilly
Simon Cowell
Program:
function: Find
inputs: heavy metal
function: Relate
dependencies: 0
inputs: famous people
forward
function: Find
inputs: Jimi Hendrix
function: And
dependencies: 1
2
function: Find
inputs: Buffalo Bills
function: Relate
dependencies: 4
inputs: member of sports team
backward
function: Find
inputs: Dave Foley
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: height
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Jimi Hendrix" . ?e_1 <famous_people> ?e . ?e_1 <pred:name> "heavy metal" .   } UNION { ?e <pred:name> "Dave Foley" . ?e <member_of_sports_team> ?e_2 . ?e_2 <pred:name> "Buffalo Bills" .  } ?e <height> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Jimi Hendrix