@@ -164,6 +164,13 @@ public static boolean isInPaperMode() {
164164 public static void setPaperMode () {
165165 PAPER_MODE = true ;
166166 }
167+
168+ /**
169+ * Disables the paper mode (i.e., statistics contains jump classifications as in the reference paper).
170+ */
171+ public static void disablePaperMode () {
172+ PAPER_MODE = false ;
173+ }
167174
168175 /**
169176 * Executes the analysis workflow.
@@ -235,9 +242,19 @@ else if (cmd.hasOption("bytecode")) {
235242 * @param filePath the path to the file containing contract addresses
236243 */
237244 public static void analyzeSetOfContracts (Path filePath ) {
245+ analyzeSetOfContracts (filePath , true );
246+ }
247+
248+ /**
249+ * Analyzes a set of smart contracts from a given file.
250+ *
251+ * @param filePath the path to the file containing contract addresses
252+ * @param shutdown whether to shut down the executor after the analysis
253+ */
254+ public static void analyzeSetOfContracts (Path filePath , boolean shutdown ) {
238255 log .info ("Building contracts." );
239256 List <SmartContract > contracts = buildContractsFromFile (filePath );
240- analyzeSetOfContracts (contracts );
257+ analyzeSetOfContracts (contracts , shutdown );
241258 }
242259
243260 /**
@@ -246,6 +263,16 @@ public static void analyzeSetOfContracts(Path filePath) {
246263 * @param contracts the list of {@link SmartContract} to be analyzed
247264 */
248265 public static void analyzeSetOfContracts (List <SmartContract > contracts ) {
266+ analyzeSetOfContracts (contracts , true );
267+ }
268+
269+ /**
270+ * Analyzes a set of smart contracts from a list of {@link SmartContract}.
271+ *
272+ * @param contracts the list of {@link SmartContract} to be analyzed
273+ * @param shutdown whether to shut down the executor after the analysis
274+ */
275+ public static void analyzeSetOfContracts (List <SmartContract > contracts , boolean shutdown ) {
249276 log .info ("Analyzing {} contracts." , contracts .size ());
250277
251278 List <Future <?>> futures = new ArrayList <>();
@@ -272,7 +299,9 @@ public static void analyzeSetOfContracts(List<SmartContract> contracts) {
272299 System .err .println (JSONManager .throwNewError ("Failed to save results in " + outputDir ));
273300 System .exit (1 );
274301 }
275- EVMLiSAExecutor .shutdown ();
302+
303+ if (shutdown )
304+ EVMLiSAExecutor .shutdown ();
276305 }
277306
278307 /**
0 commit comments