Skip to content

Commit d641b36

Browse files
committed
remove prints
1 parent 18fe1c8 commit d641b36

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

core/src/main/kotlin/org/evomaster/core/search/algorithms/LIPSAlgorithm.kt

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,47 +36,36 @@ class LIPSAlgorithm<T> : AbstractGeneticAlgorithm<T>() where T : Individual {
3636
budget = LipsBudget(config, time)
3737
val initUncoveredSize = archive.notCoveredTargets().size
3838
budget.budgetLeftForCurrentTarget = budget.computePerTargetBudget(initUncoveredSize)
39-
println("[LIPS DEBUG] initPopulation: initial per-target budget set using uncoveredSize=$initUncoveredSize -> budget=${budget.budgetLeftForCurrentTarget}")
4039
}
4140

4241
override fun searchOnce() {
4342
beginGeneration()
44-
println("[LIPS DEBUG] searchOnce: ENTER")
4543
// record budget usage for this generation
4644
val startActions = time.evaluatedActions
4745
val startSeconds = time.getElapsedSeconds()
4846

4947
// Compute uncovered goals
5048
val uncovered = archive.notCoveredTargets()
51-
println("[LIPS DEBUG] uncovered targets size = ${uncovered.size}")
5249

5350
// current target is null if covered by previous generation or out of budget
5451
// Pick target if null, or if previously covered (check coverage directly)
5552
val needNewTarget = currentTarget == null || archive.isCovered(currentTarget!!)
56-
println("[LIPS DEBUG] needNewTarget=$needNewTarget currentTarget=${currentTarget}")
5753
if (needNewTarget) {
58-
println("[LIPS DEBUG] selecting new target from archive snapshot")
5954
val target = lastUncoveredBranchTargetId()
6055
currentTarget = target
61-
println("[LIPS DEBUG] currentTarget set to $currentTarget")
6256
// Initialize budget for this NEW target
63-
println("[LIPS DEBUG] calculating per-target budget with uncoveredSize=${uncovered.size}")
6457
budget.budgetLeftForCurrentTarget = budget.computePerTargetBudget(uncovered.size)
65-
println("[LIPS DEBUG] selectTarget: target=$target uncovered=${uncovered.size} budgetLeftForCurrentTarget=${budget.budgetLeftForCurrentTarget}")
6658
}
6759

6860
// Focus scoring on the single selected target if present; otherwise use global fitness
6961
if (currentTarget == null) {
7062
frozenTargets = emptySet()
71-
println("[LIPS DEBUG] no currentTarget; using global fitness (frozenTargets empty)")
7263
} else {
7364
frozenTargets = setOf(currentTarget!!)
74-
println("[LIPS DEBUG] frozenTargets=${frozenTargets}")
7565
}
7666

7767
val n = config.populationSize
7868
val nextPop: MutableList<WtsEvalIndividual<T>> = formTheNextPopulation(population)
79-
println("[LIPS DEBUG] formed base nextPop with elites size=${nextPop.size} target=$currentTarget")
8069

8170
while (nextPop.size < n) {
8271
beginStep()
@@ -102,9 +91,6 @@ class LIPSAlgorithm<T> : AbstractGeneticAlgorithm<T>() where T : Individual {
10291

10392
// Stop if global budget or target budget is up
10493
val usedForTarget = budget.usedForCurrentTarget(startActions, startSeconds)
105-
if ((nextPop.size % 10) == 0 || usedForTarget >= budget.budgetLeftForCurrentTarget) {
106-
println("[LIPS DEBUG] innerLoop: nextSize=${nextPop.size} usedForTarget=$usedForTarget budgetLeft=${budget.budgetLeftForCurrentTarget}")
107-
}
10894
if (!time.shouldContinueSearch() || usedForTarget >= budget.budgetLeftForCurrentTarget) {
10995
endStep()
11096
break
@@ -117,16 +103,13 @@ class LIPSAlgorithm<T> : AbstractGeneticAlgorithm<T>() where T : Individual {
117103

118104
// Update budget usage for this target
119105
budget.updatePerTargetBudget(startActions, startSeconds)
120-
println("[LIPS DEBUG] afterGen: budgetLeftForCurrentTarget=${budget.budgetLeftForCurrentTarget}")
121106

122107
// Switch target if covered or out of budget
123108
val coveredNow = population.any { score(it) >= 1.0 }
124109
val switching = budget.shouldSwitchTarget(coveredNow)
125-
println("[LIPS DEBUG] shouldSwitchTarget=$switching currentTarget=$currentTarget")
126110
if (switching) currentTarget = null
127111

128112
endGeneration()
129-
println("[LIPS DEBUG] searchOnce: EXIT")
130113
}
131114

132115
fun lastUncoveredBranchTargetId(): Int? {
@@ -135,21 +118,17 @@ class LIPSAlgorithm<T> : AbstractGeneticAlgorithm<T>() where T : Individual {
135118

136119
// Iterate targets by numeric id in descending order
137120
val orderedIds = snapshot.keys.sortedDescending()
138-
println("[LIPS DEBUG] lastUncoveredBranch: snapshotSize=${snapshot.size} orderedIdsCount=${orderedIds.size}")
139121

140122
for (targetId in orderedIds) {
141123
val description = archive.getIdMapper().getDescriptiveId(targetId)
142124
val isBranch = description.startsWith(ObjectiveNaming.BRANCH)
143125
val covered = archive.isCovered(targetId)
144-
println("[LIPS DEBUG] candidate targetId=$targetId desc=$description isBranch=$isBranch covered=$covered")
145126
if (isBranch) {
146127
if (!covered) {
147-
println("[LIPS DEBUG] lastUncoveredBranch: selected targetId=$targetId")
148128
return targetId
149129
}
150130
}
151131
}
152-
println("[LIPS DEBUG] lastUncoveredBranch: no candidate found")
153132
return null
154133
}
155134
}

0 commit comments

Comments
 (0)