Skip to main content
  1. 🏃 Usage/

4. Reaggregating Scores (`reaggregate` command)

·208 words

The reaggregate command allows you to recalculate the program-wide similarity score from previously computed element-wise (function-to-function) similarity files. This avoids having to completely rerun expensive pairwise comparisons if you simply want to test a different aggregation method (e.g., swapping between hungarian and topn:N).


🏃 Usage
#

oinkie reaggregate [OPTIONS] <SCORE_DIRECTORY>

Arguments
#

  • <SCORE_DIRECTORY>
    Path to the directory containing the saved element-wise function similarity scores (often located inside the output folder generated by the compare command).

Options
#

  • -A, --aggregator <METHOD>
    Specify the aggregator method to combine function-to-function scores into a single program-wide score. [default: hungarian]
    • hungarian: Optimal overall bipartite matching between functions.
    • topn:N: Only average the top \(N\) closest matches for each function.
  • -d, --dest-file <RESULT.CSV>
    The path to the destination CSV file where the reaggregated program-wise similarity scores list will be saved. [default: reaggregate.csv]

💡 Practical Workflow Example
#

Imagine you have run a large comparison across hundreds of files using the standard hungarian aggregator:

oinkie compare -d comparison_results -A hungarian ./birthmarks/*.json

If you later want to analyze the results using the topn:3 strategy, you do not need to compare all function sequences again. You can re-run just the aggregation stage:

oinkie reaggregate -A topn:3 -d comparison_results/reaggregated_top3.csv comparison_results

This significantly speeds up analysis workflows on large-scale datasets.