Skip to content

Commit 6887838

Browse files
committed
spotless and merge errors
1 parent d2dcd70 commit 6887838

File tree

69 files changed

+1681
-1417
lines changed

Some content is hidden

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

69 files changed

+1681
-1417
lines changed

key.core.example/src/main/java/org/key_project/Main.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ private static List<Contract> getContracts(KeYEnvironment<?> env) {
131131
* @param env the {@link KeYEnvironment} in which to prove the contract
132132
* @param contract the {@link Contract} to be proven
133133
*/
134-
private static void proveContract(KeYEnvironment<?> env, Contract contract) throws InterruptedException {
134+
private static void proveContract(KeYEnvironment<?> env, Contract contract)
135+
throws InterruptedException {
135136
Proof proof = null;
136137
try {
137138
// Create proof

key.core.symbolic_execution/src/test/java/de/uka/ilkd/key/symbolic_execution/testcase/AbstractSymbolicExecutionTestCase.java

Lines changed: 774 additions & 772 deletions
Large diffs are not rendered by default.

key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@ public void startAndWaitForAutoMode(Proof proof) throws InterruptedException {
564564
* {@inheritDoc}
565565
*/
566566
@Override
567-
public void startAndWaitForAutoMode(Proof proof, ImmutableList<Goal> goals) throws InterruptedException {
567+
public void startAndWaitForAutoMode(Proof proof, ImmutableList<Goal> goals)
568+
throws InterruptedException {
568569
startAutoMode(proof, goals);
569570
waitWhileAutoMode();
570571
}

key.core/src/main/java/de/uka/ilkd/key/control/DefaultProofControl.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* SPDX-License-Identifier: GPL-2.0-only */
44
package de.uka.ilkd.key.control;
55

6+
import java.util.concurrent.locks.Condition;
7+
import java.util.concurrent.locks.ReentrantLock;
8+
69
import de.uka.ilkd.key.logic.PosInOccurrence;
710
import de.uka.ilkd.key.macros.ProofMacro;
811
import de.uka.ilkd.key.macros.ProofMacroFinishedInfo;
@@ -16,10 +19,8 @@
1619
import de.uka.ilkd.key.prover.impl.ApplyStrategy;
1720
import de.uka.ilkd.key.prover.impl.DefaultTaskStartedInfo;
1821
import de.uka.ilkd.key.util.ProofStarter;
19-
import org.key_project.util.collection.ImmutableList;
2022

21-
import java.util.concurrent.locks.Condition;
22-
import java.util.concurrent.locks.ReentrantLock;
23+
import org.key_project.util.collection.ImmutableList;
2324

2425
/**
2526
* The default implementation of {@link ProofControl}.
@@ -45,34 +46,34 @@ public class DefaultProofControl extends AbstractProofControl {
4546
/**
4647
* Constructor.
4748
*
48-
* @param ui The {@link UserInterfaceControl} in which this {@link ProofControl} is used.
49+
* @param ui The {@link UserInterfaceControl} in which this {@link ProofControl} is used.
4950
* @param defaultProverTaskListener The default {@link ProverTaskListener} which will be added
50-
* to all started {@link ApplyStrategy} instances.
51+
* to all started {@link ApplyStrategy} instances.
5152
*/
5253
public DefaultProofControl(UserInterfaceControl ui,
53-
DefaultUserInterfaceControl defaultProverTaskListener) {
54+
DefaultUserInterfaceControl defaultProverTaskListener) {
5455
super(defaultProverTaskListener);
5556
this.ui = ui;
5657
}
5758

5859
/**
5960
* Constructor.
6061
*
61-
* @param ui The {@link UserInterfaceControl} in which this {@link ProofControl} is used.
62+
* @param ui The {@link UserInterfaceControl} in which this {@link ProofControl} is used.
6263
* @param defaultProverTaskListener The default {@link ProverTaskListener} which will be added
63-
* to all started {@link ApplyStrategy} instances.
64-
* @param ruleCompletionHandler An optional {@link RuleCompletionHandler}.
64+
* to all started {@link ApplyStrategy} instances.
65+
* @param ruleCompletionHandler An optional {@link RuleCompletionHandler}.
6566
*/
6667
public DefaultProofControl(UserInterfaceControl ui,
67-
DefaultUserInterfaceControl defaultProverTaskListener,
68-
RuleCompletionHandler ruleCompletionHandler) {
68+
DefaultUserInterfaceControl defaultProverTaskListener,
69+
RuleCompletionHandler ruleCompletionHandler) {
6970
super(defaultProverTaskListener, ruleCompletionHandler);
7071
this.ui = ui;
7172
}
7273

7374
@Override
7475
public synchronized void startAutoMode(Proof proof, ImmutableList<Goal> goals,
75-
ProverTaskListener ptl) {
76+
ProverTaskListener ptl) {
7677
if (!isInAutoMode()) {
7778
autoModeThread = new AutoModeThread(proof, goals, ptl);
7879
autoModeThread.start();
@@ -121,7 +122,7 @@ public void run() {
121122
fireAutoModeStarted(new ProofEvent(proof));
122123
ProofStarter starter = ptl != null
123124
? new ProofStarter(
124-
new CompositePTListener(getDefaultProverTaskListener(), ptl), false)
125+
new CompositePTListener(getDefaultProverTaskListener(), ptl), false)
125126
: new ProofStarter(getDefaultProverTaskListener(), false);
126127
starter.init(proof);
127128
if (goals != null) {

key.core/src/main/java/de/uka/ilkd/key/control/KeYEnvironment.java

Lines changed: 64 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* SPDX-License-Identifier: GPL-2.0-only */
44
package de.uka.ilkd.key.control;
55

6+
import java.io.File;
7+
import java.util.*;
8+
import java.util.function.Consumer;
9+
610
import de.uka.ilkd.key.java.JavaInfo;
711
import de.uka.ilkd.key.java.Services;
812
import de.uka.ilkd.key.java.abstraction.KeYJavaType;
@@ -21,11 +25,8 @@
2125
import de.uka.ilkd.key.speclang.Contract;
2226
import de.uka.ilkd.key.util.KeYTypeUtil;
2327
import de.uka.ilkd.key.util.Pair;
24-
import org.key_project.util.collection.ImmutableSet;
2528

26-
import java.io.File;
27-
import java.util.*;
28-
import java.util.function.Consumer;
29+
import org.key_project.util.collection.ImmutableSet;
2930

3031
/**
3132
* Instances of this class are used to collect and access all relevant information for verification
@@ -67,7 +68,7 @@ public class KeYEnvironment<U extends UserInterfaceControl> {
6768
/**
6869
* Constructor
6970
*
70-
* @param ui The {@link UserInterfaceControl} in which the {@link Proof} is loaded.
71+
* @param ui The {@link UserInterfaceControl} in which the {@link Proof} is loaded.
7172
* @param initConfig The loaded project.
7273
*/
7374
public KeYEnvironment(U ui, InitConfig initConfig) {
@@ -77,11 +78,11 @@ public KeYEnvironment(U ui, InitConfig initConfig) {
7778
/**
7879
* Constructor
7980
*
80-
* @param ui The {@link UserInterfaceControl} in which the {@link Proof} is loaded.
81+
* @param ui The {@link UserInterfaceControl} in which the {@link Proof} is loaded.
8182
* @param initConfig The loaded project.
8283
*/
8384
public KeYEnvironment(U ui, InitConfig initConfig, Proof loadedProof,
84-
Pair<String, Location> proofScript, ReplayResult replayResult) {
85+
Pair<String, Location> proofScript, ReplayResult replayResult) {
8586
this.ui = ui;
8687
this.initConfig = initConfig;
8788
this.loadedProof = loadedProof;
@@ -180,15 +181,15 @@ public Proof createProof(ProofOblInput input) throws ProofInputException {
180181
* Loads the given location and returns all required references as {@link KeYEnvironment}. The
181182
* {@code MainWindow} is not involved in the whole process.
182183
*
183-
* @param location The location to load.
184-
* @param classPaths The class path entries to use.
184+
* @param location The location to load.
185+
* @param classPaths The class path entries to use.
185186
* @param bootClassPath The boot class path to use.
186-
* @param includes Optional includes to consider.
187+
* @param includes Optional includes to consider.
187188
* @return The {@link KeYEnvironment} which contains all references to the loaded location.
188189
* @throws ProblemLoaderException Occurred Exception
189190
*/
190191
public static KeYEnvironment<DefaultUserInterfaceControl> load(File location,
191-
List<File> classPaths, File bootClassPath, List<File> includes)
192+
List<File> classPaths, File bootClassPath, List<File> includes)
192193
throws ProblemLoaderException {
193194
return load(null, location, classPaths, bootClassPath, includes, false);
194195
}
@@ -197,103 +198,103 @@ public static KeYEnvironment<DefaultUserInterfaceControl> load(File location,
197198
* Loads the given location and returns all required references as {@link KeYEnvironment}. The
198199
* {@code MainWindow} is not involved in the whole process.
199200
*
200-
* @param location The location to load.
201-
* @param classPaths The class path entries to use.
202-
* @param bootClassPath The boot class path to use.
203-
* @param includes Optional includes to consider.
201+
* @param location The location to load.
202+
* @param classPaths The class path entries to use.
203+
* @param bootClassPath The boot class path to use.
204+
* @param includes Optional includes to consider.
204205
* @param ruleCompletionHandler An optional {@link RuleCompletionHandler}.
205206
* @return The {@link KeYEnvironment} which contains all references to the loaded location.
206207
* @throws ProblemLoaderException Occurred Exception
207208
*/
208209
public static KeYEnvironment<DefaultUserInterfaceControl> load(File location,
209-
List<File> classPaths, File bootClassPath, List<File> includes,
210-
RuleCompletionHandler ruleCompletionHandler) throws ProblemLoaderException {
210+
List<File> classPaths, File bootClassPath, List<File> includes,
211+
RuleCompletionHandler ruleCompletionHandler) throws ProblemLoaderException {
211212
return load(null, location, classPaths, bootClassPath, includes, null,
212-
ruleCompletionHandler, false);
213+
ruleCompletionHandler, false);
213214
}
214215

215216
/**
216217
* Loads the given location and returns all required references as {@link KeYEnvironment}. The
217218
* {@code MainWindow} is not involved in the whole process.
218219
*
219-
* @param profile The {@link Profile} to use.
220-
* @param location The location to load.
221-
* @param classPaths The class path entries to use.
222-
* @param bootClassPath The boot class path to use.
223-
* @param includes Optional includes to consider.
220+
* @param profile The {@link Profile} to use.
221+
* @param location The location to load.
222+
* @param classPaths The class path entries to use.
223+
* @param bootClassPath The boot class path to use.
224+
* @param includes Optional includes to consider.
224225
* @param forceNewProfileOfNewProofs {@code} true
225226
* {@code AbstractProblemLoader.profileOfNewProofs} will be used as
226-
* {@link Profile} of new proofs, {@code false} {@link Profile} specified by problem file
227-
* will be used for new proofs.
227+
* {@link Profile} of new proofs, {@code false} {@link Profile} specified by problem file
228+
* will be used for new proofs.
228229
* @return The {@link KeYEnvironment} which contains all references to the loaded location.
229230
* @throws ProblemLoaderException Occurred Exception
230231
*/
231232
public static KeYEnvironment<DefaultUserInterfaceControl> load(Profile profile, File location,
232-
List<File> classPaths, File bootClassPath, List<File> includes,
233-
boolean forceNewProfileOfNewProofs) throws ProblemLoaderException {
233+
List<File> classPaths, File bootClassPath, List<File> includes,
234+
boolean forceNewProfileOfNewProofs) throws ProblemLoaderException {
234235
return load(profile, location, classPaths, bootClassPath, includes, null, null,
235-
forceNewProfileOfNewProofs);
236+
forceNewProfileOfNewProofs);
236237
}
237238

238239
/**
239240
* Loads the given location and returns all required references as {@link KeYEnvironment}. The
240241
* {@code MainWindow} is not involved in the whole process.
241242
*
242-
* @param profile The {@link Profile} to use.
243-
* @param location The location to load.
244-
* @param classPaths The class path entries to use.
245-
* @param bootClassPath The boot class path to use.
246-
* @param includes Optional includes to consider.
247-
* @param poPropertiesToForce Some optional PO {@link Properties} to force.
248-
* @param ruleCompletionHandler An optional {@link RuleCompletionHandler}.
243+
* @param profile The {@link Profile} to use.
244+
* @param location The location to load.
245+
* @param classPaths The class path entries to use.
246+
* @param bootClassPath The boot class path to use.
247+
* @param includes Optional includes to consider.
248+
* @param poPropertiesToForce Some optional PO {@link Properties} to force.
249+
* @param ruleCompletionHandler An optional {@link RuleCompletionHandler}.
249250
* @param forceNewProfileOfNewProofs {@code} true
250251
* {@code AbstractProblemLoader.profileOfNewProofs} will be used as {@link Profile} of
251-
* new proofs, {@code false} {@link Profile} specified by problem file will be used for
252-
* new proofs.
252+
* new proofs, {@code false} {@link Profile} specified by problem file will be used for
253+
* new proofs.
253254
* @return The {@link KeYEnvironment} which contains all references to the loaded location.
254255
* @throws ProblemLoaderException Occurred Exception
255256
*/
256257
public static KeYEnvironment<DefaultUserInterfaceControl> load(Profile profile, File location,
257-
List<File> classPaths, File bootClassPath, List<File> includes,
258-
Properties poPropertiesToForce, RuleCompletionHandler ruleCompletionHandler,
259-
boolean forceNewProfileOfNewProofs) throws ProblemLoaderException {
258+
List<File> classPaths, File bootClassPath, List<File> includes,
259+
Properties poPropertiesToForce, RuleCompletionHandler ruleCompletionHandler,
260+
boolean forceNewProfileOfNewProofs) throws ProblemLoaderException {
260261
return load(profile, location, classPaths, bootClassPath, includes, poPropertiesToForce,
261-
ruleCompletionHandler,
262-
null, forceNewProfileOfNewProofs);
262+
ruleCompletionHandler,
263+
null, forceNewProfileOfNewProofs);
263264
}
264265

265266
/**
266267
* Loads the given location and returns all required references as {@link KeYEnvironment}. The
267268
* {@code MainWindow} is not involved in the whole process.
268269
*
269-
* @param profile The {@link Profile} to use.
270-
* @param location The location to load.
271-
* @param classPaths The class path entries to use.
272-
* @param bootClassPath The boot class path to use.
273-
* @param includes Optional includes to consider.
274-
* @param poPropertiesToForce Some optional PO {@link Properties} to force.
275-
* @param ruleCompletionHandler An optional {@link RuleCompletionHandler}.
276-
* @param callbackProofLoaded An optional callback (called when the proof is loaded, before
277-
* replay)
270+
* @param profile The {@link Profile} to use.
271+
* @param location The location to load.
272+
* @param classPaths The class path entries to use.
273+
* @param bootClassPath The boot class path to use.
274+
* @param includes Optional includes to consider.
275+
* @param poPropertiesToForce Some optional PO {@link Properties} to force.
276+
* @param ruleCompletionHandler An optional {@link RuleCompletionHandler}.
277+
* @param callbackProofLoaded An optional callback (called when the proof is loaded, before
278+
* replay)
278279
* @param forceNewProfileOfNewProofs {@code} true
279280
* {@code AbstractProblemLoader.profileOfNewProofs} will be used as {@link Profile} of
280-
* new proofs, {@code false} {@link Profile} specified by problem file will be used for
281-
* new proofs.
281+
* new proofs, {@code false} {@link Profile} specified by problem file will be used for
282+
* new proofs.
282283
* @return The {@link KeYEnvironment} which contains all references to the loaded location.
283284
* @throws ProblemLoaderException Occurred Exception
284285
*/
285286
public static KeYEnvironment<DefaultUserInterfaceControl> load(Profile profile, File location,
286-
List<File> classPaths, File bootClassPath, List<File> includes,
287-
Properties poPropertiesToForce, RuleCompletionHandler ruleCompletionHandler,
288-
Consumer<Proof> callbackProofLoaded,
289-
boolean forceNewProfileOfNewProofs) throws ProblemLoaderException {
287+
List<File> classPaths, File bootClassPath, List<File> includes,
288+
Properties poPropertiesToForce, RuleCompletionHandler ruleCompletionHandler,
289+
Consumer<Proof> callbackProofLoaded,
290+
boolean forceNewProfileOfNewProofs) throws ProblemLoaderException {
290291
DefaultUserInterfaceControl ui = new DefaultUserInterfaceControl(ruleCompletionHandler);
291292
AbstractProblemLoader loader = ui.load(profile, location, classPaths, bootClassPath,
292-
includes, poPropertiesToForce, forceNewProfileOfNewProofs, callbackProofLoaded);
293+
includes, poPropertiesToForce, forceNewProfileOfNewProofs, callbackProofLoaded);
293294
InitConfig initConfig = loader.getInitConfig();
294295

295296
return new KeYEnvironment<>(ui, initConfig, loader.getProof(),
296-
loader.getProofScript(), loader.getResult());
297+
loader.getProofScript(), loader.getResult());
297298
}
298299

299300
public static KeYEnvironment<DefaultUserInterfaceControl> load(File keyFile)
@@ -335,9 +336,11 @@ public List<Contract> getAvailableContracts() {
335336
Set<KeYJavaType> kjts = getJavaInfo().getAllKeYJavaTypes();
336337
for (KeYJavaType type : kjts) {
337338
if (!KeYTypeUtil.isLibraryClass(type)) {
338-
ImmutableSet<IObserverFunction> targets = getSpecificationRepository().getContractTargets(type);
339+
ImmutableSet<IObserverFunction> targets =
340+
getSpecificationRepository().getContractTargets(type);
339341
for (IObserverFunction target : targets) {
340-
ImmutableSet<Contract> contracts = getSpecificationRepository().getContracts(type, target);
342+
ImmutableSet<Contract> contracts =
343+
getSpecificationRepository().getContracts(type, target);
341344
for (Contract contract : contracts) {
342345
proofContracts.add(contract);
343346
}

key.core/src/main/java/de/uka/ilkd/key/control/ProofControl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos,
123123
*
124124
* @param proof The {@link Proof} to start auto mode of.
125125
*/
126-
default void startAutoMode(Proof proof) { startAutoMode(proof, proof.openEnabledGoals());}
126+
default void startAutoMode(Proof proof) { startAutoMode(proof, proof.openEnabledGoals()); }
127127

128128
/**
129129
* Starts the auto mode for the given {@link Proof} and the given {@link Goal}s.
@@ -158,7 +158,8 @@ void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos,
158158
* @param proof The {@link Proof} to start auto mode and to wait for.
159159
* @param goals The {@link Goal}s to close.
160160
*/
161-
void startAndWaitForAutoMode(Proof proof, ImmutableList<Goal> goals) throws InterruptedException;
161+
void startAndWaitForAutoMode(Proof proof, ImmutableList<Goal> goals)
162+
throws InterruptedException;
162163

163164
/**
164165
* Starts the auto mode for the given proof which must be contained in this user interface and

key.core/src/main/java/de/uka/ilkd/key/macros/ProofMacroFacade.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public class ProofMacroFacade {
1818
private static ProofMacroFacade INSTANCE;
1919

2020
public static ProofMacroFacade instance() {
21-
if (INSTANCE == null) INSTANCE = new ProofMacroFacade();
21+
if (INSTANCE == null)
22+
INSTANCE = new ProofMacroFacade();
2223
return INSTANCE;
2324
}
2425

0 commit comments

Comments
 (0)