From 987f46dafcbac448835c9826291024591cf54fd7 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Wed, 29 Jul 2015 10:11:56 +0000 Subject: [PATCH] StateValuesMTBDD: add static print(log, dd, model, description) method (useful for debugging) git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10452 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/prism/StateValuesMTBDD.java | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/prism/src/prism/StateValuesMTBDD.java b/prism/src/prism/StateValuesMTBDD.java index 9765f431..a18d9b93 100644 --- a/prism/src/prism/StateValuesMTBDD.java +++ b/prism/src/prism/StateValuesMTBDD.java @@ -566,7 +566,28 @@ public class StateValuesMTBDD implements StateValues printRec(values, 0, odd, 0); //log.println(); } - + + /** + * Print the state values for a JDDNode, representing an MTBDD over the row vars of a model. + *
[ REFS: none, DEREFS: value ] + * @param log the output log + * @param values the MTBDD node + * @param model the Model (for the variable information) + * @param description an optional description for printing (may be {@code null}) + */ + public static void print(PrismLog log, JDDNode values, Model model, String description) + { + StateValuesMTBDD sv = null; + try { + sv = new StateValuesMTBDD(values, model); + if (description != null) log.println(description); + sv.print(log); + } finally { + if (sv != null) + sv.clear(); + } + } + /** * Print vector to a log/file. * @param log The log