ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("lara.mutation.Mutation");

(.lara)
import lara.mutation.Mutation;

Mutation

Constructor

Mutation

new Mutation([name = "<unnamed mutation>"])

Base class that represents a code mutation.

This should not be instantiated directly, instead it should be extended.

Parameters

name: String - the name of the mutation (optional)

Instance Members

getMutants

getMutants($jp)

Parameters

$jp: $jp - The point in the code to mutate

Returns

lara.mutation.MutationResult[] - an array with the results of each mutation, which must be out-of-tree copies of the given join point

getName

getName()

Returns

String - the name of this mutation

isMutationPoint

isMutationPoint($jp)

Parameters

$jp: $jp - A point in the code to test

Returns

boolean - true if the given join point is a valid mutation point, false otherwise

mutate

mutate

Generator function for the mutations.

Parameters

$jp: $jp - The point in the code to mutate.

Returns

lara.mutation.MutationResult - an iterator that results the results of each mutation on each iteration.