-
Notifications
You must be signed in to change notification settings - Fork 46
Support lambda expressions #825
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
82a83b7
to
d683ba5
Compare
Damtev
requested changes
Sep 2, 2022
utbot-framework-api/src/main/kotlin/org/utbot/framework/UtSettings.kt
Outdated
Show resolved
Hide resolved
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt
Outdated
Show resolved
Hide resolved
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/framework/assemble/AssembleModelGenerator.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/tree/CgElement.kt
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/engine/TypeResolver.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/engine/TypeResolver.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/UtBotSymbolicEngine.kt
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/visitor/UtilMethods.kt
Outdated
Show resolved
Hide resolved
8 tasks
2443d24
to
1b9da06
Compare
0daeeef
to
b3da371
Compare
b3da371
to
105615c
Compare
Damtev
approved these changes
Sep 18, 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.
LGTM
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.
Description
Previously, we did not use lambdas as values for fields or method parameters. While the engine did find the suitable lambdas that could have been used, we were not able to construct variables for them. The reasion is that Soot represents lambdas as objects of some class (which does not actually exist) and when we tried to construct a
UtModel
for a lambda, we failed trying to access this nonexistent class. Now we use a newUtLambdaModel
for lambda values and use a LambdaMetafactory to build actual objects that represent lambdas.Type of Change
How Has This Been Tested?
Automated Testing
This is a new test that checks how we work in case when there are no options other than using lambdas to construct tests.
org.utbot.examples.lambda.CustomPredicateExampleTest
Checklist (remove irrelevant options):