-
Notifications
You must be signed in to change notification settings - Fork 204
Refactor Result Classes with Unified Data Container and Improved Extensibility #948
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
base: main
Are you sure you want to change the base?
Conversation
55f076c to
144da7c
Compare
144da7c to
79ace8d
Compare
… used and referenced in the original results.py file
79ace8d to
791dc39
Compare
DonggeLiu
left a comment
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.
Thanks @zewei-wang!
The new design looks pretty good to me in general.
Would you prefer to merge this and start replacing the current results.py with the new one in another PR, or do both in one PR?
Thank you @DonggeLiu . Because the files are additional, I prefer to merge it first, then I will migrate the logic and create another PR for migration tasks. |
Because the old PR: #941 is accidentally closed and cannot be reopened. I created this new PR with new nits fixed commit.
Description:
This pull request introduces a major refactor to the
Resultclass and its associated data classes. The key improvements and changes are:1. UML Design: Inheritance → Composition
BuildResultandRunResultinbuilder_runner.pyandresults.py) to streamline data containers.UML Diagram Link
2. Class Renaming for Clarity
BuildResult,RunResult, andAnalysisResultto:BuildInfoRunInfoAnalysisInfo3. Migration to New Result Class
results.pyfuzz_target_error.pybuilder_runner.pyrun_one_experiment.pysemantic_analyzer.pypipeline.pyevaluator.pyexecution_stage.pyprototyper.pyenhancer.py4. New Class Field Semantic Definition
succeeded→compilesinBuildInfosucceeded→crashesinRunInfoget_build_script_source()andget_fuzz_target_source()inResultfor better access.5. Crash and Coverage Adaptations
Result:true_bugandinsightfromCrashResultrun_error,crash_func,crash_symptom,crash_stacksfromSemanticCheckResultCoverageAnalysisto include:improve_requiredinsightsuggestionssuccessproperty toAnalysisInfo.6. Error Type Consolidation
SemanticCheckResultinto an enumeration:FuzzTargetResult.NORM_NO_SEMANTIC_ERR)FP_TARGET_CRASH)COV_NO_INCREASE)NON_SEC_CRASH_NULL_DEREF,NON_SEC_CRASH_SIGNAL)GEN_OVERWRITE_CONST)error_typetoAnalysisInfofor better alignment with analysis stages.7. Backward Compatibility and New API Methods
is_build_successful()to preserve backward compatibility for current business logic.8. Code Quality and Refactor Considerations
Resultclass can be safely consumed across multiple stages without boundary errors.Great thanks to @DonggeLiu for input on refining the UML Design and background context clariying and @oliverchang for reviewing the first version commits.