The role of research and learning in adaptive programming