diff --git a/prism/src/jdd/JDD.java b/prism/src/jdd/JDD.java index 1716e66f..6aa59bce 100644 --- a/prism/src/jdd/JDD.java +++ b/prism/src/jdd/JDD.java @@ -320,6 +320,23 @@ public class JDD } } + /** + * Dereference array of JDDNodes, by dereferencing all (non-null) elements. + *
[ REFS: none, DEREFS: all elements of dds ] + * @param dds the array of JDDNodes + * @param n the expected length of the array (for detecting problems with refactoring) + */ + public static void DerefArray(JDDNode[] dds, int n) + { + if (n != dds.length) { + throw new RuntimeException("Mismatch in length of dd array and expected length!"); + } + for (JDDNode dd : dds) { + if (dd != null) + JDD.Deref(dd); + } + } + /** * print cudd cache info *
[ REFS: none, DEREFS: none ]