Question: Which human settlement shares a border with Montclair and is the death place of James Monroe (whose date of birth is 1799-09-10)?
Choices:
Red Bank
Ridgewood
Montclair
Belleville
Whanganui
Verona
Orange
Livingston
Princeton
West Orange
Program:
function: Find
inputs: Montclair
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: human settlement
function: Find
inputs: James Monroe
function: FilterDate
dependencies: 3
inputs: date of birth
1799-09-10
=
function: Relate
dependencies: 4
inputs: place of death
forward
function: FilterConcept
dependencies: 5
inputs: human settlement
function: And
dependencies: 2
6
function: What
dependencies: 7
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "human settlement" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Montclair" .  ?e_2 <place_of_death> ?e . ?e_2 <pred:name> "James Monroe" . ?e_2 <date_of_birth> ?pv . ?pv <pred:date> "1799-09-10"^^xsd:date .  }
Answer: Orange