Please see the file src/engine/generate.cpp from the sources package of FET.

You can download the FET sources from the FET homepage, http://lalescu.ro/liviu/fet/
