Automatic program synthesis from example problems