Question: Tell me the sovereign state that has a border with Iraq (this subject's statement is Iraq-Jordan border)
Choices:
Kiribati
Saudi Arabia
Weimar Republic
Iran
Russian Soviet Federative Socialist Republic
Kuwait
Cambodia
Turkey
Switzerland
Jordan
Program:
function: Find
inputs: Iraq
function: Relate
dependencies: 0
inputs: shares border with
forward
function: QFilterStr
dependencies: 1
inputs: statement is subject of
Iraq–Jordan border
function: FilterConcept
dependencies: 2
inputs: sovereign state
function: What
dependencies: 3
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "sovereign state" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Iraq" .  [ <pred:fact_h> ?e_1 ; <pred:fact_r> <shares_border_with> ; <pred:fact_t> ?e ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Iraq–Jordan border" .  }
Answer: Jordan