Title: Extract Traverser from UtBotSymbolicEngine by sergeypospelov · Pull Request #307 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Extract Traverser from UtBotSymbolicEngine by sergeypospelov · Pull Request #307 · UnitTestBot/UTBotJava
X Title: Extract Traverser from UtBotSymbolicEngine by sergeypospelov · Pull Request #307 · UnitTestBot/UTBotJava
Description: Description
Split the logic of UtBotSymbolicEngine into two classes:
UtBotSymbolicEngine
Traverser
Introduced new classes and some TODO stubs:
StateLabel is used for marking ExecutionState accordingly to their status (INTERMIDIATE, CONCRETE, TERMINAL). See the comments in the code for more information.
TraversalContext is a context during one Jimple instruction traversal. Now there are some TODO stubs for the future work.
Refactored several relevant places with non-functional changes:
Changed signatures of some traversal functions
Moved some functions to more convenient places
Fixed hack on nullable SymbolicResult in processResult
Other minor refactorings
Fixes #259
Details
Previously UtBotSymbolicEngine had the complex logic of different types:
setting up everything
working with the states queue
Jimple travesal
working with the symbolic state
processing final states
The idea is to split some of the aspects of the engine logic into different classes. In this MR the extraction of Jimple traversal was done. Now we have two classes:
UtBotSymbolicEngine
Now UtBotSymbolicEngine is a manager class. It's created once for one method analysis process. We can't reuse it for different methods. It sets up everything for Traverser, controls the flow of polling states from the queue and pushing new states to the queue and also processes terminal states.
So now the next things are done in UtBotSymbolicEngine:
setting up everything
working with the states queue
processing final states
Traverser
Traverser is responsible for traversing the top instruction from the passed ExecutionState. It's created inside UtBotSymbolicEngine and can't be reused between different methods ("method-under-test"s). The main function is traverse(state: ExecutionState): Collection
Open Graph Description: Description Split the logic of UtBotSymbolicEngine into two classes: UtBotSymbolicEngine Traverser Introduced new classes and some TODO stubs: StateLabel is used for marking ExecutionState accor...
X Description: Description Split the logic of UtBotSymbolicEngine into two classes: UtBotSymbolicEngine Traverser Introduced new classes and some TODO stubs: StateLabel is used for marking ExecutionState accor...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/307
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:c800ca63-0c70-74c1-aa58-fe18037dcdaf |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | D5AC:118805:FDE409:1435A8F:69924E96 |
| html-safe-nonce | 874f22f070e672bedeea7a67edff21485b54114d0bcf87c4cf93ee1fff142bac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUFDOjExODgwNTpGREU0MDk6MTQzNUE4Rjo2OTkyNEU5NiIsInZpc2l0b3JfaWQiOiIzOTUxNjA0NzUwMDE4MDM5NDQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 02a23f4ca4c97584cc4dacb9a958c69a8996c1343441989b40ac55870e4815c4 |
| hovercard-subject-tag | pull_request:979765699 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/UnitTestBot/UTBotJava/pull/307/checks |
| twitter:image | https://avatars.githubusercontent.com/u/30112817?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/30112817?s=400&v=4 |
| og:image:alt | Description Split the logic of UtBotSymbolicEngine into two classes: UtBotSymbolicEngine Traverser Introduced new classes and some TODO stubs: StateLabel is used for marking ExecutionState accor... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git |
| octolytics-dimension-user_id | 87413538 |
| octolytics-dimension-user_login | UnitTestBot |
| octolytics-dimension-repository_id | 480810501 |
| octolytics-dimension-repository_nwo | UnitTestBot/UTBotJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 480810501 |
| octolytics-dimension-repository_network_root_nwo | UnitTestBot/UTBotJava |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width