From c26c995957b4a2640f0cd7b28b022eb9db62db12 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 13 Aug 2015 10:07:23 +0000 Subject: [PATCH] Add -dddebug and -ddtrace command-line arguments to PrismCL -dddebug activates the DebugJDD mechanism, while -ddtrace id will trace refs/derefs of the JDDNode with the given ID. -ddtrace implies -dddebug. Due to the additional efforts spent to keep track of the information, DebugJDD mode can slow-down model checking and increase memory usage. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10507 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/prism/PrismCL.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/prism/src/prism/PrismCL.java b/prism/src/prism/PrismCL.java index 13ff8386..003220d1 100644 --- a/prism/src/prism/PrismCL.java +++ b/prism/src/prism/PrismCL.java @@ -1078,6 +1078,22 @@ public class PrismCL implements PrismModelListener test = true; testExitsOnFail = false; } + else if (sw.equals("dddebug")) { + jdd.DebugJDD.enable(); + } + else if (sw.equals("ddtrace")) { + if (i < args.length - 1) { + String idString = args[++i]; + try { + int id = Integer.parseInt(idString); + jdd.DebugJDD.enableTracingForID(id); + } catch (NumberFormatException e) { + errorAndExit("The -" + sw + " switch requires an integer argument (JDDNode ID)"); + } + } else { + errorAndExit("The -" + sw + " switch requires an additional argument (JDDNode ID)"); + } + } // IMPORT OPTIONS: