File tree Expand file tree Collapse file tree
core/src/main/kotlin/org/evomaster/core/search Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org.evomaster.core.search.algorithms
22
3+ import com.google.inject.Inject
34import org.evomaster.core.EMConfig
4- import org.evomaster.core.search.FitnessValue
55import org.evomaster.core.search.Individual
66import org.evomaster.core.search.algorithms.wts.WtsEvalIndividual
77import org.evomaster.client.java.instrumentation.shared.ObjectiveNaming
@@ -18,6 +18,9 @@ import org.evomaster.core.search.service.IdMapper
1818 */
1919class LIPSAlgorithm <T > : AbstractGeneticAlgorithm <T >() where T : Individual {
2020
21+ @Inject
22+ private lateinit var idMapper: IdMapper
23+
2124 private var currentTarget: Int? = null
2225 private lateinit var budget: LipsBudget
2326
@@ -120,7 +123,7 @@ class LIPSAlgorithm<T> : AbstractGeneticAlgorithm<T>() where T : Individual {
120123 val orderedIds = snapshot.keys.sortedDescending()
121124
122125 for (targetId in orderedIds) {
123- val description = archive.getIdMapper() .getDescriptiveId(targetId)
126+ val description = idMapper .getDescriptiveId(targetId)
124127 val isBranch = description.startsWith(ObjectiveNaming .BRANCH )
125128 val covered = archive.isCovered(targetId)
126129 if (isBranch) {
Original file line number Diff line number Diff line change @@ -616,11 +616,6 @@ class Archive<T> where T : Individual {
616616 return samplingCounter
617617 }
618618
619- /* *
620- * Expose the IdMapper used by the archive (read-only access pattern).
621- */
622- fun getIdMapper (): IdMapper = idMapper
623-
624619 /* *
625620 * @return a list of pairs which is composed of target id (first) and corresponding tests (second)
626621 */
You can’t perform that action at this time.
0 commit comments