44package de .uka .ilkd .key .logic ;
55
66
7+ import java .util .Objects ;
8+
79import de .uka .ilkd .key .logic .op .IProgramVariable ;
810import org .jspecify .annotations .NullMarked ;
911import de .uka .ilkd .key .logic .op .ParametricFunctionDecl ;
@@ -32,7 +34,7 @@ public class NamespaceSet {
3234 private Namespace <ParametricSortDecl > parametricSortNS = new Namespace <>();
3335 private Namespace <ParametricFunctionDecl > parametricFuncNS = new Namespace <>();
3436 private Namespace <Choice > choiceNS = new Namespace <>();
35- private final DocSpace documentation = new DocSpace ();
37+ private DocSpace documentation = new DocSpace ();
3638
3739 public NamespaceSet () {
3840 }
@@ -65,7 +67,7 @@ public NamespaceSet(Namespace<QuantifiableVariable> varNS,
6567 this .choiceNS = choiceNS ;
6668 this .parametricSortNS = parametricSortNS ;
6769 this .parametricFuncNS = parametricFuncNS ;
68- this .documentation . add (documentation );
70+ this .documentation = Objects . requireNonNull (documentation );
6971 }
7072
7173
@@ -89,7 +91,8 @@ public NamespaceSet copyWithParent() {
8991 new Namespace <>(functions ()), new Namespace <>(sorts ()),
9092 new Namespace <>(ruleSets ()), new Namespace <>(parametricSorts ()),
9193 new Namespace <>(parametricFunctions ()), new Namespace <>(choices ()),
92- new Namespace <>(programVariables ()));
94+ new Namespace <>(programVariables ()),
95+ new DocSpace (documentation ));
9396 }
9497
9598 public Namespace <QuantifiableVariable > variables () {
@@ -258,13 +261,13 @@ public boolean isEmpty() {
258261 public NamespaceSet simplify () {
259262 return new NamespaceSet (varNS .simplify (), funcNS .simplify (), sortNS .simplify (),
260263 ruleSetNS .simplify (), parametricSortNS .simplify (), parametricFuncNS .simplify (),
261- choiceNS .simplify (), progVarNS .simplify ());
264+ choiceNS .simplify (), progVarNS .simplify (), documentation );
262265 }
263266
264267 public NamespaceSet getCompression () {
265268 return new NamespaceSet (varNS .compress (), funcNS .compress (), sortNS .compress (),
266269 ruleSetNS .compress (), parametricSortNS .compress (), parametricFuncNS .compress (),
267- choiceNS .compress (), progVarNS .compress ());
270+ choiceNS .compress (), progVarNS .compress (), documentation );
268271 }
269272
270273 public void flushToParent () {
0 commit comments