Toward Programmable Smart Buildings