Question: Which city is the capital of Kingdom of Italy (which has the religion Catholic Church)?
Choices:
Florence
City of London
Quetta
Trieste
Bratislava
Milan
Turin
Kyoto
Hamilton
Cork
Answer: Milan
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city" . ?e_1 <capital> ?e . ?e_1 <pred:name> "Kingdom of Italy" . ?e_1 <religion> ?e_2 . ?e_2 <pred:name> "Catholic Church" .   }
Program:
function: Find
inputs: Catholic Church
function: Relate
dependencies: 0
inputs: religion
backward
function: Find
inputs: Kingdom of Italy
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: capital
forward
function: FilterConcept
dependencies: 4
inputs: city
function: What
dependencies: 5