Skip to content

Commit 26c0d78

Browse files
increase spotless version (and thus also eclipse formatter) to fix missing space in instanceof formatting
1 parent 8dd8db2 commit 26c0d78

66 files changed

Lines changed: 96 additions & 92 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ plugins {
2121
// id "com.github.ben-manes.versions" version "0.39.0"
2222

2323
// Code formatting
24-
id "com.diffplug.spotless" version "6.16.0"
24+
id "com.diffplug.spotless" version "6.20.0"
2525
}
2626

2727
// Configure this project for use inside IntelliJ:
@@ -335,7 +335,10 @@ subprojects {
335335
toggleOffOn()
336336

337337
removeUnusedImports()
338-
eclipse().configFile("$rootDir/scripts/tools/checkstyle/keyCodeStyle.xml")
338+
/* At the moment, we have to ensure that version 4.22 of the eclipse formatter is run, since newer versions
339+
* of the formatter crash in SymbolicExecutionTreeBuilder (seems to be a but in the formatter)!
340+
*/
341+
eclipse("4.22").configFile("$rootDir/scripts/tools/checkstyle/keyCodeStyle.xml")
339342
trimTrailingWhitespace() // not sure how to set this in the xml file ...
340343
//googleJavaFormat().aosp().reflowLongStrings()
341344

key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/ContractProofReferencesAnalyst.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class ContractProofReferencesAnalyst implements IProofReferencesAnalyst {
2323
*/
2424
@Override
2525
public LinkedHashSet<IProofReference<?>> computeReferences(Node node, Services services) {
26-
if (node.getAppliedRuleApp()instanceof AbstractContractRuleApp contractRuleApp) {
26+
if (node.getAppliedRuleApp() instanceof AbstractContractRuleApp contractRuleApp) {
2727
DefaultProofReference<Contract> reference = new DefaultProofReference<>(
2828
IProofReference.USE_CONTRACT, node, contractRuleApp.getInstantiation());
2929
LinkedHashSet<IProofReference<?>> result = new LinkedHashSet<>();

key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/MethodBodyExpandProofReferencesAnalyst.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class MethodBodyExpandProofReferencesAnalyst implements IProofReferencesA
2626
public LinkedHashSet<IProofReference<?>> computeReferences(Node node, Services services) {
2727
if (node.getAppliedRuleApp() != null && node.getNodeInfo() != null) {
2828
NodeInfo info = node.getNodeInfo();
29-
if (info.getActiveStatement()instanceof MethodBodyStatement mbs) {
29+
if (info.getActiveStatement() instanceof MethodBodyStatement mbs) {
3030
IProgramMethod pm = mbs.getProgramMethod(services);
3131
DefaultProofReference<IProgramMethod> reference =
3232
new DefaultProofReference<>(IProofReference.INLINE_METHOD, node,

key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/MethodCallProofReferencesAnalyst.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public LinkedHashSet<IProofReference<?>> computeReferences(Node node, Services s
5555
new LinkedHashSet<>();
5656
result.add(reference);
5757
return result;
58-
} else if (info.getActiveStatement()instanceof Assignment assignment) {
58+
} else if (info.getActiveStatement() instanceof Assignment assignment) {
5959
ExecutionContext context = extractContext(node, services);
6060
LinkedHashSet<IProofReference<?>> result =
6161
new LinkedHashSet<>();
@@ -109,7 +109,7 @@ protected IProofReference<IProgramMethod> createReference(Node node, Services se
109109
IProgramMethod pm = mr.method(services, refPrefixType, context);
110110
return new DefaultProofReference<>(IProofReference.CALL_METHOD, node, pm);
111111
} else {
112-
if (!(node.getAppliedRuleApp()instanceof PosTacletApp app)) {
112+
if (!(node.getAppliedRuleApp() instanceof PosTacletApp app)) {
113113
throw new IllegalArgumentException("PosTacletApp expected.");
114114
}
115115
if (!"staticMethodCallStaticWithAssignmentViaTypereference"

key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/AbstractUpdateExtractor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ protected void fillInitialObjectsToIgnoreRecursively(Term term, Set<Term> toFill
175175
for (int i = 0; i < term.arity(); i++) {
176176
fillInitialObjectsToIgnoreRecursively(term.sub(i), toFill);
177177
}
178-
} else if (term.op()instanceof ElementaryUpdate eu) {
178+
} else if (term.op() instanceof ElementaryUpdate eu) {
179179
if (eu.lhs() instanceof ProgramVariable) {
180180
toFill.add(term.sub(0));
181181
}
@@ -254,11 +254,11 @@ protected void collectLocationsFromTerm(Term updateTerm,
254254
collectLocationsFromTerm(sub, locationsToFill, updateCreatedObjectsToFill,
255255
updateValueObjectsToFill, objectsToIgnore);
256256
}
257-
} else if (updateTerm.op()instanceof ElementaryUpdate eu) {
257+
} else if (updateTerm.op() instanceof ElementaryUpdate eu) {
258258
if (SymbolicExecutionUtil.isHeapUpdate(getServices(), updateTerm)) {
259259
collectLocationsFromHeapUpdate(updateTerm.sub(0), locationsToFill,
260260
updateCreatedObjectsToFill, updateValueObjectsToFill);
261-
} else if (eu.lhs()instanceof ProgramVariable var) {
261+
} else if (eu.lhs() instanceof ProgramVariable var) {
262262
final HeapLDT heapLDT = getServices().getTypeConverter().getHeapLDT();
263263
if (!SymbolicExecutionUtil.isHeap(var, heapLDT)) {
264264
if (!isImplicitProgramVariable(var)

key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ protected ImmutableSet<Term> extractAppliedCutsSet(Node goalnode, Node root)
466466
while (!(goalnode.serialNr() == root.serialNr())) {
467467
final Node oldNode = goalnode;
468468
goalnode = goalnode.parent();
469-
if (goalnode.getAppliedRuleApp()instanceof NoPosTacletApp npta) {
469+
if (goalnode.getAppliedRuleApp() instanceof NoPosTacletApp npta) {
470470
if ("CUT".equalsIgnoreCase(npta.taclet().name().toString())) {
471471
Term inst = (Term) npta.instantiations()
472472
.lookupEntryForSV(new Name("cutFormula")).value().getInstantiation();

key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private static void evaluateNode(
253253
}
254254
}
255255
}
256-
} else if (parent.getAppliedRuleApp()instanceof OneStepSimplifierRuleApp app) {
256+
} else if (parent.getAppliedRuleApp() instanceof OneStepSimplifierRuleApp app) {
257257
PosInOccurrence parentPio = null;
258258
for (RuleApp protocolApp : app.getProtocol()) {
259259
if (parentPio != null) {

key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/ExecutionAuxiliaryContract.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ protected void collectRemembranceVariables(Term term,
170170
for (Term sub : term.subs()) {
171171
collectRemembranceVariables(sub, remembranceHeaps, remembranceLocalVariables);
172172
}
173-
} else if (term.op()instanceof ElementaryUpdate eu) {
173+
} else if (term.op() instanceof ElementaryUpdate eu) {
174174
if (SymbolicExecutionUtil.isHeap(eu.lhs(),
175175
getServices().getTypeConverter().getHeapLDT())) {
176176
remembranceHeaps.put((LocationVariable) term.sub(0).op(),

key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/ExecutionOperationContract.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected String lazyComputeName() throws ProofInputException {
8787
if (!isDisposed()) {
8888
final Services services = getServices();
8989
// Make sure that the contract is compatible
90-
if (!(getContract()instanceof FunctionalOperationContract contract)) {
90+
if (!(getContract() instanceof FunctionalOperationContract contract)) {
9191
throw new ProofInputException("Unsupported contract: " + getContract());
9292
}
9393
// Compute instantiation

key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/QuerySideProofRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public boolean isApplicable(Goal goal, PosInOccurrence pio) {
166166
* @return {@code true} is applicable, {@code false} is not applicable
167167
*/
168168
private boolean isApplicableQuery(Goal goal, Term pmTerm, PosInOccurrence pio) {
169-
if (pmTerm.op()instanceof IProgramMethod pm && pmTerm.freeVars().isEmpty()) {
169+
if (pmTerm.op() instanceof IProgramMethod pm && pmTerm.freeVars().isEmpty()) {
170170
final Sort nullSort = goal.proof().getJavaInfo().nullSort();
171171
if (pm.isStatic()
172172
|| (pmTerm.sub(1).sort().extendsTrans(goal.proof().getJavaInfo().objectSort())

0 commit comments

Comments
 (0)