Automated Global-to-Local Programming in 1-D Spatial Multi-Agent Systems