ANTAREX API

Clava API

LARA API

LARA Common Language API

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

(.lara)
import lara.mutation.IterativeMutator;

IterativeMutator

Constructor

IterativeMutator

new IterativeMutator(mutations)

Iterative mutator, allows to perform one mutation at a time, and restore the code before each mutation.

Parameters

mutations: lara.mutation.Mutation...

Instance Members

addJps

addJps([missing param name])

Parameters

[missing param name]: joinpoint...

getMutatedPoint

getMutatedPoint()

Returns

$jp - the point with currently mutated code, or undefined if the code is not currently mutated.

getMutationPoint

getMutationPoint()

Returns

$jp - the point in the code where the mutation is occurring, or undefined if there are not more mutations left.

getName

getName()

Returns

String - the name of this mutator

mutateSource

mutateSource()

Introduces a single mutation to the code.
If the code has been mutated already, restores the code before mutating again.
If there are no mutations left, does nothing.

Returns

any - true if a mutation occurred, false otherwise

restoreSource

restoreSource()

If the code has been mutated, restores the code to its original state. If not, does nothing.