1515import de .uka .ilkd .key .java .Services ;
1616import de .uka .ilkd .key .logic .JTerm ;
1717import de .uka .ilkd .key .logic .NamespaceSet ;
18+ import de .uka .ilkd .key .nparser .KeyAst ;
1819import de .uka .ilkd .key .pp .AbbrevMap ;
1920import de .uka .ilkd .key .proof .calculus .JavaDLSequentKit ;
2021import de .uka .ilkd .key .proof .event .ProofDisposedEvent ;
4344import org .key_project .util .collection .ImmutableSLList ;
4445import org .key_project .util .lookup .Lookup ;
4546
46- import org .jspecify .annotations .NonNull ;
4747import org .jspecify .annotations .NullMarked ;
4848import org .jspecify .annotations .Nullable ;
4949
@@ -96,7 +96,7 @@ public class Proof implements ProofObject<Goal>, Named {
9696 /**
9797 * declarations &c, read from a problem file or otherwise
9898 */
99- private String problemHeader = "" ;
99+ private KeyAst . @ Nullable Declarations problemHeader = null ;
100100
101101 /**
102102 * the proof environment (optional)
@@ -136,7 +136,7 @@ public class Proof implements ProofObject<Goal>, Named {
136136
137137 private long autoModeTime = 0 ;
138138
139- private @ Nullable Strategy <@ NonNull Goal > activeStrategy ;
139+ private @ Nullable Strategy <Goal > activeStrategy ;
140140
141141 private PropertyChangeListener settingsListener ;
142142
@@ -238,15 +238,17 @@ private Proof(String name, Sequent problem, TacletIndex rules, BuiltInRuleIndex
238238 }
239239 }
240240
241- public Proof (String name , Sequent problem , String header , InitConfig initConfig ,
241+ public Proof (String name , Sequent problem , KeyAst .@ Nullable Declarations header ,
242+ InitConfig initConfig ,
242243 Path proofFile ) {
243244 this (name , problem , initConfig .createTacletIndex (), initConfig .createBuiltInRuleIndex (),
244245 initConfig );
245246 problemHeader = header ;
246247 this .proofFile = proofFile ;
247248 }
248249
249- public Proof (String name , JTerm problem , String header , InitConfig initConfig ) {
250+ public Proof (String name , JTerm problem , KeyAst .@ Nullable Declarations header ,
251+ InitConfig initConfig ) {
250252 this (name ,
251253 JavaDLSequentKit
252254 .createSuccSequent (ImmutableSLList .singleton (new SequentFormula (problem ))),
@@ -255,7 +257,8 @@ public Proof(String name, JTerm problem, String header, InitConfig initConfig) {
255257 }
256258
257259
258- public Proof (String name , Sequent sequent , String header , TacletIndex rules ,
260+ public Proof (String name , Sequent sequent , KeyAst .@ Nullable Declarations header ,
261+ TacletIndex rules ,
259262 BuiltInRuleIndex builtInRules , InitConfig initConfig ) {
260263 this (name , sequent , rules , builtInRules , initConfig );
261264 problemHeader = header ;
@@ -325,7 +328,7 @@ public Name name() {
325328 }
326329
327330
328- public String header () {
331+ public KeyAst . @ Nullable Declarations header () {
329332 return problemHeader ;
330333 }
331334
@@ -389,15 +392,15 @@ public AbbrevMap abbreviations() {
389392 }
390393
391394
392- public Strategy <@ NonNull Goal > getActiveStrategy () {
395+ public Strategy <Goal > getActiveStrategy () {
393396 if (activeStrategy == null ) {
394397 initStrategy ();
395398 }
396399 return activeStrategy ;
397400 }
398401
399402
400- public void setActiveStrategy (Strategy <@ NonNull Goal > activeStrategy ) {
403+ public void setActiveStrategy (Strategy <Goal > activeStrategy ) {
401404 this .activeStrategy = activeStrategy ;
402405 getSettings ().getStrategySettings ().setStrategy (activeStrategy .name ());
403406 updateStrategyOnGoals ();
@@ -409,7 +412,7 @@ public void setActiveStrategy(Strategy<@NonNull Goal> activeStrategy) {
409412
410413
411414 private void updateStrategyOnGoals () {
412- Strategy <@ NonNull Goal > ourStrategy = getActiveStrategy ();
415+ Strategy <Goal > ourStrategy = getActiveStrategy ();
413416
414417 for (Goal goal : openGoals ()) {
415418 goal .setGoalStrategy (ourStrategy );
@@ -776,7 +779,7 @@ public void breadthFirstSearch(Node startNode, ProofVisitor visitor) {
776779 * @param pred non-null test function
777780 * @return a node fulfilling {@code pred} or null
778781 */
779- public @ Nullable Node findAny (@ NonNull Predicate <Node > pred ) {
782+ public @ Nullable Node findAny (Predicate <Node > pred ) {
780783 Queue <Node > queue = new LinkedList <>();
781784 queue .add (root );
782785 while (!queue .isEmpty ()) {
@@ -974,7 +977,7 @@ public boolean isOpenGoal(Node node) {
974977 *
975978 * @return the goal that belongs to the given node or null if the node is an inner one
976979 */
977- public Goal getOpenGoal (@ NonNull Node node ) {
980+ public Goal getOpenGoal (Node node ) {
978981 for (final Goal result : openGoals ) {
979982 if (result .node () == node ) {
980983 return result ;
@@ -1317,7 +1320,7 @@ public <T> void deregister(T obj, Class<T> service) {
13171320 *
13181321 * @return the associated lookup
13191322 */
1320- public @ NonNull Lookup getUserData () {
1323+ public Lookup getUserData () {
13211324 if (userData == null ) {
13221325 userData = new Lookup ();
13231326 }
0 commit comments