Question: Which city borders Bethlehem, twinned administrative body of Sacramento?
Choices:
Jerusalem
Carthage
Nelson
San Juan
Kingston
Cork
Kilkenny
Quezon City
Trieste
York
Answer: Jerusalem
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Bethlehem" . ?e_1 <twinned_administrative_body> ?e_2 . ?e_2 <pred:name> "Sacramento" .   }
Program:
function: Find
inputs: Sacramento
function: Relate
dependencies: 0
inputs: twinned administrative body
backward
function: Find
inputs: Bethlehem
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: city
function: What
dependencies: 5