Programming bots by synthesizing natural language expressions into API invocations