Automated program generator