@@ -68,31 +68,30 @@ import org.utbot.framework.plugin.api.UtAssembleModel
68
68
import org.utbot.framework.plugin.api.UtConcreteExecutionFailure
69
69
import org.utbot.framework.plugin.api.UtError
70
70
import org.utbot.framework.plugin.api.UtExecution
71
- import org.utbot.framework.plugin.api.UtExecutionCreator
72
71
import org.utbot.framework.plugin.api.UtInstrumentation
73
72
import org.utbot.framework.plugin.api.UtMethod
74
73
import org.utbot.framework.plugin.api.UtNullModel
75
74
import org.utbot.framework.plugin.api.UtOverflowFailure
76
75
import org.utbot.framework.plugin.api.UtResult
77
- import org.utbot.framework.util.graph
76
+ import org.utbot.framework.plugin.api.UtSymbolicExecution
78
77
import org.utbot.framework.plugin.api.onSuccess
78
+ import org.utbot.framework.util.graph
79
79
import org.utbot.framework.plugin.api.util.executableId
80
80
import org.utbot.framework.plugin.api.util.id
81
81
import org.utbot.framework.plugin.api.util.utContext
82
82
import org.utbot.framework.plugin.api.util.description
83
83
import org.utbot.framework.util.jimpleBody
84
84
import org.utbot.framework.plugin.api.util.voidClassId
85
- import org.utbot.fuzzer.ReferencePreservingIntIdGenerator
86
85
import org.utbot.fuzzer.FallbackModelProvider
87
86
import org.utbot.fuzzer.FuzzedMethodDescription
88
87
import org.utbot.fuzzer.FuzzedValue
89
88
import org.utbot.fuzzer.ModelProvider
89
+ import org.utbot.fuzzer.ReferencePreservingIntIdGenerator
90
90
import org.utbot.fuzzer.Trie
91
+ import org.utbot.fuzzer.UtFuzzedExecution
91
92
import org.utbot.fuzzer.collectConstantsForFuzzer
92
93
import org.utbot.fuzzer.defaultModelProviders
93
94
import org.utbot.fuzzer.fuzz
94
- import org.utbot.fuzzer.names.MethodBasedNameSuggester
95
- import org.utbot.fuzzer.names.ModelBasedNameSuggester
96
95
import org.utbot.fuzzer.providers.ObjectModelProvider
97
96
import org.utbot.instrumentation.ConcreteExecutor
98
97
import soot.jimple.Stmt
@@ -298,15 +297,14 @@ class UtBotSymbolicEngine(
298
297
val concreteExecutionResult =
299
298
concreteExecutor.executeConcretely(methodUnderTest, stateBefore, instrumentation)
300
299
301
- val concreteUtExecution = UtExecution (
300
+ val concreteUtExecution = UtSymbolicExecution (
302
301
stateBefore,
303
302
concreteExecutionResult.stateAfter,
304
303
concreteExecutionResult.result,
305
304
instrumentation,
306
305
mutableListOf (),
307
306
listOf (),
308
- concreteExecutionResult.coverage,
309
- UtExecutionCreator .SYMBOLIC_ENGINE
307
+ concreteExecutionResult.coverage
310
308
)
311
309
emit(concreteUtExecution)
312
310
@@ -486,32 +484,15 @@ class UtBotSymbolicEngine(
486
484
} else {
487
485
logger.error { " Coverage is empty for $methodUnderTest with ${values.map { it.model }} " }
488
486
}
489
- val nameSuggester = sequenceOf(ModelBasedNameSuggester (), MethodBasedNameSuggester ())
490
- val testMethodName = try {
491
- nameSuggester.flatMap {
492
- it.suggest(
493
- methodUnderTestDescription,
494
- values,
495
- concreteExecutionResult.result
496
- )
497
- }.firstOrNull()
498
- } catch (t: Throwable ) {
499
- logger.error(t) { " Cannot create suggested test name for ${methodUnderTest.displayName} " }
500
- null
501
- }
502
487
503
488
emit(
504
- UtExecution (
489
+ UtFuzzedExecution (
505
490
stateBefore = initialEnvironmentModels,
506
491
stateAfter = concreteExecutionResult.stateAfter,
507
492
result = concreteExecutionResult.result,
508
- instrumentation = emptyList(),
509
- path = mutableListOf (),
510
- fullPath = emptyList(),
511
493
coverage = concreteExecutionResult.coverage,
512
- createdBy = UtExecutionCreator .FUZZER ,
513
- testMethodName = testMethodName?.testName,
514
- displayName = testMethodName?.takeIf { hasMethodUnderTestParametersToFuzz }?.displayName
494
+ fuzzingValues = values,
495
+ fuzzedMethodDescription = methodUnderTestDescription
515
496
)
516
497
)
517
498
}
@@ -524,11 +505,7 @@ class UtBotSymbolicEngine(
524
505
val failedConcreteExecution = UtExecution (
525
506
stateBefore = stateBefore,
526
507
stateAfter = MissingState ,
527
- result = UtConcreteExecutionFailure (e),
528
- instrumentation = emptyList(),
529
- path = mutableListOf (),
530
- fullPath = listOf (),
531
- createdBy = UtExecutionCreator .SYMBOLIC_ENGINE ,
508
+ result = UtConcreteExecutionFailure (e)
532
509
)
533
510
534
511
emit(failedConcreteExecution)
@@ -562,14 +539,13 @@ class UtBotSymbolicEngine(
562
539
val stateAfter = modelsAfter.constructStateForMethod(methodUnderTest)
563
540
require(stateBefore.parameters.size == stateAfter.parameters.size)
564
541
565
- val symbolicUtExecution = UtExecution (
542
+ val symbolicUtExecution = UtSymbolicExecution (
566
543
stateBefore = stateBefore,
567
544
stateAfter = stateAfter,
568
545
result = symbolicExecutionResult,
569
546
instrumentation = instrumentation,
570
547
path = entryMethodPath(state),
571
- fullPath = state.fullPath(),
572
- createdBy = UtExecutionCreator .SYMBOLIC_ENGINE ,
548
+ fullPath = state.fullPath()
573
549
)
574
550
575
551
globalGraph.traversed(state)
0 commit comments