Question: What is the title of A Midsummer Night's Dream (the one that has Helen Mirren as a cast member)?
Choices:
The Imaginarium of Doctor Parnassus
Hancock
Flight
Samson und Delila
Batman
A Midsummer Night's Dream
The 40-Year-Old Virgin
28 Days Later
Independence
The Amazing Spider-Man
Program:
function: Find
inputs: Helen Mirren
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: A Midsummer Night's Dream
function: And
dependencies: 1
2
function: QueryAttr
dependencies: 3
inputs: title
SPARQL: SELECT DISTINCT ?pv WHERE { ?e <pred:name> "A Midsummer Night's Dream" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Helen Mirren" .  ?e <title> ?pv .  }
Answer: A Midsummer Night's Dream