-
Notifications
You must be signed in to change notification settings - Fork 188
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
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
Result
class and its associated data classes. The key improvements and changes are:1. UML Design: Inheritance → Composition
BuildResult
andRunResult
inbuilder_runner.py
andresults.py
) to streamline data containers.UML Diagram Link
2. Class Renaming for Clarity
BuildResult
,RunResult
, andAnalysisResult
to:BuildInfo
RunInfo
AnalysisInfo
3. Migration to New Result Class
results.py
fuzz_target_error.py
builder_runner.py
run_one_experiment.py
semantic_analyzer.py
pipeline.py
evaluator.py
execution_stage.py
prototyper.py
enhancer.py
4. New Class Field Semantic Definition
succeeded
→compiles
inBuildInfo
succeeded
→crashes
inRunInfo
get_build_script_source()
andget_fuzz_target_source()
inResult
for better access.5. Crash and Coverage Adaptations
Result
:true_bug
andinsight
fromCrashResult
run_error
,crash_func
,crash_symptom
,crash_stacks
fromSemanticCheckResult
CoverageAnalysis
to include:improve_required
insight
suggestions
success
property toAnalysisInfo
.6. Error Type Consolidation
SemanticCheckResult
into 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_type
toAnalysisInfo
for 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
Result
class 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.