Constraint programming for type inference in flexible model-driven engineering. (September 2017)