Question: How many superheroes are the partner of Superman (which has James Denton as a performer) or are the spouse of Lois Lane (which has Margot Kidder as a performer)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "superhero" .  { ?e <partner> ?e_1 . ?e_1 <pred:name> "Superman" . ?e_1 <performer> ?e_2 . ?e_2 <pred:name> "James Denton" .  } UNION { ?e_1 <spouse> ?e . ?e_1 <pred:name> "Lois Lane" . ?e_1 <performer> ?e_2 . ?e_2 <pred:name> "Margot Kidder" .  } }
Program:
function: Find
inputs: James Denton
function: Relate
dependencies: 0
inputs: performer
backward
function: Find
inputs: Superman
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: partner
backward
function: FilterConcept
dependencies: 4
inputs: superhero
function: Find
inputs: Margot Kidder
function: Relate
dependencies: 6
inputs: performer
backward
function: Find
inputs: Lois Lane
function: And
dependencies: 7
8
function: Relate
dependencies: 9
inputs: spouse
forward
function: FilterConcept
dependencies: 10
inputs: superhero
function: Or
dependencies: 5
11
function: Count
dependencies: 12