diff --git a/Src/PChecker/CheckerCore/SystematicTesting/TestingEngine.cs b/Src/PChecker/CheckerCore/SystematicTesting/TestingEngine.cs
index a72cfbdd8..b86a3852a 100644
--- a/Src/PChecker/CheckerCore/SystematicTesting/TestingEngine.cs
+++ b/Src/PChecker/CheckerCore/SystematicTesting/TestingEngine.cs
@@ -591,6 +591,36 @@ public string GetReport()
return TestReport.GetText(_checkerConfiguration, "...");
}
+ ///
+ /// Returns an object where the value null is replaced with "null"
+ ///
+ public object RecursivelyReplaceNullWithString(object obj) {
+ if (obj == null) {
+ return "null";
+ }
+ if (obj is Dictionary dictionary) {
+ var newDictionary = new Dictionary();
+ foreach (var item in dictionary) {
+ var newVal = RecursivelyReplaceNullWithString(item.Value);
+ if (newVal != null)
+ newDictionary[item.Key] = newVal;
+ }
+ return newDictionary;
+ }
+ else if (obj is List