Skip to content

Commit 818f148

Browse files
committed
fix rebasing
1 parent 3e92daf commit 818f148

20 files changed

Lines changed: 174 additions & 150 deletions

File tree

key.core/src/main/java/de/uka/ilkd/key/nparser/builder/TacletPBuilder.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
import de.uka.ilkd.key.rule.tacletbuilder.*;
2828
import de.uka.ilkd.key.util.parsing.BuildingException;
2929

30-
import org.key_project.logic.Choice;
31-
import org.key_project.logic.ChoiceExpr;
32-
import org.key_project.logic.Name;
33-
import org.key_project.logic.Namespace;
30+
import org.key_project.logic.*;
3431
import org.key_project.logic.op.Function;
3532
import org.key_project.logic.op.QuantifiableVariable;
3633
import org.key_project.logic.op.sv.SchemaVariable;
@@ -139,7 +136,7 @@ public TacletBuilder<?> visitTriggers(KeYParser.TriggersContext ctx) {
139136
TacletBuilder<?> b = peekTBuilder();
140137
JTerm t = accept(ctx.t);
141138
List<JTerm> avoidConditions = mapOf(ctx.avoidCond);
142-
b.setTrigger(new Trigger(triggerVar, t, ImmutableList.fromList(avoidConditions)));
139+
b.setTrigger(new Trigger(triggerVar, t, ImmutableList.<Term>fromList(avoidConditions)));
143140
return null;
144141
}
145142

@@ -187,7 +184,6 @@ public Taclet visitTaclet(KeYParser.TacletContext ctx) {
187184
ifSeq = accept(ctx.ifSeq);
188185
}
189186

190-
@Nullable
191187
Object find = accept(ctx.find);
192188
Sequent seq = find instanceof Sequent ? (Sequent) find : null;
193189

@@ -798,7 +794,7 @@ public Object visitGoalspec(KeYParser.GoalspecContext ctx) {
798794
String name = accept(ctx.string_value());
799795

800796
Sequent addSeq = JavaDLSequentKit.getInstance().getEmptySequent();
801-
ImmutableSLList<Taclet> addRList = ImmutableList.nil();
797+
ImmutableList<Taclet> addRList = ImmutableList.nil();
802798
DefaultImmutableSet<SchemaVariable> addpv = DefaultImmutableSet.nil();
803799

804800
@Nullable

key.core/src/main/java/de/uka/ilkd/key/rule/QueryExpand.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.key_project.prover.sequent.SequentFormula;
3939
import org.key_project.util.collection.ImmutableArray;
4040
import org.key_project.util.collection.ImmutableList;
41-
import org.key_project.util.collection.ImmutableSLList;
4241
import org.key_project.util.collection.Pair;
4342

4443
import org.jspecify.annotations.NonNull;
@@ -281,7 +280,7 @@ public JTerm evaluateQueries(Services services, JTerm term, boolean positiveCont
281280
final int depth = term.depth();
282281
List<QueryEvalPos> qeps = new ArrayList<>();
283282
int[] path = new int[depth];
284-
final ImmutableSLList<QuantifiableVariable> instVars;
283+
final ImmutableList<QuantifiableVariable> instVars;
285284
if (allowExpandBelowInstQuantifier) {
286285
instVars = ImmutableList.nil();
287286
} else {

key.core/src/main/java/de/uka/ilkd/key/speclang/jml/pretranslation/TextualJMLClassAxiom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public final class TextualJMLClassAxiom extends TextualJMLConstruct {
2626
public TextualJMLClassAxiom(ImmutableList<JMLModifier> modifiers,
2727
LabeledParserRuleContext inv) {
2828
super(ImmutableList.nil()); // no modifiers allowed in axiom clause (see
29-
// Sect. 8 of reference manual)
29+
// Sect. 8 of reference manual)
3030
assert inv != null;
3131
this.inv = inv;
3232
setPosition(inv);

key.core/src/main/java/de/uka/ilkd/key/speclang/njml/Translator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.key_project.logic.op.Function;
4444
import org.key_project.logic.sort.Sort;
4545
import org.key_project.util.collection.ImmutableList;
46-
import org.key_project.util.collection.ImmutableSLList;
4746
import org.key_project.util.collection.Pair;
4847

4948
import org.antlr.v4.runtime.ParserRuleContext;
@@ -1121,7 +1120,7 @@ private SLExpression processJmlBuiltInFunction(String name,
11211120
private SLParameters visitParameters(JmlParser.Param_listContext ctx) {
11221121
ImmutableList<SLExpression> params =
11231122
ctx.param_decl().stream().map(it -> lookupIdentifier(it.p.getText(), null, null, it))
1124-
.collect(ImmutableSLList.toImmutableList());
1123+
.collect(ImmutableList.collector());
11251124
return getSlParametersWithHeap(params);
11261125
}
11271126

key.ui/src/main/java/de/uka/ilkd/key/gui/mergerule/MergePartnerSelectionDialog.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import org.key_project.prover.sequent.*;
3232
import org.key_project.util.collection.ImmutableList;
33-
import org.key_project.util.collection.ImmutableSLList;
3433
import org.key_project.util.collection.Pair;
3534

3635
/**
@@ -327,7 +326,7 @@ public MergePartnerSelectionDialog(Goal mergeGoal,
327326
* @return All chosen merge partners.
328327
*/
329328
public ImmutableList<MergePartner> getChosenCandidates() {
330-
ImmutableSLList<MergePartner> result = ImmutableList.nil();
329+
ImmutableList<MergePartner> result = ImmutableList.nil();
331330

332331
if (chosenGoals != null) {
333332
return result.append(chosenGoals);

key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/CurrentGoalViewMenu.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import org.key_project.prover.rules.tacletbuilder.TacletGoalTemplate;
4343
import org.key_project.prover.sequent.PosInOccurrence;
4444
import org.key_project.util.collection.ImmutableList;
45-
import org.key_project.util.collection.ImmutableSLList;
4645
import org.key_project.util.java.StringUtil;
4746

4847
import org.jspecify.annotations.NonNull;
@@ -120,7 +119,7 @@ private static ImmutableList<TacletApp> removeIntroduceAxiomTaclet(
120119
ImmutableList<TacletApp> list) {
121120
return list.stream()
122121
.filter(app -> !app.rule().name().toString().equals(INTRODUCE_AXIOM_TACLET_NAME))
123-
.collect(ImmutableSLList.toImmutableList());
122+
.collect(ImmutableList.collector());
124123
}
125124

126125
/**

key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/SequentView.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.key_project.prover.sequent.Sequent;
3737
import org.key_project.prover.sequent.SequentFormula;
3838
import org.key_project.util.collection.ImmutableList;
39-
import org.key_project.util.collection.ImmutableSLList;
4039

4140
import org.jspecify.annotations.Nullable;
4241
import org.slf4j.Logger;
@@ -761,7 +760,7 @@ protected void updateHeatmapSFHighlights(int max_age, boolean newest) {
761760
for (int j = 0; j < max_age && j < sortedArray.length; ++j) {
762761
if (sortedArray[j].equals(entry)) {
763762
Color color = computeColorForAge(max_age, j);
764-
ImmutableSLList<Integer> list = (ImmutableSLList<Integer>) ImmutableList
763+
ImmutableList<Integer> list = (ImmutableList<Integer>) ImmutableList
765764
.<Integer>nil().prepend(0).append(i);
766765
Range r = ipt.rangeForPath(list);
767766
// Off-by-one: siehe updateUpdateHighlights bzw in InnerNodeView.
@@ -780,7 +779,7 @@ protected void updateHeatmapSFHighlights(int max_age, boolean newest) {
780779
form, max_age + 2);
781780
if (age < max_age) {
782781
Color color = computeColorForAge(max_age, age);
783-
ImmutableSLList<Integer> list = (ImmutableSLList<Integer>) ImmutableList
782+
ImmutableList<Integer> list = (ImmutableList<Integer>) ImmutableList
784783
.<Integer>nil().prepend(0).append(i);
785784
Range r = ipt.rangeForPath(list);
786785
// Off-by-one: siehe updateUpdateHighlights bzw in InnerNodeView. rangeForPath

key.util/src/main/java/org/key_project/util/collection/ImmutableList.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* SPDX-License-Identifier: GPL-2.0-only */
44
package org.key_project.util.collection;
55

6-
import org.jspecify.annotations.Nullable;
7-
86
import java.lang.reflect.Array;
97
import java.util.*;
108
import java.util.function.Function;
@@ -14,6 +12,8 @@
1412
import java.util.stream.Stream;
1513
import java.util.stream.StreamSupport;
1614

15+
import org.jspecify.annotations.Nullable;
16+
1717
/**
1818
* List interface to be implemented by non-destructive lists
1919
*/
@@ -80,7 +80,7 @@ public interface ImmutableList<T extends @Nullable Object>
8080
/**
8181
* Return a singleton immutable list.
8282
*
83-
* @param e1 the element to put into the list
83+
* @param e1 the element to put into the list
8484
* @param <T> the entry type of the list.
8585
* @return singleton immutable list.
8686
*/
@@ -92,7 +92,7 @@ public interface ImmutableList<T extends @Nullable Object>
9292
* Return an immutable list with the iterated elements.
9393
* The iteration order is the order of the arguments
9494
*
95-
* @param es the elements to put into the list
95+
* @param es the elements to put into the list
9696
* @param <T> the entry type of the list.
9797
* @return (e1, e2, e3, ...) as immutable list
9898
*/
@@ -103,11 +103,12 @@ public interface ImmutableList<T extends @Nullable Object>
103103
return new ImmutableListArray<>(es);
104104

105105
/*
106-
ImmutableList<T> result = nil();
107-
for (int i = es.length - 1; i >= 0; i--) {
108-
result = result.prepend(es[i]);
109-
}
110-
return result;*/
106+
* ImmutableList<T> result = nil();
107+
* for (int i = es.length - 1; i >= 0; i--) {
108+
* result = result.prepend(es[i]);
109+
* }
110+
* return result;
111+
*/
111112
}
112113

113114
/**
@@ -331,8 +332,8 @@ default List<T> toList() {
331332
* the given predicate.
332333
*
333334
* @param predicate a non-interfering, stateless
334-
* predicate to apply to each element to determine if it
335-
* should be included
335+
* predicate to apply to each element to determine if it
336+
* should be included
336337
* @return the filtered list
337338
*/
338339
default ImmutableList<T> filter(Predicate<? super T> predicate) {
@@ -343,7 +344,7 @@ default ImmutableList<T> filter(Predicate<? super T> predicate) {
343344
* Returns an immutable list consisting of the results of applying the given
344345
* function to the elements of this list.
345346
*
346-
* @param <R> The element type of the result list
347+
* @param <R> The element type of the result list
347348
* @param function a non-interfering, stateless function to apply to each element
348349
* @return the mapped list of the same length as this
349350
*/
@@ -411,7 +412,7 @@ default T last() throws NoSuchElementException {
411412
* @param idx the 0-based index of the element
412413
* @return the element at index idx.
413414
* @throws IndexOutOfBoundsException if idx is less than 0 or at
414-
* least {@link #size()}.
415+
* least {@link #size()}.
415416
*/
416417
T get(int idx);
417418

key.util/src/main/java/org/key_project/util/collection/ImmutableListArray.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
/* This file is part of KeY - https://key-project.org
2+
* KeY is licensed under the GNU General Public License Version 2
3+
* SPDX-License-Identifier: GPL-2.0-only */
14
package org.key_project.util.collection;
25

3-
import org.jspecify.annotations.Nullable;
4-
56
import java.lang.reflect.Array;
67
import java.util.Arrays;
78
import java.util.Iterator;
@@ -11,6 +12,8 @@
1112
import java.util.function.Predicate;
1213
import java.util.stream.Stream;
1314

15+
import org.jspecify.annotations.Nullable;
16+
1417
/**
1518
*
1619
* @author Alexander Weigl
@@ -101,7 +104,7 @@ public ImmutableList<T> removeAll(T obj) {
101104
return stream().filter(it -> !Objects.equals(it, obj)).collect(ImmutableList.collector());
102105
}
103106

104-
@SuppressWarnings({"unchecked", "argument.type.incompatible"})
107+
@SuppressWarnings({ "unchecked", "argument.type.incompatible" })
105108
@Override
106109
public <S extends @Nullable Object> S[] toArray(S[] array) {
107110
if (array.length == size()) {

key.util/src/main/java/org/key_project/util/collection/ImmutableListConcat.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
/* This file is part of KeY - https://key-project.org
2+
* KeY is licensed under the GNU General Public License Version 2
3+
* SPDX-License-Identifier: GPL-2.0-only */
14
package org.key_project.util.collection;
25

3-
import org.jspecify.annotations.Nullable;
4-
56
import java.util.Objects;
67
import java.util.function.Predicate;
78
import java.util.stream.Collectors;
89

10+
import org.jspecify.annotations.Nullable;
11+
912
/**
1013
*
1114
* @author Alexander Weigl
@@ -64,7 +67,8 @@ public ImmutableList<T> removeAll(T obj) {
6467

6568
@Override
6669
public boolean equals(Object obj) {
67-
if (obj == this) return true;
70+
if (obj == this)
71+
return true;
6872
if (obj instanceof ImmutableList<?> other) {
6973
return ImmutableList.equals(this, other);
7074
}

0 commit comments

Comments
 (0)