Skip to content

Commit 9a75263

Browse files
sergeypospelovVassiliy-Kudryashov
authored andcommitted
Extract Traverser from UtBotSymbolicEngine (#307)
1 parent edc482a commit 9a75263

30 files changed

+3665
-3534
lines changed

utbot-framework/src/main/java/org/utbot/engine/overrides/UtArrayMock.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/**
77
* Auxiliary class with static methods without implementation.
8-
* These static methods are just markers for <code>UtBotSymbolicEngine</code>,
8+
* These static methods are just markers for {@link org.utbot.engine.Traverser}.,
99
* to do some corresponding behavior, that can't be represent
1010
* with java instructions.
1111
* <p>
@@ -15,7 +15,7 @@
1515
@SuppressWarnings("unused")
1616
public class UtArrayMock {
1717
/**
18-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
18+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
1919
* behave similar to call of {@link java.util.Arrays#copyOf(Object[], int)}
2020
* if length is less or equals to src.length, otherwise first
2121
* src.length elements are equal to src, but the rest are undefined.
@@ -45,7 +45,7 @@ public static char[] copyOf(char[] src, int length) {
4545
}
4646

4747
/**
48-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
48+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
4949
* behave similar to call of
5050
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
5151
* if all the arguments are valid.
@@ -67,7 +67,7 @@ public static void arraycopy(Object[] src, int srcPos, Object[] dst, int destPos
6767
}
6868

6969
/**
70-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
70+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
7171
* behave similar to call of
7272
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
7373
* if all the arguments are valid.
@@ -83,7 +83,7 @@ public static void arraycopy(boolean[] src, int srcPos, boolean[] dst, int destP
8383
}
8484

8585
/**
86-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
86+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
8787
* behave similar to call of
8888
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
8989
* if all the arguments are valid.
@@ -99,7 +99,7 @@ public static void arraycopy(byte[] src, int srcPos, byte[] dst, int destPos, in
9999
}
100100

101101
/**
102-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
102+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
103103
* behave similar to call of
104104
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
105105
* if all the arguments are valid.
@@ -115,7 +115,7 @@ public static void arraycopy(char[] src, int srcPos, char[] dst, int destPos, in
115115
}
116116

117117
/**
118-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
118+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
119119
* behave similar to call of
120120
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
121121
* if all the arguments are valid.
@@ -131,7 +131,7 @@ public static void arraycopy(short[] src, int srcPos, short[] dst, int destPos,
131131
}
132132

133133
/**
134-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
134+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
135135
* behave similar to call of
136136
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
137137
* if all the arguments are valid.
@@ -147,7 +147,7 @@ public static void arraycopy(int[] src, int srcPos, int[] dst, int destPos, int
147147
}
148148

149149
/**
150-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
150+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
151151
* behave similar to call of
152152
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
153153
* if all the arguments are valid.
@@ -163,7 +163,7 @@ public static void arraycopy(long[] src, int srcPos, long[] dst, int destPos, in
163163
}
164164

165165
/**
166-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
166+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
167167
* behave similar to call of
168168
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
169169
* if all the arguments are valid.
@@ -179,7 +179,7 @@ public static void arraycopy(float[] src, int srcPos, float[] dst, int destPos,
179179
}
180180

181181
/**
182-
* Traversing this instruction by <code>UtBotSymbolicEngine</code> should
182+
* Traversing this instruction by {@link org.utbot.engine.Traverser} should
183183
* behave similar to call of
184184
* {@link java.lang.System#arraycopy(Object, int, Object, int, int)}
185185
* if all the arguments are valid.

utbot-framework/src/main/java/org/utbot/engine/overrides/UtLogicMock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Auxiliary class with static methods without implementation.
5-
* These static methods are just markers for <code>UtBotSymbolicEngine</code>,
5+
* These static methods are just markers for {@link org.utbot.engine.Traverser},
66
* to do some corresponding behavior, that can be represented with smt expressions.
77
* <p>
88
* <code>UtLogicMock</code> is used to store bool smt bool expressions in

utbot-framework/src/main/java/org/utbot/engine/overrides/UtOverrideMock.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
/**
44
* Auxiliary class with static methods without implementation.
5-
* These static methods are just markers for UtBotSymbolicEngine,
5+
* These static methods are just markers for {@link org.utbot.engine.Traverser},
66
* to do some corresponding behavior, that can't be represent
77
* with java instructions.
88
*
99
* Set of methods in UtOverrideMock is used in code of classes,
1010
* that override implementation of some standard class by new implementation,
11-
* that is more simple for UtBotSymbolicEngine to traverse.
11+
* that is more simple for {@link org.utbot.engine.Traverser} to traverse.
1212
*/
1313
@SuppressWarnings("unused")
1414
public class UtOverrideMock {
@@ -25,7 +25,7 @@ public static boolean alreadyVisited(Object o) {
2525
}
2626

2727
/**
28-
* If UtBotSymbolicEngine meets invoke of this method in code,
28+
* If {@link org.utbot.engine.Traverser} meets invoke of this method in code,
2929
* then it marks the address of object o in memory as visited
3030
* and creates new MemoryUpdate with parameter isVisited, equal to o.addr
3131
* @param o parameter, that need to be marked as visited.
@@ -34,7 +34,7 @@ public static void visit(Object o) {
3434
}
3535

3636
/**
37-
* If UtBotSymbolicEngine meets invoke of this method in code,
37+
* If {@link org.utbot.engine.Traverser} meets invoke of this method in code,
3838
* then it marks the method, where met instruction is placed,
3939
* and all the methods that will be traversed in nested invokes
4040
* as methods that couldn't throw exceptions.
@@ -44,7 +44,7 @@ public static void doesntThrow() {
4444
}
4545

4646
/**
47-
* If UtBotSymbolicEngine meets invoke of this method in code,
47+
* If {@link org.utbot.engine.Traverser} meets invoke of this method in code,
4848
* then it assumes that the specified object is parameter,
4949
* and need to be marked as parameter.
5050
* As address space of parameters in engine is non-positive, while
@@ -63,7 +63,7 @@ public static void parameter(Object[] objects) {
6363
}
6464

6565
/**
66-
* If UtBotSymbolicEngine meets invoke of this method in code,
66+
* If {@link org.utbot.engine.Traverser} meets invoke of this method in code,
6767
* then it starts concrete execution from this point.
6868
*/
6969
public static void executeConcretely() {

utbot-framework/src/main/java/org/utbot/engine/overrides/collections/UtArrayList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
/**
31-
* Class represents hybrid implementation (java + engine instructions) of List interface for UtBotSymbolicEngine.
31+
* Class represents hybrid implementation (java + engine instructions) of List interface for {@link org.utbot.engine.Traverser}.
3232
* <p>
3333
* Implementation is based on org.utbot.engine.overrides.collections.RangeModifiableArray.
3434
* Should behave similar to {@link java.util.ArrayList}.

utbot-framework/src/main/java/org/utbot/engine/overrides/collections/UtHashMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
/**
26-
* Class represents hybrid implementation (java + engine instructions) of Map interface for UtBotSymbolicEngine.
26+
* Class represents hybrid implementation (java + engine instructions) of Map interface for {@link org.utbot.engine.Traverser}.
2727
* <p>
2828
* Implementation is based on using org.utbot.engine.overrides.collections.RangeModifiableArray as keySet
2929
* and org.utbot.engine.overrides.collections.UtArray as associative array from keys to values.

utbot-framework/src/main/java/org/utbot/engine/overrides/collections/UtHashSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import static org.utbot.engine.overrides.UtOverrideMock.visit;
2121

2222
/**
23-
* Class represents hybrid implementation (java + engine instructions) of Set interface for UtBotSymbolicEngine.
23+
* Class represents hybrid implementation (java + engine instructions) of Set interface for {@link org.utbot.engine.Traverser}.
2424
* <p>
2525
* Implementation is based on RangedModifiableArray, and all operations are linear.
2626
* Should behave similar to

utbot-framework/src/main/java/org/utbot/engine/overrides/collections/UtOptional.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import static org.utbot.engine.overrides.UtOverrideMock.visit;
1414

1515
/**
16-
* Class represents hybrid implementation (java + engine instructions) of Optional for UtBotSymbolicEngine.
16+
* Class represents hybrid implementation (java + engine instructions) of Optional for {@link org.utbot.engine.Traverser}.
1717
* <p>
1818
* Should behave the same as {@link java.util.Optional}.
1919
* @see org.utbot.engine.OptionalWrapper

utbot-framework/src/main/java/org/utbot/engine/overrides/collections/UtOptionalDouble.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import static org.utbot.engine.overrides.UtOverrideMock.visit;
1212

1313
/**
14-
* Class represents hybrid implementation (java + engine instructions) of OptionalDouble for UtBotSymbolicEngine.
14+
* Class represents hybrid implementation (java + engine instructions) of OptionalDouble for {@link org.utbot.engine.Traverser}.
1515
* <p>
1616
* Should behave the same as {@link java.util.OptionalDouble}.
1717
* @see org.utbot.engine.OptionalWrapper

utbot-framework/src/main/java/org/utbot/engine/overrides/collections/UtOptionalInt.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import static org.utbot.engine.overrides.UtOverrideMock.visit;
1212

1313
/**
14-
* Class represents hybrid implementation (java + engine instructions) of OptionalInt for UtBotSymbolicEngine.
14+
* Class represents hybrid implementation (java + engine instructions) of OptionalInt for {@link org.utbot.engine.Traverser}.
1515
* <p>
1616
* Should behave the same as {@link java.util.OptionalInt}.
1717
* @see org.utbot.engine.OptionalWrapper

utbot-framework/src/main/java/org/utbot/engine/overrides/collections/UtOptionalLong.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import static org.utbot.engine.overrides.UtOverrideMock.visit;
1111

1212
/**
13-
* Class represents hybrid implementation (java + engine instructions) of Optional for UtBotSymbolicEngine.
13+
* Class represents hybrid implementation (java + engine instructions) of Optional for {@link org.utbot.engine.Traverser}.
1414
* <p>
1515
* Should behave the same as {@link java.util.Optional}.
1616
* @see org.utbot.engine.OptionalWrapper

0 commit comments

Comments
 (0)