nevillegrech / gigahorse-toolchain

A binary lifter and analysis framework for Ethereum smart contracts
Other
290 stars 59 forks source link

Optimize block cloning by cloning per statement instead of per block #118

Closed sifislag closed 8 months ago

sifislag commented 8 months ago

This change can give a very significant precision improvement in some datasets (taken from here).

solc08-over10k:

ANALYTIC: decomp_time
nov23-10k-master (common): 11398.259241819382 (+0.1186%)
nov23-10k-more-pre (common): 11384.759516000748

ANALYTIC: Analytics_JumpToMany
nov23-10k-master (common): 471 (+8.028%)
nov23-10k-more-pre (common): 436

ANALYTIC: Analytics_DeadBlocks
nov23-10k-master (common): 2090 (+1.802%)
nov23-10k-more-pre (common): 2053

ANALYTIC: Analytics_StmtMissingOperand
nov23-10k-master (common): 85 (+4.938%)
nov23-10k-more-pre (common): 81

viair-june23:

ANALYTIC: decomp_time
nov23-ir-master (common): 9764.224865198135
nov23-ir-more-pre (common): 9766.088721513748 (+0.01909%)

ANALYTIC: Analytics_JumpToMany
nov23-ir-master (common): 3968 (+23.19%)
nov23-ir-more-pre (common): 3221

ANALYTIC: Analytics_BlockHasNoTACBlock
nov23-ir-master (common): 948
nov23-ir-more-pre (common): 949 (+0.1055%)

ANALYTIC: Analytics_DeadBlocks
nov23-ir-master (common): 8158
nov23-ir-more-pre (common): 8184 (+0.3187%)

ANALYTIC: Analytics_StmtMissingOperand
nov23-ir-master (common): 376 (+2.174%)
nov23-ir-more-pre (common): 368

metadata-dataset1:

ANALYTIC: decomp_time
nov23-meta-master (common): 9153.032186985016 (+0.09607%)
nov23-meta-more-pre (common): 9144.247057914734

ANALYTIC: Analytics_JumpToMany
nov23-meta-master (common): 419 (+17.04%)
nov23-meta-more-pre (common): 358

ANALYTIC: Analytics_StmtMissingOperand
nov23-meta-master (common): 109 (+29.76%)
nov23-meta-more-pre (common): 84

ANALYTIC: Analytics_PrivateFunctionMatchesMetadataIncorrectArgs
nov23-meta-master (common): 533 (+7.243%)
nov23-meta-more-pre (common): 497

ANALYTIC: Analytics_PrivateFunctionMatchesMetadataIncorrectReturnArgs
nov23-meta-master (common): 718 (+1.269%)
nov23-meta-more-pre (common): 709
github-actions[bot] commented 8 months ago

Test Results (Souffle 2.3)

46 tests  ±0   46 :heavy_check_mark: ±0   17m 48s :stopwatch: +7s   1 suites ±0     0 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit 7dc474af. ± Comparison against base commit 56160261.

github-actions[bot] commented 8 months ago

Test Results (Souffle 2.4)

46 tests  ±0   46 :heavy_check_mark: ±0   18m 14s :stopwatch: -5s   1 suites ±0     0 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit 7dc474af. ± Comparison against base commit 56160261.