Enhancing Robot Program Synthesis Through Environmental Context