abstract = "Encoding domain constraints into fitness functions is
a key concept in genetic programming. However, there
are different moments in which the encoding can
constrain the search process: at the language level,
via grammar constriction; at the level of program
generation, via a modified grammar sampling; at the
level of invalid individual discarding or fixing level;
and at the fitness function level, incorporating
constraint violations as fitness penalties. This
chapter defines a general model for constraints in GP
that supports all these moments and provides examples
based on grammars and type systems. It also proposes
combinations of constraints that have not yet been
explored, such as Linear, Affine, or Session Types in
genetic programming.",