Question: Which city shares border with St. Catharines ?
Choices:
Jakarta
Bergen
Niagara Falls
Tokyo
Cork
Kilkenny
Kingston
Seville
Berlin
Canterbury
Program:
function: Find
inputs: St. Catharines
function: Relate
dependencies: 0
inputs: shares border with
backward
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 <shares_border_with> ?e_1 . ?e_1 <pred:name> "St. Catharines" .   }
Answer: Niagara Falls