You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: utbot-core/src/main/kotlin/org/utbot/common/HackUtil.kt
+32-12Lines changed: 32 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -25,26 +25,46 @@ inline fun <T> heuristic(reason: WorkaroundReason, block: () -> T): T = block()
25
25
26
26
/**
27
27
* Explains reason for applied workaround.
28
-
*
29
-
* Workarounds are:
30
-
* - HACK - hacks behaviour for contest. Shall be removed sometimes
31
-
* - MAKE_SYMBOLIC - Returns a new symbolic value with proper type instead of function result (i.e. for wrappers)
32
-
* - IGNORE_SORT_INEQUALITY -- Ignores pairs of particular sorts in stores and selects
33
-
* - RUN_CONCRETE -- Runs something concretely instead of symbolic run
34
-
* - REMOVE_ANONYMOUS_CLASSES -- Remove anonymous classes from the results passed to the code generation till it doesn't support their generation
35
-
* - IGNORE_MODEL_TYPES_INEQUALITY -- Ignore the fact that model before and model after have different types
36
-
* - LONG_CODE_FRAGMENTS -- Comment too long blocks of code due to JVM restrictions [65536 bytes](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3)
37
-
* - ARRAY_ELEMENT_TYPES_ALWAYS_NULLABLE -- Can't infer nullability for array elements from allocation statement, so make them nullable
38
-
* Note:
39
-
* - MAKE_SYMBOLIC can lose additional path constraints or branches from function call
40
28
*/
41
29
enumclassWorkaroundReason {
30
+
/**
31
+
* Hacks behaviour for contest. Shall be removed sometimes
32
+
*/
42
33
HACK,
34
+
/**
35
+
* Returns a new symbolic value with proper type instead of function result (i.e. for wrappers)
36
+
*
37
+
* [MAKE_SYMBOLIC] can lose additional path constraints or branches from function call
38
+
*/
43
39
MAKE_SYMBOLIC,
40
+
/**
41
+
* Ignores pairs of particular sorts in stores and selects
42
+
*/
44
43
IGNORE_SORT_INEQUALITY,
44
+
/**
45
+
* Runs something concretely instead of symbolic run
46
+
*/
45
47
RUN_CONCRETE,
48
+
/**
49
+
* Remove anonymous classes from the results passed to the code generation till it doesn't support their generation
50
+
*/
46
51
REMOVE_ANONYMOUS_CLASSES,
52
+
/**
53
+
* Ignore the fact that model before and model after have different types
54
+
*/
47
55
IGNORE_MODEL_TYPES_INEQUALITY,
56
+
/**
57
+
* Comment too long blocks of code due to JVM restrictions [65536 bytes](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3)
58
+
*/
48
59
LONG_CODE_FRAGMENTS,
60
+
/**
61
+
* Can't infer nullability for array elements from allocation statement, so make them nullable
62
+
*/
49
63
ARRAY_ELEMENT_TYPES_ALWAYS_NULLABLE,
64
+
/**
65
+
* We won't branch on static field from trusted libraries and won't add them to staticsBefore. For now, it saves us
66
+
* from setting [SecurityManager] and other suspicious stuff, but it can lead to coverage regression and thus it
0 commit comments