Question: What university is located in Ontario, whos headquarters are in guelph.
Choices:
Pennsylvania State University
Presidency University
University of Guelph
King's College London
University of Melbourne
University of Manchester
McMaster University
Imperial College London
McNeese State University
Panjab University
Answer: University of Guelph
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "university" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Ontario" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Nunavut" .  ?e <headquarters_location> ?e_3 . ?e_3 <pred:name> "Guelph" . [ <pred:fact_h> ?e ; <pred:fact_r> <headquarters_location> ; <pred:fact_t> ?e_3 ] <postal_code> ?qpv . ?qpv <pred:value> "N1G 2W1" .  }
Program:
function: Find
inputs: Nunavut
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Ontario
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: university
function: Find
inputs: Guelph
function: Relate
dependencies: 6
inputs: headquarters location
backward
function: QFilterStr
dependencies: 7
inputs: postal code
N1G 2W1
function: FilterConcept
dependencies: 8
inputs: university
function: And
dependencies: 5
9
function: What
dependencies: 10