Question: What sovereign state shares a border with Ecuador?
Choices:
Colombia
Holy Roman Empire
Kiribati
Switzerland
Cambodia
Burkina Faso
Slovenia
Suriname
Peru
Weimar Republic
Program:
function: Find
inputs: Ecuador
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: sovereign state
function: What
dependencies: 2
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "sovereign state" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Ecuador" .   }
Answer: Peru