Modelling complex data mining applications in a formal framework