Skip to content

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 10 commits into from
Sep 18, 2022
Merged

Support lambda expressions #825

merged 10 commits into from
Sep 18, 2022

Conversation

ArsenHD
Copy link
Collaborator

@ArsenHD ArsenHD commented Aug 30, 2022

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 new UtLambdaModel for lambda values and use a LambdaMetafactory to build actual objects that represent lambdas.

Type of Change

  • New feature (non-breaking change which adds functionality)

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):

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • New documentation is provided or existed one is altered
  • No new warnings
  • New tests have been added
  • All tests pass locally with my changes

@ArsenHD ArsenHD force-pushed the ArsenHD/support-lambdas branch from 82a83b7 to d683ba5 Compare September 2, 2022 14:27
@ArsenHD ArsenHD force-pushed the ArsenHD/support-lambdas branch from 0daeeef to b3da371 Compare September 18, 2022 13:16
@ArsenHD ArsenHD force-pushed the ArsenHD/support-lambdas branch from b3da371 to 105615c Compare September 18, 2022 15:22
@ArsenHD ArsenHD enabled auto-merge (squash) September 18, 2022 16:43
Copy link
Member

@Damtev Damtev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ArsenHD ArsenHD merged commit 7d4a524 into main Sep 18, 2022
@ArsenHD ArsenHD deleted the ArsenHD/support-lambdas branch September 18, 2022 16:53
@denis-fokin denis-fokin added this to the Release preparation milestone Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants