Question: In Massachusetts which g=has the capital Boston, who is the legislator that is the head of the government.
Choices: make-up artist
councillor
governor
independent politician
attorney general
Governor of Massachusetts
Member of Congress
speaker
speaker of the United States House of Representatives
president
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "legislator" . ?e_1 <office_held_by_head_of_government> ?e . ?e_1 <pred:name> "Massachusetts" . ?e_1 <capital> ?e_2 . ?e_2 <pred:name> "Boston" .   }
Program:
function: Find
inputs: Boston
function: Relate
dependencies: 0
inputs: capital
backward
function: Find
inputs: Massachusetts
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: office held by head of government
forward
function: FilterConcept
dependencies: 4
inputs: legislator
function: What
dependencies: 5
Answer: Member of Congress