Component-based encoding library for program synthesis and repair