@@ -25,6 +25,7 @@ public class SmartaxeBenchmark {
2525 public static void main (String [] args ) {
2626 EVMLiSA .setWorkingDirectory (workingDirectory );
2727 EVMLiSA .setLinkUnsoundJumpsToAllJumpdest ();
28+ EVMLiSAExecutor .setCoresAvailable (Runtime .getRuntime ().availableProcessors () - 1 );
2829
2930 log .info ("Cores available: {}" , EVMLiSAExecutor .getCoresAvailable ());
3031
@@ -40,8 +41,7 @@ public static void main(String[] args) {
4041
4142 private void runBenchmark () {
4243 workingDirectory = workingDirectory .resolve ("manually-labeled" );
43- Path datasetPath = Paths .get ("scripts" , "python" , "benchmark-checkers" , "cross-chain" , "smartaxe" ,
44- "manually-labeled" );
44+ Path datasetPath = Paths .get ("datasets" , "cross-chain" , "smartaxe" , "manually-labeled" );
4545 Set <Bridge > bridges = new HashSet <>();
4646
4747 /* Initialize bridges */
@@ -50,10 +50,23 @@ private void runBenchmark() {
5050 if (Files .isDirectory (dir )) {
5151 Path bytecodeDirectoryPath = dir .resolve ("bytecode" );
5252 Path abiDirectoryPath = dir .resolve ("abi" );
53+ Path policyPath = dir .resolve ("cross-chain-policy.json" );
5354 String name = dir .getFileName ().toString ();
5455
56+ if (name .equalsIgnoreCase ("MeterPassPort20220206" )
57+ || name .equalsIgnoreCase ("pNetwork20210920" ))
58+ /*
59+ * Skip because there are no vulnerabilities in these
60+ * bridges
61+ */
62+ continue ;
63+
64+ if (name .equalsIgnoreCase ("QANXBridge20220518" ))
65+ /* Skip because there are no events in this bridge */
66+ continue ;
67+
5568 EVMLiSA .setWorkingDirectory (workingDirectory .resolve (name ));
56- bridges .add (new Bridge (bytecodeDirectoryPath , abiDirectoryPath , null , name ));
69+ bridges .add (new Bridge (bytecodeDirectoryPath , abiDirectoryPath , policyPath , name ));
5770 }
5871 }
5972 } catch (IOException e ) {
@@ -86,10 +99,8 @@ private void runBenchmark() {
8699 xEVMLiSA .getCrossChainEdgesUsingEventsAndFunctionsEntrypoint (bridge ));
87100 }));
88101 for (SmartContract contract : bridge )
89- futures .add (
90- EVMLiSAExecutor
91- .submit (SmartaxeBenchmark .class ,
92- () -> xEVMLiSA .computeVulnerablesLOGsForLocalDependencyChecker (contract )));
102+ futures .add (EVMLiSAExecutor .submit (SmartaxeBenchmark .class ,
103+ () -> xEVMLiSA .computeVulnerablesLOGsForLocalDependencyChecker (contract )));
93104 }
94105 EVMLiSAExecutor .awaitCompletionFutures (futures , 12 , TimeUnit .HOURS ); // barrier
95106
0 commit comments