-
Notifications
You must be signed in to change notification settings - Fork 46
Сoncrete values for enums #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e677199
to
689f701
Compare
CaelmBleidd
requested changes
May 25, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a design doc for concrete processing of enum's clinit sections
utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/engine/util/statics/concrete/EnumConcreteUtils.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/engine/util/statics/concrete/EnumConcreteUtils.kt
Outdated
Show resolved
Hide resolved
f5aa849
to
bf8e294
Compare
CaelmBleidd
approved these changes
May 26, 2022
9f89429
to
3bd2859
Compare
2828472
to
6e9d74b
Compare
6e9d74b
to
ce6c64f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #18, closes #32
To increase the performance of symbolic analysis for source code that uses enums, we can extract these enums concretely from runtime instead of enum's initializers analysis which can require a lot of time for enums with a lot of constants (because enum's static initializer fills fields for every enum constant, creates
$VALUES
array, invokesjava.lang.Enum
initializer for every constant, etc).But very important thing is that we cannot process concretely every enum but only isolated - enums that do not affect the system state (like other classes' statics) in their initializers and do not use external statics to initialize its own statics. To prevent concrete processing of enum that is not isolated, we need to traverse its static initializer and check that it does not initialize external statics and does not use external statics to initialize its own statics.