Question: Which city shares borders with Ottawa?
Choices:
Johannesburg
Kingston
Trieste
Cork
Kilkenny
San Juan
Gatineau
Trier
San Salvador
New Westminster
Program:
function: Find
inputs: Ottawa
function: Relate
dependencies: 0
inputs: shares border with
forward
function: FilterConcept
dependencies: 1
inputs: city
function: What
dependencies: 2
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Ottawa" .   }
Answer: Gatineau