For the eye of the programmer, that is a shameful designer.
Cannot be done automagically without some assumptions, so it is worth of doing the conversion by hand suited to our needs.