Foundations in Grammatical Evolution for Dynamic Environments