Question: What state's country is Moldova and Italy–Moldova diplomatic relations are with Italy?
Choices:
Moldova
Kosovo
Greece
Kazakhstan
Tajikistan
Bulgaria
Fiji
Sweden
Finland
Lithuania
Program:
function: Find
inputs: Moldova
function: Relate
dependencies: 0
inputs: country
backward
function: FilterConcept
dependencies: 1
inputs: state
function: Find
inputs: Italy
function: Relate
dependencies: 3
inputs: diplomatic relation
forward
function: QFilterStr
dependencies: 4
inputs: statement is subject of
Italy–Moldova relations
function: FilterConcept
dependencies: 5
inputs: state
function: And
dependencies: 2
6
function: What
dependencies: 7
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "state" . ?e <country> ?e_1 . ?e_1 <pred:name> "Moldova" .  ?e_2 <diplomatic_relation> ?e . ?e_2 <pred:name> "Italy" . [ <pred:fact_h> ?e_2 ; <pred:fact_r> <diplomatic_relation> ; <pred:fact_t> ?e ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Italy–Moldova relations" .  }
Answer: Moldova