Skip to content

Commit

Permalink
Re-define similarity scoring for type features
Browse files Browse the repository at this point in the history
Previously, to compute similarity scores of type features, we first
assigned a unique prime number to each abstract type, and then
multiplied the number of type features, and finally compared the
multiplied number between two functions using relative difference.
However, this would produce a biased result as we arbitrarily assigned a
prime number to each abstract type.

In this fix, we compute the similarity scoring of type features using
Jaccard index. We changed the name of type feature and their usage.
  • Loading branch information
0xdkay committed Dec 24, 2021
1 parent 00d0ef3 commit 17248e6
Show file tree
Hide file tree
Showing 54 changed files with 387 additions and 124 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/results
/data
/.tiknib_cache
/*_output
8 changes: 6 additions & 2 deletions config/ase18/config_type_ase1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/ase18/config_type_ase2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/ase18/config_type_ase3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/ase18/config_type_ase4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_all_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_arch_all_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_arch_arm_mips_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_arch_bits_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_arch_endian_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_arch_x86_32-mipseb_64_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_arch_x86_arm_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_arch_x86_mips_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_comp_all_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_comp_clang4-gcc8_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_comp_clang_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_comp_gcc-clang_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_comp_gcc4-clang7_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_comp_gcc_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_hard_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_obfus_all_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_obfus_bcf_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_obfus_fla_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_obfus_hard_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
8 changes: 6 additions & 2 deletions config/gnu/config_gnu_normal_obfus_sub_type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ features:
- inst_num_cndctransfer
- inst_num_ctransfer
- inst_num_misc
- data_mul_arg_type
- data_num_args
- data_ret_type
# - data_mul_arg_type
# - data_ret_type

str_features:
- abstract_args_type
- abstract_ret_type

src_options:
opti:
Expand Down
Loading

0 comments on commit 17248e6

Please sign in to comment.