Next: , Previous: , Up: Implementation   [Contents][Index]


2.2 Software Methods

The following methods are defined for all software object types exposing a common interface for use by user programs or in heuristic search.

Function: genome software

The software genotype or “code”, exposed as a simplified data structure. For example an AST genome, e.g., of a cil or lisp software object, my have a tree structure while the genome of a asm or elf software object will be a vector.

Function: phenome software &key bin

The software phenotype. This method will link, compile or serialize the software object as necessary returning an executable version of the software suitable for testing and evaluation

Function: copy software

Return a deep copy of a software object.

Function: pick software key &optional func

Randomly select elements of the genome of SOFTWARE. Selection may optionally be biased towards particular portions of the genome based on a key supplied to pick. Related pick-good and pick-bad methods may also be customized. Useful for e.g., using annotations or fault localization information to bias mutation operations.

Function: mutate software

Randomly mutate the supplied software object. The modified software object and the applied mutation are returned.

Function: crossover software-a software-b

Perform the specified form of crossover on two software objects returning a new software object and information on the crossover operation performed (e.g., the indices of crossover). The related one-point-crossover and two-point-crossover methods may also be used to perform particular types of crossover.

Function: from-file software file

Initialize a software object SOFTWARE using the contents of FILE.

Function: to-file software file

Write the genome of software object SOFTWARE to FILE.


Next: , Previous: , Up: Implementation   [Contents][Index]