File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org.utbot.engine
2
+
3
+ /* *
4
+ * Represents a mutable _Context_ during the [ExecutionState] traversing. This _Context_ consists of all mutable and
5
+ * immutable properties and fields which are created and updated during analysis of **one** Jimple instruction.
6
+ *
7
+ * Traverser functions should be implemented as an extension functions with [TraversalContext] as a receiver.
8
+ *
9
+ * TODO: extend this class with other properties, such as [Environment], which is [Traverser] mutable property now.
10
+ */
11
+ class TraversalContext {
12
+ // TODO: move properties from [UtBotSymbolicEngine] here
13
+
14
+
15
+ // TODO: Q: maybe it's better to pass stateConsumer as an argument to constructor?
16
+ private val states = mutableListOf<ExecutionState >()
17
+
18
+ /* *
19
+ * Offers new [ExecutionState] which can be obtained later with [nextStates].
20
+ */
21
+ fun offerState (state : ExecutionState ) {
22
+ states.add(state)
23
+ }
24
+
25
+ /* *
26
+ * New states from traversal.
27
+ */
28
+ val nextStates: Collection <ExecutionState >
29
+ get() = states
30
+ }
You can’t perform that action at this time.
0 commit comments