Question: What play derives West Side Story whose script is written by Ernest Lehman?
Choices: South Pacific
Beauty and the Beast
West Side Story
Sunset Boulevard
The Producers
The King and I
The Sound of Music
Who's Afraid of Virginia Woolf?
Richard III
Chicago
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "play" . ?e_1 <based_on> ?e . ?e_1 <pred:name> "West Side Story" . ?e_1 <screenwriter> ?e_2 . ?e_2 <pred:name> "Ernest Lehman" .   }
Program:
function: Find
inputs: Ernest Lehman
function: Relate
dependencies: 0
inputs: screenwriter
backward
function: Find
inputs: West Side Story
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: based on
forward
function: FilterConcept
dependencies: 4
inputs: play
function: What
dependencies: 5
Answer: West Side Story