Schema-guided generation of correctly reusable programs