There is quite a substantial literature on this topic. The work of the Hungarian "Novi Sad" school is probably closest to the approaches familiar to readers of FOM. An exposition of some of the work of this school is available at: http://www.illc.uva.nl/j50/contribs/andreka-nemeti/andreka-nemeti.ps