Skip to content

Concrete executor phases refactoring #1446

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 3 commits into from
Dec 8, 2022

Conversation

SBOne-Kenobi
Copy link
Collaborator

@SBOne-Kenobi SBOne-Kenobi commented Dec 1, 2022

Description

We need some refactoring changes due to this discussion comment.

This PR introduces a refactoring that splits the pipeline of UtExecutionInstrumentation into phases:

  1. Value construction
  2. Preparation
  3. Invocation
  4. Statistics collection
  5. Model construction
  6. Postprocessing

Also, was added additional exceptions handling with wrapping an exception into PhaseException according to a phase where the exception was thrown.

classDiagram
  direction LR
  class PhaseContext~E: PhaseError~
  <<interface>> PhaseContext
  PhaseContext : +wrapError(Throwable error)  E
  
  class ValueConstructionContext~ValueConstructionPhaseError~
  PhaseContext ..|> ValueConstructionContext

  class PreparationContext~PreparationPhaseError~
  PhaseContext ..|> PreparationContext

  class InvocationContext~InvocationPhaseError~
  PhaseContext ..|> InvocationContext

  class StatisticsCollectionContext~StatisticsCollectionPhaseError~
  PhaseContext ..|> StatisticsCollectionContext

  class ModelConstructionContext~ModelConstructionPhaseError~
  PhaseContext ..|> ModelConstructionContext

  class PostprocessingContext~PostprocessingPhaseError~
  PhaseContext ..|> PostprocessingContext

  class PhasesController 

  ValueConstructionContext --o PhasesController 
  PreparationContext --o PhasesController 
  InvocationContext --o PhasesController 
  StatisticsCollectionContext --o PhasesController 
  PostprocessingContext --o PhasesController 
Loading

Type of Change

  • Refactoring (typos and non-functional changes)

Checklist:

  • 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

@SBOne-Kenobi SBOne-Kenobi changed the title Concrete executor refactoring Concrete executor phases refactoring Dec 1, 2022
@SBOne-Kenobi SBOne-Kenobi force-pushed the sbone/concrete-executor-refactor branch from fcd0de0 to cdce35f Compare December 5, 2022 07:58
@SBOne-Kenobi SBOne-Kenobi marked this pull request as ready for review December 5, 2022 08:30
Copy link
Member

@sergeypospelov sergeypospelov left a comment

Choose a reason for hiding this comment

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

LGTM.
I suggest adding some comments oneach PhaseContext, just a simple description what a certain phases does.

@SBOne-Kenobi SBOne-Kenobi force-pushed the sbone/concrete-executor-refactor branch from cdce35f to 1b29d21 Compare December 8, 2022 10:11
@SBOne-Kenobi SBOne-Kenobi enabled auto-merge (squash) December 8, 2022 10:11
@SBOne-Kenobi SBOne-Kenobi merged commit b5f40fc into main Dec 8, 2022
@SBOne-Kenobi SBOne-Kenobi deleted the sbone/concrete-executor-refactor branch December 8, 2022 10:28
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.

2 participants