GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Сonstraint model synthesis by AbdullinAM · Pull Request #1030 · UnitTestBot/UTBotJava

Conversation

@AbdullinAM

@AbdullinAM AbdullinAM commented Sep 29, 2022

Copy link
Copy Markdown

Description

Constrained model synthesis prototype. It tries to generate UtAssembleModel that creates an object using it's public API for each argument of the method under test.

This is a new PR for constraint model synthesis with the rebase to master (it was easier to create a new branch than to resolve all the conflicts from the old one). I closed the old PR #966

Type of Change

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Automated Testing

Feature was tested on open-source projects: exp4j, guava, fastjson, etc.

Also SynthesisExamplesTest was added.

Manual Scenario

Example class org.utbot.examples.synthesis.SynthesisExamples was added to the utbot-sample module. Running UtBot on the methods from that class with UtSettings.enableSynthesis set to true should show several scenarios of how constrained model synthesis allows to generate test cases that use public API of the objects

Checklist (remove irrelevant options):

This is the author self-check list

  • 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
AbdullinAM added 4 commits September 28, 2022 16:37
@AbdullinAM
squash constraint model synthesis
1175678
@AbdullinAM
squash constraint model synthesis
d69ebc4
@AbdullinAM
resolver fix
8d68488
@AbdullinAM
model based post condition constructor restored
c6cac8d
@AbdullinAM

AbdullinAM commented Sep 29, 2022

Copy link
Copy Markdown
Author

tagging @sergeypospelov to ensure that you will see the new PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AbdullinAM and others added 25 commits October 11, 2022 12:35
@AbdullinAM
very primitive global timeoutfor synthesis
df75f26
@Damtev @AbdullinAM
Primitive Stream wrappers (no laziness and source mutations support) (U…
e10a50e
…nitTestBot#871)

* Fixed repeated `hashCode` calculation for `Edge`

* Added `toArray` without ClassCastException check API

* Fixed UNSAT core debug logging
@onewhl @AbdullinAM
Avoid summary duplication UnitTestBot#985 (UnitTestBot#1015)
80da28b
* Avoid summary duplication UnitTestBot#985

* Fix rendering for 2022.1.4
@volivan239 @AbdullinAM
Fix bug in filtering Kotlin getters/setters in plugin (UnitTestBot#1026)
608d56c
@amandelpie @onewhl @AbdullinAM
Reordered the test clusters (UnitTestBot#991)
1f59106
* Reordered the test clusters

* Renamed clusters

* Fixed tests

* Fixed tests

Co-authored-by: Zarina Kurbatova <[email protected]>
@volivan239 @AbdullinAM
Fix build directory for classes from Kotlin files (UnitTestBot#1019)
f96c118
@EgorkaKulikov @AbdullinAM
Improve choosing between simpleName and canonicalName in rendered code (
40bf31b
UnitTestBot#1040)
@viktoriia-fomina @AbdullinAM
Run tests on push into release branches (UnitTestBot#1045)
3380506
@dtim @AbdullinAM
Fix utbot-maven compilation (UnitTestBot#1049)
234ace0
@mmvpm @AbdullinAM
Support AssertionError in SARIF report (UnitTestBot#1032)
1a0289d
@onewhl @AbdullinAM
Render links in the invokes part of JavaDocs (UnitTestBot#1051)
7b417c9
Render links in invokes part of JavaDocs
@Markoutte @AbdullinAM
Improve fuzzer recursive model providers (UnitTestBot#1039)
0cedf7a
@Vassiliy-Kudryashov @AbdullinAM
IndexNotReadyException thrown in IDEA with installed UnitTestBot plug… (
4293d4f
UnitTestBot#1047)

IndexNotReadyException thrown in IDEA with installed UnitTestBot plugin UnitTestBot#273

1) Add dumb mode wrapping
2) Split long EDT consumers into chains-of-invokeLater
3) Disable IntentionHelper for a while (it causes tricky exceptions and hanging)
@viktoriia-fomina @AbdullinAM
Publish without workflow run number (UnitTestBot#1053)
a5d628c
@EgorkaKulikov @AbdullinAM
Modificators processing in AssembleModelGenerator and UtBotFieldModif…
ba08cb7
…icatorsSearcher corrected (UnitTestBot#1029)

* Improve modificators analysis in UtBotFieldModificatorsSearcher and AssembleModelGenerator

* Apply review comments

* Fixed test

* One more correction for package names
@bissquit @AbdullinAM
Gradle cache usage added UnitTestBot#974 (UnitTestBot#998)
ae5b883
@EgorkaKulikov @AbdullinAM
Try to fix memory leak in CgComponents (UnitTestBot#1057)
b6d8a65
* Try to fix memory leak in CgFieldStateManager

* Removed unused testClassConstructors

* Make CgContext much more thin

* Clear content related maps before the processing of new test class
@Domonion @AbdullinAM
Repeating SourceFolder fix (UnitTestBot#1073)
77194a3
In case of repeating SourceFolders action would not be shown.
From now it takes first SourceFolder with the same virtual file source
root
@onewhl @AbdullinAM
Include information about triggered recursion to Javadocs (UnitTestBo…
0ff62da
…t#1084)

Include information about triggered recursion to javadocs
@onewhl @AbdullinAM
Fix rendering for different IDE versions (UnitTestBot#1087)
e5d8b5f
* Fix rendering for different IDE versions

* add info about IDE version for each case
@Damtev @AbdullinAM
Fixed unavailable mock classes (UnitTestBot#1066)
8016349
@Domonion @AbdullinAM
Engine process UnitTestBot#2 (UnitTestBot#1067)
f55c96d
[utbot-rd]
1. engine out-of-process
2. removed jdk8+ api calls in engine-related code
3. removed reflection in utbot-intellij to support idea 2022
4. bumped idea version and plugin sdk
5. reactive settings
6. ClientProcessBuilder to support out-of-process
7. moved sarifs, test generation, code generation and TestGenerationReport to another process
@CaelmBleidd @AbdullinAM
Remove unsat states from invokes (UnitTestBot#1071)
f3af058
@Vassiliy-Kudryashov @AbdullinAM
Settings revision, 2nd iteration UnitTestBot#977 (UnitTestBot#1088)
e298169
@sergeypospelov @AbdullinAM
Fix soot initialization (UnitTestBot#1090)
5a690b9
EgorkaKulikov and others added 30 commits October 17, 2022 16:58
@EgorkaKulikov @AbdullinAM
Improve verification that static mocking is configured (UnitTestBot#1091
cd3dcd1
)

* Improve verification that static mocking is configured

* Wrap file reading with try/catch
@SBOne-Kenobi @AbdullinAM
Fix assertions (UnitTestBot#1096)
b067af9
@volivan239 @AbdullinAM
Cancel test generation if compilation was not successful UnitTestBot#…
43efb96
…1100 (UnitTestBot#1103)
@Vassiliy-Kudryashov @AbdullinAM
Vassiliy kudryashov/1021 plugin support idea 20222 new (UnitTestBot#1094
bf272b6
)

Setup 222 versions for IntelliJ and plugins
Fix wrong import
Add try/catch temporary wrapping to obtain stacktrace
Update soot version (commit hash)
Get rid of commented lines, better logging added
@onewhl @AbdullinAM
Wrap method reference into @link tag only if the invoked method is no…
fc61391
…t private (UnitTestBot#1106)

* Wrap method reference into @link tag only if the invoked method is not private

* Fix tests
@EgorkaKulikov @AbdullinAM
Notify and reason to the user that UtBot can't be run on the class in…
4ce788d
… editor (UnitTestBot#1105)

* Notify and reason to the user that UtBot can't be run on the edited class

* Improve previous implementation
@Vassiliy-Kudryashov @AbdullinAM
Make snapshot version calendar-dependant (UnitTestBot#1108)
0abc48b
@Vassiliy-Kudryashov @AbdullinAM
We create temporary files a lot, we have to clean it either (UnitTest…
a215477
…Bot#1089)
@volivan239 @AbdullinAM
Get PsiClass' package by declaration in containingFile and not by its…
8280807
… directory UnitTestBot#1081 (UnitTestBot#1111)
@Domonion @AbdullinAM
Out of process bug fixes (UnitTestBot#1109)
8fb3938
1. added ability to set log level for EngineProcess and ChildProcess.kt. Look for related UtSettings.engineProcessLogLevel and UtSettings.childProcessLogLevels
2. opening additional packages to support jdk17+, see OpenModulesContainer
3. fixed using javaw on unix environments
4. fixed using readaction in dumb mode
@Vassiliy-Kudryashov @AbdullinAM
Plugin setting to choose Kotlin generation doesn't work UnitTestBot#1075
5fb1e16
 (UnitTestBot#1110)
@sofurihafe @EgorkaKulikov @AbdullinAM
Lessen thisInstance creation in parameterized test generation (UnitTe…
ad150ba
…stBot#1065)

* Lessen thisInstance creation in parameterized test generation

* Avoid incorrect configuration

Co-authored-by: Egor Kulikov <[email protected]>
@Vassiliy-Kudryashov @AbdullinAM
Fix settings persistence: we save IDs, thus we should parse IDs inste… (
2f03687
UnitTestBot#1116)

Fix settings persistence: we save IDs, thus we should parse IDs instead of display names
@EgorkaKulikov @denis-fokin @AbdullinAM
Support Android Studio in utbot-intellij (UnitTestBot#1121)
15bdfa8
* Enable android support in kts

* Get rid of AS. Use the path only

* Better naming

* Corrected comment

* Commented Android Studio for other users

Co-authored-by: Denis Fokin <[email protected]>
@volivan239 @AbdullinAM
Select Kotlin test src root by default when generating for Kotlin Uni…
166b393
…tTestBot#949 (UnitTestBot#1074)
@EgorkaKulikov @AbdullinAM
Filter generated sources in Android Studio projects UnitTestBot#692 (U…
c7618bb
…nitTestBot#1123)
@SBOne-Kenobi @AbdullinAM
Exclude mocking javax (UnitTestBot#1124)
5479449
@Domonion @AbdullinAM
Linux engine process fix (UnitTestBot#1126)
06c548e
[utbot-rd]
fixing ubuntu process start and log creating
@EgorkaKulikov @AbdullinAM
Android Studio troubleshooting related to Lombok improved (UnitTestBo…
7e71d75
…t#1131)

Android Studio troubleshooting related to Lombok improved.
@Markoutte @AbdullinAM
Other class is not mocked as required UnitTestBot#747 (UnitTestBot#1033)
1a18c53
@sofurihafe @EgorkaKulikov @AbdullinAM
Add parameterized test generation in CI (UnitTestBot#1114)
d1bea97
* Add parameterized test generation in ci

* Little style corrections

* Move *containsMocking* flag to UtSymbolicExecution

Co-authored-by: Egor Kulikov <[email protected]>
@SBOne-Kenobi @AbdullinAM
Fix static mocking (UnitTestBot#1142)
5181cef
@amandelpie @AbdullinAM
Added simple custom JavaDocs for the tests produced by Fuzzer (UnitTe…
4706d1b
…stBot#1069)

* Added an initial solution

* Added a method and class references

* Refactor to avoid bugs with private methods

* Handled empty values

* Fixed tests and add a TODO ticket

* Fixed review comments
@Markoutte @AbdullinAM
Concrete execution fails for a static method using a static field Uni…
d36b988
…tTestBot#711 (UnitTestBot#1143)
@Damtev @AbdullinAM
Field assertions fixes (UnitTestBot#920)
a55999d
* Used real variable type after field access with reflection if possible

* Added missing line separator after single-line block comment

* Added missed initial field states for arrays

* Removed field state assertions for failing tests
@Domonion @AbdullinAM
Fix dump mode fail (UnitTestBot#1146)
529c10d
* [utbot-rd]
more logs, dump mode fixes

* Pathseparator fix, removed useless scheduler
@mmvpm @AbdullinAM
Refactor Sarif reports (UnitTestBot#1152)
4470ea8
@viktoriia-fomina @AbdullinAM
Publish plugin and CLI for minor release (UnitTestBot#1155)
d4cb666
@Domonion @AbdullinAM
Fixing long summarization timeouts & mics (UnitTestBot#1151)
cad8133
* [utbot-rd]
fixing long delays in summarization, fixing sarif reports resource root creation, fixing kryo serialization error, fixing idea thread relating problems

* [utbot-rd]
compilation fix
@AbdullinAM
squash constraint model synthesis
724b794
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

17 participants

@AbdullinAM @Damtev @onewhl @volivan239 @amandelpie @EgorkaKulikov @viktoriia-fomina @dtim @mmvpm @Markoutte @Vassiliy-Kudryashov @bissquit @Domonion @CaelmBleidd @sergeypospelov @SBOne-Kenobi @sofurihafe
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.