Some important classes for extending in Astor - ngocpq/astor GitHub Wiki
Model classes
1. SuspiciousModificationPoint
2. ProgramVariant
a. List<ModificationPoint> modificationPoints
i. a list of "Gen", which represents all program locations (i.e., statements) that can be modified for that variant during evolution process.
b. Map<Integer, List<OperatorInstance>> operations
i. contain a Map "operations" that tracks the history of all modification applied to each "gen"
3. OperatorSpace:
4. AstorOperator:
a. applyChangesInModel(OperatorInstance, ProgramVariant)
b. undoChangesInModel(OperatorInstance, ProgramVariant)
c. updateProgramVariant(OperatorInstance, ProgramVariant): some operator add or remove modification points from a program variant
d. List<OperatorInstance> createOperatorInstance(SuspiciousModificationPoint): create a list of operator instance from this mdp
5. IngredientSpace: the space of all possible program elements that can be used to generate patch
a. void defineSpace(ProgramVariant variant): create space using classes from a variant
b. List<ingredients> getIngredients(elementToModify)
c. List<ingredients> getIngredients(elementToModify, type)
Extension points: ExtensionPoints
1. PopulationController:
a. List<ProgramVariant> selectProgramVariantsForNextGeneration(parentVariants, childVariants, maxNumberInstances, variantFactory, originalVariant, generation)
2. SuspiciousNavigationStrategy
3. OperatorSelectionStrategy
a. OperatorSelectionStrategy(OperatorSpace) constructor
b. AstorOperator getNextOperator()
c. AstorOperator getNextOperator(SuspiciousModificationPoint)
Genetic operation implementation classes
1. Overall algorithm:
a. AstorCoreEngine
2. Fitness function:
a. FitnessFunction
b. ProgramVariantValidator
3. Selection:
a. PopulationController
4. Mutation
a. SuspiciousNavigationStrategy: ranking the modification points
b. OperatorSelectionStrategy:
c. IngredientSearchStrategy
d. IngredientTransformationStrategy: generate a set of fix space for a modification point given an ingredient
i. public List<Ingredient> transform(ModificationPoint modificationPoint, Ingredient ingredient);
5. Crossover:
a. do not have a separate class
b. implemented in the method JGenProg.applyCrossover(), which is called in the prepareNextGeneration( …) method.