Next: Global Variables, Previous: Software Methods, Up: Implementation [Contents][Index]
SEL provides a variety of operations that apply mutations to
modify code. These mutations are represented as sel:mutation
objects.
See the Software Evolution Library Index for full API documentation. We provide a brief outline here.
New sel:mutation
subclasses should derive from the
most-relevant base class. To define a new mutation from an existing
base class, use
(define-mutation new-mutation (base-mutation) ())
The mutation may be initialized with two functions; a targeter and
picker. The targeter is a function which, given a software object,
returns a list of mutation targets; this function defaults to
sel:pick-bad
. The picker is a function which, given a software
object, returns a random mutation target; this function defaults to a
random element returned by sel:pick-bad
.
After creating a software object and a mutation, use the
sel:apply-mutation
method to create a new mutant.