Infer the material expressions in reverse

Hello everyone, recently, i have a problem that i need to infer the material expressions in reverse and then generate the calculation code for the process.i hope to get the Base Color, Normal, AO in finally,according to the material parameters. Do you have any ideas or tutorials for that? Thank you very much!