From cabdcfc7b635196398458852f69c7fa2fb61ef3a Mon Sep 17 00:00:00 2001 From: Julian Wiesler Date: Sun, 12 Mar 2023 13:22:01 +0100 Subject: [PATCH 01/35] Simplify asserts --- .../uka/ilkd/key/logic/TestPosInProgram.java | 7 +---- .../de/uka/ilkd/key/logic/TestPosInTerm.java | 2 +- .../scripts/meta/ValueInjectorTest.java | 8 +++--- .../uka/ilkd/key/parser/TestDeclParser.java | 3 +-- .../BufferedMessageReaderTest.java | 7 ++--- key.ui/build.gradle | 6 ++--- .../util/testcase/java/ArrayUtilTest.java | 2 +- .../util/testcase/java/StringUtilTest.java | 2 +- .../basic/analysis/ModelRebuildTest.java | 4 +-- .../analysis/ReferenceCompletenessTest.java | 3 +-- .../testsuite/java5test/Java5Test.java | 26 +++++++++---------- 11 files changed, 31 insertions(+), 39 deletions(-) diff --git a/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInProgram.java b/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInProgram.java index 95ae9dda122..c5e291ae93e 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInProgram.java +++ b/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInProgram.java @@ -5,18 +5,13 @@ import de.uka.ilkd.key.java.declaration.LocalVariableDeclaration; import de.uka.ilkd.key.java.declaration.VariableSpecification; import de.uka.ilkd.key.java.expression.literal.IntLiteral; -import de.uka.ilkd.key.java.recoderext.ProofJavaProgramFactory; import de.uka.ilkd.key.java.reference.TypeRef; import de.uka.ilkd.key.logic.op.LocationVariable; import de.uka.ilkd.key.logic.sort.Sort; import de.uka.ilkd.key.logic.sort.SortImpl; -import de.uka.ilkd.key.util.HelperClassForTests; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import recoder.java.Identifier; -import recoder.java.JavaProgramFactory; -import recoder.java.reference.TypeReference; import java.util.Arrays; @@ -52,7 +47,7 @@ void getProgramAt() { @MethodSource("validPositions") void depth(int[] pos) { PosInProgram pip = PosInProgram.TOP; - assertTrue(pip.depth() == 0, "Wrong top position"); + assertEquals(0, pip.depth(), "Wrong top position"); for (int i = 0; i < pos.length; i++) { pip = pip.down(pos[i]); } diff --git a/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInTerm.java b/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInTerm.java index f35943c8849..988bf748865 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInTerm.java +++ b/key.core/src/test/java/de/uka/ilkd/key/logic/TestPosInTerm.java @@ -24,7 +24,7 @@ public void testUpDownWithoutCopyExceptForTopLevelChange() { assertEquals(20, pit.getIndex()); - assertFalse(pit.equals(copy)); + assertNotEquals(pit, copy); assertEquals(8, copy.getIndex()); assertEquals(1, copy.depth()); diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjectorTest.java b/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjectorTest.java index 34e7b6d8735..6f906807dd4 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjectorTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjectorTest.java @@ -24,7 +24,7 @@ public void testInjectionSimple() throws Exception { ValueInjector.injection(null, pp, args); - assertEquals(true, pp.b); + assertTrue(pp.b); assertEquals(42, pp.i); assertEquals("blubb", pp.s); @@ -50,7 +50,7 @@ public void testInferScriptArguments() throws NoSuchFieldException { assertEquals("b", b.getName()); assertEquals(PP.class.getDeclaredField("b"), b.getField()); assertEquals(Boolean.TYPE, b.getType()); - assertEquals(true, b.isRequired()); + assertTrue(b.isRequired()); } { @@ -58,7 +58,7 @@ public void testInferScriptArguments() throws NoSuchFieldException { assertEquals("i", i.getName()); assertEquals(PP.class.getDeclaredField("i"), i.getField()); assertEquals(Integer.TYPE, i.getType()); - assertEquals(true, i.isRequired()); + assertTrue(i.isRequired()); } { @@ -66,7 +66,7 @@ public void testInferScriptArguments() throws NoSuchFieldException { assertEquals("s", i.getName()); assertEquals(PP.class.getDeclaredField("s"), i.getField()); assertEquals(String.class, i.getType()); - assertEquals(false, i.isRequired()); + assertFalse(i.isRequired()); } } diff --git a/key.core/src/test/java/de/uka/ilkd/key/parser/TestDeclParser.java b/key.core/src/test/java/de/uka/ilkd/key/parser/TestDeclParser.java index f861a909b0d..29f772508c1 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/parser/TestDeclParser.java +++ b/key.core/src/test/java/de/uka/ilkd/key/parser/TestDeclParser.java @@ -216,8 +216,7 @@ private void assertTermSV(String msg, Object o) { assertTrue(o instanceof SchemaVariable, "The named object: " + o + " is of type " + o.getClass() + ", but the type SchemaVariable was expected"); - assertTrue(((SchemaVariable) o).sort() != Sort.FORMULA, - "Schemavariable is not allowed to match a term of sort FORMULA."); + assertNotSame(((SchemaVariable) o).sort(), Sort.FORMULA, "Schemavariable is not allowed to match a term of sort FORMULA."); } /** diff --git a/key.core/src/test/java/de/uka/ilkd/key/smt/communication/BufferedMessageReaderTest.java b/key.core/src/test/java/de/uka/ilkd/key/smt/communication/BufferedMessageReaderTest.java index 91969c49d2f..1ceaa595b88 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/smt/communication/BufferedMessageReaderTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/smt/communication/BufferedMessageReaderTest.java @@ -6,6 +6,7 @@ import java.io.StringReader; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; public class BufferedMessageReaderTest { @@ -27,7 +28,7 @@ public void testEmptyStart() throws IOException { assertEquals("a", br.readMessage()); assertEquals("b", br.readMessage()); assertEquals("c", br.readMessage()); - assertEquals(null, br.readMessage()); + assertNull(br.readMessage()); } @Test @@ -45,7 +46,7 @@ public void testXY() throws IOException { assertEquals("a", br.readMessage()); assertEquals("b", br.readMessage()); assertEquals("c", br.readMessage()); - assertEquals(null, br.readMessage()); + assertNull(br.readMessage()); } @Test @@ -55,7 +56,7 @@ public void testNewline() throws IOException { assertEquals("a", br.readMessage()); assertEquals("b", br.readMessage()); assertEquals("c", br.readMessage()); - assertEquals(null, br.readMessage()); + assertNull(br.readMessage()); } } diff --git a/key.ui/build.gradle b/key.ui/build.gradle index 4e203ead21f..0f095639fb3 100644 --- a/key.ui/build.gradle +++ b/key.ui/build.gradle @@ -101,7 +101,7 @@ List scanReadmeFiles() { for (String line : Files.readAllLines(examplesIndex)) { line = line.trim() if (line.isEmpty() || line.startsWith("#")) { - continue; + continue } def readme = Paths.get(projectDir.toString(), "examples", @@ -112,9 +112,9 @@ List scanReadmeFiles() { // default file. result.add(dir + "project.key") for (String rmLine : Files.readAllLines(readme)) { - if(rmLine.startsWith("#")) continue; + if(rmLine.startsWith("#")) continue def parts = rmLine.split("=", 2) - if (parts.length < 2) break; + if (parts.length < 2) break def key = parts[0].trim() if(key.containsIgnoreCase("file")) { def filename = parts[1].trim() diff --git a/key.util/src/test/java/org/key_project/util/testcase/java/ArrayUtilTest.java b/key.util/src/test/java/org/key_project/util/testcase/java/ArrayUtilTest.java index c3937e2c2be..499081dbc84 100644 --- a/key.util/src/test/java/org/key_project/util/testcase/java/ArrayUtilTest.java +++ b/key.util/src/test/java/org/key_project/util/testcase/java/ArrayUtilTest.java @@ -339,7 +339,7 @@ public void testAdd_Object() { assertEquals("A", result[0]); assertEquals("B", result[1]); assertEquals("C", result[2]); - assertEquals(null, result[3]); + assertNull(result[3]); // Test null new element on null array try { ArrayUtil.add(null, null); diff --git a/key.util/src/test/java/org/key_project/util/testcase/java/StringUtilTest.java b/key.util/src/test/java/org/key_project/util/testcase/java/StringUtilTest.java index 6325ca330d3..7fee657addd 100644 --- a/key.util/src/test/java/org/key_project/util/testcase/java/StringUtilTest.java +++ b/key.util/src/test/java/org/key_project/util/testcase/java/StringUtilTest.java @@ -65,7 +65,7 @@ public void testChop() { @Test public void testTrimRight() { // Test empty stuff - assertEquals(null, StringUtil.trimRight(null)); + assertNull(StringUtil.trimRight(null)); assertEquals("", StringUtil.trimRight("")); assertEquals("", StringUtil.trimRight(" ")); assertEquals("", StringUtil.trimRight("\t")); diff --git a/recoder/src/test/java/recoder/testsuite/basic/analysis/ModelRebuildTest.java b/recoder/src/test/java/recoder/testsuite/basic/analysis/ModelRebuildTest.java index f8289d43674..17de6ca7e5c 100644 --- a/recoder/src/test/java/recoder/testsuite/basic/analysis/ModelRebuildTest.java +++ b/recoder/src/test/java/recoder/testsuite/basic/analysis/ModelRebuildTest.java @@ -5,6 +5,7 @@ import org.junit.Test; import recoder.abstraction.ClassType; import recoder.java.CompilationUnit; +import recoder.java.declaration.TypeDeclaration; import recoder.kit.ProblemReport; import recoder.kit.Transformation; import recoder.service.ChangeHistory; @@ -46,8 +47,7 @@ public ProblemReport execute() { 0); List ctl = BasicTestsSuite.getConfig().getNameInfo().getClassTypes(); for (int i = ctl.size() - 1; i >= 0; i -= 1) { - Assert.assertTrue("Syntax tree left in an emptied model", - !(ctl.get(i) instanceof recoder.java.declaration.TypeDeclaration)); + Assert.assertFalse("Syntax tree left in an emptied model", ctl.get(i) instanceof TypeDeclaration); } ch.rollback(clearAll); diff --git a/recoder/src/test/java/recoder/testsuite/basic/analysis/ReferenceCompletenessTest.java b/recoder/src/test/java/recoder/testsuite/basic/analysis/ReferenceCompletenessTest.java index 488fdd5c171..a8385d55493 100644 --- a/recoder/src/test/java/recoder/testsuite/basic/analysis/ReferenceCompletenessTest.java +++ b/recoder/src/test/java/recoder/testsuite/basic/analysis/ReferenceCompletenessTest.java @@ -39,8 +39,7 @@ public void testReferenceCompleteness() { while (tw.next()) { ProgramElement pe = tw.getProgramElement(); if (pe instanceof Reference) { - Assert.assertTrue("Uncollated reference detected", - !(pe instanceof UncollatedReferenceQualifier)); + Assert.assertFalse("Uncollated reference detected", pe instanceof UncollatedReferenceQualifier); if (pe instanceof VariableReference) { VariableReference r = (VariableReference) pe; Variable x = xrsi.getVariable(r); diff --git a/recoder/src/test/java/recoder/testsuite/java5test/Java5Test.java b/recoder/src/test/java/recoder/testsuite/java5test/Java5Test.java index 73872912834..2f79597180e 100644 --- a/recoder/src/test/java/recoder/testsuite/java5test/Java5Test.java +++ b/recoder/src/test/java/recoder/testsuite/java5test/Java5Test.java @@ -35,8 +35,7 @@ import java.util.EventObject; import java.util.List; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; /* * Created on 11.03.2005 @@ -261,7 +260,7 @@ public void setErrorThreshold(int maxCount) { public void modelUpdating(EventObject event) { /* ignore */ } public void modelUpdated(EventObject event) { - assertTrue("Not enough errors", errNum == 10); + assertEquals("Not enough errors", 10, errNum); } public void reportError(Exception e) throws RuntimeException { @@ -321,22 +320,22 @@ public void testAnnotations() { NameInfo ni = dsfr.getServiceConfiguration().getNameInfo(); Package p = ni.getPackage("annotationtest"); List ann = p.getPackageAnnotations(); - assertTrue(ann.size() == 1); + assertEquals(1, ann.size()); ByteCodeInfo bi = dsfr.getServiceConfiguration().getByteCodeInfo(); - assertTrue(getAnnotationName(ann.get(0)).equals("annotationtest.Annot")); + assertEquals("annotationtest.Annot", getAnnotationName(ann.get(0))); p = ni.getPackage("a"); ann = p.getPackageAnnotations(); - assertTrue(ann.size() == 1); - assertTrue(getAnnotationName(ann.get(0)).equals("a.B")); - assertTrue(ni.getType("annotationtest.package-info") == null); - assertTrue(ni.getType("a.package-info") == null); + assertEquals(1, ann.size()); + assertEquals("a.B", getAnnotationName(ann.get(0))); + assertNull(ni.getType("annotationtest.package-info")); + assertNull(ni.getType("a.package-info")); // test bytecode annotation support ClassType ct = ni.getClassType("java.lang.annotation.Retention"); - assertTrue(ct != null); + assertNotNull(ct); assertTrue(ct.isAnnotationType()); - assertTrue(ct.getAllSupertypes().size() == 3); + assertEquals(3, ct.getAllSupertypes().size()); ct = ni.getClassType("a.C"); List ml = ct.getMethods(); @@ -371,7 +370,7 @@ public void testEnums() { EnumDeclaration etd = (EnumDeclaration) ni.getType("enumtest.Color"); Constructor c = etd.getConstructors().get(0); List crl = crsc.getCrossReferenceSourceInfo().getReferences(c); - assertTrue(crl.size() == 3); + assertEquals(3, crl.size()); EnumConstantSpecification ecd = (EnumConstantSpecification) ni.getField("enumtest.jls.Operation.PLUS"); @@ -393,8 +392,7 @@ public void testGenerics() { Method m = td.getMethods().get(i); if (m.getName().equals("foobar")) { MethodDeclaration md = (MethodDeclaration) m; - assertTrue("List>>>" - .equals(md.getTypeReference().toSource().trim())); + assertEquals("List>>>", md.getTypeReference().toSource().trim()); // TreeWalker tw = new TreeWalker(md); // while (tw.next()) { // ProgramElement pe = tw.getProgramElement(); From 3682ac1949edac94ef7edcb48d5822793848195e Mon Sep 17 00:00:00 2001 From: Julian Wiesler Date: Sun, 12 Mar 2023 13:27:41 +0100 Subject: [PATCH 02/35] Verbose and redundant statements --- .../MethodCallProofReferencesAnalyst.java | 2 +- .../rule/label/LoopBodyTermLabelUpdate.java | 4 +- ...nvariantNormalBehaviorTermLabelUpdate.java | 4 +- .../ExecutionNodeReader.java | 8 +- .../SymbolicExecutionTreeBuilder.java | 2 +- .../SymbolicLayoutExtractor.java | 4 +- .../SymbolicLayoutReader.java | 2 +- .../TruthValueTracingUtil.java | 2 +- .../impl/SymbolicEquivalenceClass.java | 2 +- .../slicing/AbstractSlicer.java | 4 +- .../util/SymbolicExecutionUtil.java | 12 +- .../ilkd/key/testgen/TestCaseGenerator.java | 5 +- ...ractPredicateAbstractionDomainElement.java | 2 +- .../AbstractionPredicate.java | 27 +- ...onjunctivePredicateAbstractionLattice.java | 2 +- ...isjunctivePredicateAbstractionLattice.java | 2 +- .../key/control/AbstractProofControl.java | 1 - .../TacletInstantiationModel.java | 2 +- .../UseInformationFlowContractMacro.java | 2 +- .../informationflow/po/InfFlowContractPO.java | 2 +- .../po/InfFlowProofSymbols.java | 36 +- .../snippet/BasicBlockExecutionSnippet.java | 2 +- .../po/snippet/BasicLoopExecutionSnippet.java | 2 +- .../po/snippet/BasicSnippetData.java | 4 +- .../BasicSymbolicExecutionSnippet.java | 4 +- ...nfFlowContractAppInOutRelationSnippet.java | 2 +- .../InfFlowInputOutputRelationSnippet.java | 6 +- .../TwoStateMethodPredicateSnippet.java | 6 +- .../informationflow/proof/init/StateVars.java | 10 +- .../InfFlowContractAppTacletExecutor.java | 2 +- ...stractInfFlowContractAppTacletBuilder.java | 4 +- .../AbstractInfFlowTacletBuilder.java | 6 +- .../AbstractInfFlowUnfoldTacletBuilder.java | 4 +- .../InfFlowBlockContractTacletBuilder.java | 4 +- .../InfFlowMethodContractTacletBuilder.java | 4 +- .../ilkd/key/java/ContextStatementBlock.java | 11 +- .../key/java/CreateArrayMethodBuilder.java | 6 +- .../java/de/uka/ilkd/key/java/JavaInfo.java | 30 +- .../uka/ilkd/key/java/JavaProgramElement.java | 2 +- .../ilkd/key/java/Recoder2KeYConverter.java | 10 +- .../key/java/Recoder2KeYTypeConverter.java | 12 +- .../key/java/SchemaRecoder2KeYConverter.java | 2 +- .../java/declaration/ClassDeclaration.java | 2 +- .../declaration/InterfaceDeclaration.java | 2 +- .../declaration/SuperArrayDeclaration.java | 2 +- .../java/reference/MetaClassReference.java | 2 +- .../key/java/reference/MethodReference.java | 2 +- .../java/reference/SchemaTypeReference.java | 2 +- .../key/java/visitor/JavaASTCollector.java | 2 +- .../key/java/visitor/ProgramSVCollector.java | 2 +- .../java/de/uka/ilkd/key/ldt/CharListLDT.java | 4 +- .../java/de/uka/ilkd/key/ldt/HeapLDT.java | 4 +- .../main/java/de/uka/ilkd/key/ldt/LDT.java | 4 +- .../uka/ilkd/key/logic/BoundVarsVisitor.java | 2 +- .../de/uka/ilkd/key/logic/ClashFreeSubst.java | 2 +- .../uka/ilkd/key/logic/MethodStackInfo.java | 2 +- .../ilkd/key/logic/ProgramElementName.java | 8 +- .../ilkd/key/logic/TermCreationException.java | 2 +- .../java/de/uka/ilkd/key/logic/TermImpl.java | 6 +- .../logic/label/OriginTermLabelFactory.java | 4 +- .../key/logic/label/TermLabelManager.java | 6 +- .../label/TermLabelOperationsInterpreter.java | 2 +- .../uka/ilkd/key/logic/op/ProgramMethod.java | 2 +- .../uka/ilkd/key/logic/sort/GenericSort.java | 4 +- .../de/uka/ilkd/key/logic/sort/NullSort.java | 2 +- .../ilkd/key/logic/sort/ProgramSVSort.java | 2 +- .../de/uka/ilkd/key/logic/sort/ProxySort.java | 2 +- .../de/uka/ilkd/key/logic/sort/SortImpl.java | 2 +- .../ilkd/key/macros/AbstractProofMacro.java | 2 +- .../key/macros/HeapSimplificationMacro.java | 140 +++---- .../macros/IntegerSimplificationMacro.java | 50 +-- .../key/macros/ProofMacroFinishedInfo.java | 4 +- .../ilkd/key/macros/scripts/FocusCommand.java | 2 +- .../key/macros/scripts/RewriteCommand.java | 1 - .../key/nparser/builder/DefaultBuilder.java | 2 +- .../builder/FunctionPredicateBuilder.java | 2 +- .../key/nparser/builder/ProblemFinder.java | 2 +- .../de/uka/ilkd/key/pp/CharListNotation.java | 2 +- .../ilkd/key/pp/HideSequentPrintFilter.java | 4 +- .../uka/ilkd/key/pp/InitialPositionTable.java | 8 +- .../de/uka/ilkd/key/pp/PositionTable.java | 2 +- .../key/pp/RegroupSequentPrintFilter.java | 4 +- .../uka/ilkd/key/pp/SequentPrintFilter.java | 8 +- .../pp/ShowSelectedSequentPrintFilter.java | 4 +- .../ilkd/key/proof/BuiltInRuleAppIndex.java | 2 +- .../uka/ilkd/key/proof/BuiltInRuleIndex.java | 2 +- .../uka/ilkd/key/proof/FormulaTagManager.java | 2 +- .../main/java/de/uka/ilkd/key/proof/Goal.java | 6 +- .../InstantiationProposerCollection.java | 2 +- .../key/proof/MultiThreadedTacletIndex.java | 2 +- .../de/uka/ilkd/key/proof/NameRecorder.java | 4 +- .../main/java/de/uka/ilkd/key/proof/Node.java | 6 +- .../de/uka/ilkd/key/proof/OpReplacer.java | 6 +- .../uka/ilkd/key/proof/ProgVarReplacer.java | 4 +- .../de/uka/ilkd/key/proof/ProofTreeEvent.java | 2 +- .../de/uka/ilkd/key/proof/RuleAppIndex.java | 10 +- .../key/proof/SemisequentTacletAppIndex.java | 4 +- .../key/proof/SingleThreadedTacletIndex.java | 2 +- .../de/uka/ilkd/key/proof/TacletAppIndex.java | 4 +- .../de/uka/ilkd/key/proof/TacletIndex.java | 23 +- .../ilkd/key/proof/TermTacletAppIndex.java | 6 +- .../key/proof/TermTacletAppIndexCacheSet.java | 10 +- .../proof/delayedcut/DelayedCutProcessor.java | 2 +- .../key/proof/init/AbstractOperationPO.java | 6 +- .../uka/ilkd/key/proof/init/AbstractPO.java | 8 +- .../ilkd/key/proof/init/AbstractProfile.java | 4 +- .../key/proof/init/DependencyContractPO.java | 2 +- .../uka/ilkd/key/proof/init/InitConfig.java | 6 +- .../key/proof/init/ProofObligationVars.java | 2 +- .../key/proof/init/WellDefinednessPO.java | 6 +- .../key/proof/io/AbstractProblemLoader.java | 4 +- ...termediatePresentationProofFileParser.java | 8 +- .../proof/io/IntermediateProofReplayer.java | 8 +- .../de/uka/ilkd/key/proof/io/KeYFile.java | 4 +- .../ilkd/key/proof/join/JoinProcessor.java | 2 +- .../key/proof/mgt/ProofCorrectnessMgt.java | 6 +- .../proof/proofevent/NodeChangeJournal.java | 4 +- .../proof/proofevent/NodeChangesHolder.java | 2 +- .../key/proof/proofevent/NodeReplacement.java | 6 +- .../ilkd/key/prover/impl/ApplyStrategy.java | 4 +- .../key/prover/impl/DefaultGoalChooser.java | 24 +- .../prover/impl/DepthFirstGoalChooser.java | 4 +- .../AbstractBlockContractBuiltInRuleApp.java | 2 +- .../key/rule/AbstractBlockContractRule.java | 8 +- .../ilkd/key/rule/AbstractBuiltInRuleApp.java | 2 +- .../key/rule/AbstractContractRuleApp.java | 2 +- .../AbstractLoopContractBuiltInRuleApp.java | 2 +- .../key/rule/AbstractLoopContractRule.java | 2 +- .../key/rule/AbstractLoopInvariantRule.java | 2 +- .../ilkd/key/rule/BoundUniquenessChecker.java | 2 +- .../uka/ilkd/key/rule/IfFormulaInstSeq.java | 2 +- .../key/rule/LoopInvariantBuiltInRuleApp.java | 2 +- .../de/uka/ilkd/key/rule/NoFindTaclet.java | 2 +- .../de/uka/ilkd/key/rule/NoPosTacletApp.java | 4 +- .../uka/ilkd/key/rule/OneStepSimplifier.java | 8 +- .../de/uka/ilkd/key/rule/PosTacletApp.java | 4 +- .../de/uka/ilkd/key/rule/QueryExpand.java | 3 - .../rule/SVNameCorrespondenceCollector.java | 2 +- .../java/de/uka/ilkd/key/rule/Taclet.java | 4 +- .../java/de/uka/ilkd/key/rule/TacletApp.java | 20 +- .../rule/TacletSchemaVariableCollector.java | 4 +- .../key/rule/UseDependencyContractApp.java | 2 +- .../key/rule/UseDependencyContractRule.java | 6 +- .../key/rule/UseOperationContractRule.java | 10 +- .../uka/ilkd/key/rule/WhileInvariantRule.java | 8 +- .../DropEffectlessStoresCondition.java | 2 +- .../conditions/MetaDisjointCondition.java | 4 +- .../key/rule/conditions/TypeResolver.java | 2 +- .../rule/executor/javadl/TacletExecutor.java | 16 +- .../rule/inst/GenericSortInstantiations.java | 28 +- .../key/rule/inst/ProgramSVInstantiation.java | 2 +- .../ilkd/key/rule/inst/SVInstantiations.java | 16 +- .../inst/TermLabelInstantiationEntry.java | 7 +- .../match/legacy/LegacyTacletMatcher.java | 4 +- .../key/rule/match/vm/VMTacletMatcher.java | 6 +- .../MatchTermLabelInstruction.java | 2 +- .../ilkd/key/rule/merge/MergeProcedure.java | 2 +- .../de/uka/ilkd/key/rule/merge/MergeRule.java | 14 +- .../merge/procedures/MergeByIfThenElse.java | 2 +- .../merge/procedures/MergeTotalWeakening.java | 2 +- .../MergeWithLatticeAbstraction.java | 2 +- .../key/rule/metaconstruct/ForToWhile.java | 2 +- .../key/rule/metaconstruct/MethodCall.java | 2 +- .../metaconstruct/ProgramTransformer.java | 4 +- .../key/rule/metaconstruct/UnwindLoop.java | 2 +- .../WhileInvariantTransformer.java | 2 +- .../key/rule/metaconstruct/arith/MetaDiv.java | 2 +- .../rule/metaconstruct/arith/Monomial.java | 6 +- .../rule/metaconstruct/arith/Polynomial.java | 14 +- .../AntecSuccTacletGoalTemplate.java | 2 +- .../RewriteTacletGoalTemplate.java | 4 +- .../key/rule/tacletbuilder/TacletBuilder.java | 14 +- .../rule/tacletbuilder/TacletGenerator.java | 48 +-- .../tacletbuilder/TacletGoalTemplate.java | 8 +- .../tacletbuilder/TacletPrefixBuilder.java | 4 +- .../uka/ilkd/key/settings/ChoiceSettings.java | 2 +- .../ilkd/key/smt/AbstractSMTTranslator.java | 4 +- .../uka/ilkd/key/smt/lang/SMTTermBinOp.java | 4 +- .../solvertypes/SolverPropertiesLoader.java | 9 +- .../ilkd/key/speclang/AuxiliaryContract.java | 2 +- .../uka/ilkd/key/speclang/ClassAxiomImpl.java | 4 +- .../ilkd/key/speclang/ClassInvariantImpl.java | 2 +- .../de/uka/ilkd/key/speclang/Contract.java | 2 +- .../speclang/FunctionalAuxiliaryContract.java | 2 +- .../FunctionalOperationContractImpl.java | 4 +- .../uka/ilkd/key/speclang/LoopSpecImpl.java | 2 +- .../key/speclang/MethodWellDefinedness.java | 4 +- .../key/speclang/ModelMethodExecution.java | 2 +- .../ilkd/key/speclang/PartialInvAxiom.java | 2 +- .../ilkd/key/speclang/PositionedString.java | 2 +- .../de/uka/ilkd/key/speclang/QueryAxiom.java | 2 +- .../ilkd/key/speclang/RepresentsAxiom.java | 2 +- .../speclang/StatementWellDefinedness.java | 2 +- .../key/speclang/WellDefinednessCheck.java | 14 +- .../dl/translation/DLSpecFactory.java | 2 +- .../key/speclang/jml/JMLInfoExtractor.java | 10 +- .../key/speclang/jml/JMLSpecExtractor.java | 2 +- .../pretranslation/TextualJMLClassAxiom.java | 2 +- .../speclang/translation/SLParameters.java | 2 +- .../translation/SLResolverManager.java | 2 +- .../key/strategy/AbstractFeatureStrategy.java | 2 +- .../key/strategy/BuiltInRuleAppContainer.java | 6 +- ...ussedBreakpointRuleApplicationManager.java | 2 +- .../FocussedRuleApplicationManager.java | 2 +- .../ilkd/key/strategy/IsInRangeProvable.java | 2 +- .../ilkd/key/strategy/JavaCardDLStrategy.java | 341 +++++++++--------- .../ilkd/key/strategy/RuleAppContainer.java | 6 +- .../ilkd/key/strategy/TacletAppContainer.java | 2 +- .../feature/InfFlowContractAppFeature.java | 2 +- .../strategy/feature/SmallerThanFeature.java | 2 +- .../quantifierHeuristics/BasicMatching.java | 4 +- .../quantifierHeuristics/ClausesGraph.java | 6 +- .../EqualityConstraint.java | 10 +- .../quantifierHeuristics/Instantiation.java | 8 +- .../PredictCostProver.java | 6 +- ...lacerOfQuanVariablesWithMetavariables.java | 2 +- .../SplittableQuantifiedFormulaFeature.java | 2 +- .../quantifierHeuristics/TriggerUtils.java | 2 +- .../quantifierHeuristics/TriggersSet.java | 8 +- .../TwoSidedMatching.java | 6 +- .../quantifierHeuristics/UniTrigger.java | 8 +- .../MultiplesModEquationsGenerator.java | 2 +- .../TriggeredInstantiations.java | 8 +- .../lemma/EmptyEnvInput.java | 2 +- .../taclettranslation/lemma/TacletLoader.java | 2 +- .../ilkd/key/util/HelperClassForTests.java | 2 +- .../de/uka/ilkd/key/util/InfFlowSpec.java | 6 +- .../java/de/uka/ilkd/key/util/MiscTools.java | 16 +- .../key/util/mergerule/MergeRuleUtils.java | 4 +- .../java/de/uka/ilkd/key/logic/TestName.java | 2 +- .../de/uka/ilkd/key/rule/TacletForTests.java | 2 +- .../main/java/de/uka/ilkd/key/core/Main.java | 1 - .../gui/BlockContractExternalCompletion.java | 2 +- .../gui/BlockContractInternalCompletion.java | 2 +- .../ilkd/key/gui/ContractSelectionPanel.java | 2 +- .../de/uka/ilkd/key/gui/InfoTreeModel.java | 2 +- .../gui/InspectorForDecisionPredicates.java | 2 +- .../ilkd/key/gui/ProofManagementDialog.java | 6 +- .../de/uka/ilkd/key/gui/RecentFileMenu.java | 2 - .../gui/actions/OpenMostRecentFileAction.java | 1 - .../gui/nodeviews/CurrentGoalViewMenu.java | 4 +- .../gui/nodeviews/DragNDropInstantiator.java | 18 +- .../nodeviews/PosInSequentTransferable.java | 2 +- .../key/gui/proofdiff/ProofDiffFrame.java | 1 - .../key/gui/proofdiff/ProofDifference.java | 4 +- .../key/gui/proofdiff/diff_match_patch.java | 2 +- .../ilkd/key/gui/prooftree/ProofTreeView.java | 2 +- .../key/gui/settings/StandardUISettings.java | 4 +- .../uka/ilkd/key/gui/smt/SolverListener.java | 11 +- .../key/gui/smt/settings/SolverOptions.java | 17 +- .../java/org/key_project/util/Filenames.java | 2 +- .../java/org/key_project/util/Streams.java | 2 +- .../java/org/key_project/util/Strings.java | 4 +- .../util/collection/DefaultImmutableMap.java | 4 +- .../util/collection/DefaultImmutableSet.java | 8 +- .../util/collection/ImmutableArray.java | 2 +- .../util/collection/ImmutableLeftistHeap.java | 6 +- .../util/collection/ImmutableList.java | 4 +- .../util/collection/ImmutableSet.java | 4 +- .../util/collection/Immutables.java | 2 +- .../testcase/java/CollectionUtilTest.java | 2 +- .../io/DefaultSourceFileRepository.java | 2 +- .../main/java/recoder/java/SourceElement.java | 4 +- .../parser/ASCII_UCodeESC_CharStream.java | 1 - .../java/recoder/parser/JavaCCParser.java | 24 +- .../java/recoder/parser/JavaCharStream.java | 1 - .../DefaultCrossReferenceSourceInfo.java | 1 - 267 files changed, 891 insertions(+), 939 deletions(-) diff --git a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/MethodCallProofReferencesAnalyst.java b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/MethodCallProofReferencesAnalyst.java index 52a58bdd2c2..5d8e10df3ba 100644 --- a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/MethodCallProofReferencesAnalyst.java +++ b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/MethodCallProofReferencesAnalyst.java @@ -131,7 +131,7 @@ protected IProofReference createReference(Node node, Services se throw new IllegalArgumentException("Empty argument list expected."); } IProgramMethod pm = services.getJavaInfo().getProgramMethod(type.getKeYJavaType(), - method.toString(), ImmutableSLList.nil(), type.getKeYJavaType()); + method.toString(), ImmutableSLList.nil(), type.getKeYJavaType()); return new DefaultProofReference(IProofReference.CALL_METHOD, node, pm); } } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopBodyTermLabelUpdate.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopBodyTermLabelUpdate.java index b09c87c6ef9..f8a49cd82bb 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopBodyTermLabelUpdate.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopBodyTermLabelUpdate.java @@ -46,9 +46,7 @@ public void updateLabels(TermLabelState state, Services services, JavaBlock newTermJavaBlock, Set labels) { if (rule instanceof WhileInvariantRule && "LoopBodyModality".equals(hint) && SymbolicExecutionUtil.hasSymbolicExecutionLabel(modalityTerm)) { - if (!labels.contains(SymbolicExecutionUtil.LOOP_BODY_LABEL)) { - labels.add(SymbolicExecutionUtil.LOOP_BODY_LABEL); - } + labels.add(SymbolicExecutionUtil.LOOP_BODY_LABEL); } } } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopInvariantNormalBehaviorTermLabelUpdate.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopInvariantNormalBehaviorTermLabelUpdate.java index 0f5fa959bfa..d108adb486f 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopInvariantNormalBehaviorTermLabelUpdate.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/LoopInvariantNormalBehaviorTermLabelUpdate.java @@ -46,9 +46,7 @@ public void updateLabels(TermLabelState state, Services services, JavaBlock newTermJavaBlock, Set labels) { if (rule instanceof WhileInvariantRule && "LoopBodyImplication".equals(hint) && SymbolicExecutionUtil.hasSymbolicExecutionLabel(modalityTerm)) { - if (!labels.contains(SymbolicExecutionUtil.LOOP_INVARIANT_NORMAL_BEHAVIOR_LABEL)) { - labels.add(SymbolicExecutionUtil.LOOP_INVARIANT_NORMAL_BEHAVIOR_LABEL); - } + labels.add(SymbolicExecutionUtil.LOOP_INVARIANT_NORMAL_BEHAVIOR_LABEL); } } } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodeReader.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodeReader.java index cd20e048245..ea0b192549f 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodeReader.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodeReader.java @@ -303,7 +303,7 @@ public void startElement(String uri, String localName, String qName, Attributes throw new SAXException("Can't add constraint to non execution node."); } KeYlessConstraint constraint = new KeYlessConstraint(getName(attributes)); - ((AbstractKeYlessExecutionNode) parent).addConstraint(constraint); + parent.addConstraint(constraint); } } else if (isCallStateVariable(uri, localName, qName)) { Object parentValue = parentVariableValueStack.peekFirst(); @@ -379,7 +379,7 @@ public void startElement(String uri, String localName, String qName, Attributes List linkPaths = outgoingLinks.get(parent); if (linkPaths == null) { linkPaths = new LinkedList(); - outgoingLinks.put((AbstractKeYlessExecutionNode) parent, linkPaths); + outgoingLinks.put(parent, linkPaths); } linkPaths.add(getPathInTree(attributes)); } else if (isTerminationEntry(uri, localName, qName)) { @@ -1292,12 +1292,12 @@ public static abstract class AbstractKeYlessExecutionNode outgoingLinks = ImmutableSLList.nil(); + private ImmutableList outgoingLinks = ImmutableSLList.nil(); /** * The contained incoming links. */ - private ImmutableList incomingLinks = ImmutableSLList.nil(); + private ImmutableList incomingLinks = ImmutableSLList.nil(); /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java index ee39619d31b..74a14eca00f 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java @@ -741,7 +741,7 @@ private class AnalyzerProofVisitor implements ProofVisitor { /** * Contains all {@link Node}s which are closed after a join. */ - private ImmutableList joinNodes = ImmutableSLList.nil(); + private ImmutableList joinNodes = ImmutableSLList.nil(); /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java index 1a651ebeace..0cff892accf 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java @@ -454,7 +454,7 @@ protected List> extractAppliedCutsFromGoals(Proof proof) */ protected ImmutableSet extractAppliedCutsSet(Node goalnode, Node root) throws ProofInputException { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); if (!root.find(goalnode)) { throw new ProofInputException( "Node \"" + goalnode + "\" ist not a childs of root node \"" + root + "\"."); @@ -464,7 +464,7 @@ protected ImmutableSet extractAppliedCutsSet(Node goalnode, Node root) goalnode = goalnode.parent(); if (goalnode.getAppliedRuleApp() instanceof NoPosTacletApp) { NoPosTacletApp npta = (NoPosTacletApp) goalnode.getAppliedRuleApp(); - if ("CUT".equals(npta.taclet().name().toString().toUpperCase())) { + if ("CUT".equalsIgnoreCase(npta.taclet().name().toString())) { Term inst = (Term) npta.instantiations() .lookupEntryForSV(new Name("cutFormula")).value().getInstantiation(); inst = TermBuilder.goBelowUpdates(inst); diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java index 04dd414ab66..fac28546b65 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java @@ -1061,7 +1061,7 @@ public static class KeYlessEquivalenceClass extends AbstractKeYlessElement * @param representativeString The representative term. */ public KeYlessEquivalenceClass(String representativeString) { - this(ImmutableSLList.nil(), representativeString); + this(ImmutableSLList.nil(), representativeString); } /** diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java index 6349ef37263..226c6de7eec 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java @@ -235,7 +235,7 @@ protected static void evaluateNode(final Node evaluationNode, final boolean useU List labels = findInvolvedLabels(parent.sequent(), tacletApp, termLabelName); if (!labels.isEmpty()) { - Taclet taclet = ((TacletApp) tacletApp).taclet(); + Taclet taclet = tacletApp.taclet(); if (!isClosingRule(taclet)) { // Not a closing taclet checkPerformed = true; TacletGoalTemplate tacletGoal = diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/impl/SymbolicEquivalenceClass.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/impl/SymbolicEquivalenceClass.java index 1b3ec08b0d3..f0d3ab153ba 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/impl/SymbolicEquivalenceClass.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/impl/SymbolicEquivalenceClass.java @@ -35,7 +35,7 @@ public class SymbolicEquivalenceClass extends AbstractElement implements ISymbol * @param settings The {@link IModelSettings} to use. */ public SymbolicEquivalenceClass(Services services, IModelSettings settings) { - this(services, ImmutableSLList.nil(), settings); + this(services, ImmutableSLList.nil(), settings); } /** diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/slicing/AbstractSlicer.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/slicing/AbstractSlicer.java index 8300eef2acc..8717323b643 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/slicing/AbstractSlicer.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/slicing/AbstractSlicer.java @@ -875,7 +875,7 @@ protected boolean performRemoveRelevant(Services services, Location normalized, protected Location toLocation(Services services, ReferencePrefix prefix, ExecutionContext ec, ReferencePrefix thisReference) { ImmutableList accesses = - toLocationRecursive(services, prefix, ec, thisReference, ImmutableSLList.nil()); + toLocationRecursive(services, prefix, ec, thisReference, ImmutableSLList.nil()); return new Location(accesses); } @@ -983,7 +983,7 @@ public static Location toLocation(Services services, Term term) { } } else { String name = term.op().name().toString(); - int index = name.toString().indexOf("::"); + int index = name.indexOf("::"); if (index >= 0) { String fullTypeName = name.substring(0, index); String fieldName = name.substring(index + 3); diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java index a8b5c336bb7..c44127ef67e 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java @@ -1917,7 +1917,7 @@ private static Term computeContractRuleAppBranchCondition(Node parent, Node node final ProofEnvironment sideProofEnv = SymbolicExecutionSideProofUtil .cloneProofEnvironmentWithOwnOneStepSimplifier(parent.proof(), true); Sequent newSequent = - createSequentToProveWithNewSuccedent(parent, (Term) null, result, true); + createSequentToProveWithNewSuccedent(parent, null, result, true); condition = evaluateInSideProof(services, parent.proof(), sideProofEnv, newSequent, RESULT_LABEL, "Operation contract branch condition computation on node " + parent.serialNr() + " for branch " + node.serialNr() + ".", @@ -2290,7 +2290,7 @@ private static Term computeLoopInvariantBuiltInRuleAppBranchCondition(Node paren // default instance can't be used parallel. final ProofEnvironment sideProofEnv = SymbolicExecutionSideProofUtil .cloneProofEnvironmentWithOwnOneStepSimplifier(parent.proof(), true); - Sequent newSequent = createSequentToProveWithNewSuccedent(parent, (Term) null, + Sequent newSequent = createSequentToProveWithNewSuccedent(parent, null, modalityTerm, pair.first, true); condition = evaluateInSideProof(services, parent.proof(), sideProofEnv, newSequent, RESULT_LABEL, "Loop invariant branch condition computation on node " @@ -2603,7 +2603,7 @@ private static Term computeTacletAppBranchCondition(Node parent, Node node, bool // instance can't be used parallel. final ProofEnvironment sideProofEnv = SymbolicExecutionSideProofUtil .cloneProofEnvironmentWithOwnOneStepSimplifier(parent.proof(), true); - Sequent newSequent = createSequentToProveWithNewSuccedent(parent, null, (Term) null, + Sequent newSequent = createSequentToProveWithNewSuccedent(parent, null, null, newLeftAndRight, true); condition = evaluateInSideProof(services, parent.proof(), sideProofEnv, newSequent, RESULT_LABEL, "Taclet branch condition computation on node " + parent.serialNr() @@ -2754,7 +2754,7 @@ private static Term evaluateInSideProof(Services services, Proof proof, // scenarios in which a precondition or null pointer // check can't be shown splittingOption, false); - ImmutableList goalCondtions = ImmutableSLList.nil(); + ImmutableList goalCondtions = ImmutableSLList.nil(); for (Pair pair : resultValuesAndConditions) { Term goalCondition = pair.first; goalCondition = SymbolicExecutionUtil.replaceSkolemConstants(pair.second.sequent(), @@ -2963,7 +2963,7 @@ public static ImmutableList collectElementaryUpdates(Term term) { } else if (term.op() instanceof ElementaryUpdate) { return ImmutableSLList.nil().prepend(term); } else { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } } @@ -3644,7 +3644,7 @@ public static IProgramVariable extractExceptionVariable(Proof proof) { && tryStatement.getBranchList().get(0) instanceof Catch) { Catch catchStatement = (Catch) tryStatement.getBranchList().get(0); if (catchStatement.getBody() instanceof StatementBlock) { - StatementBlock catchBlock = (StatementBlock) catchStatement.getBody(); + StatementBlock catchBlock = catchStatement.getBody(); if (catchBlock.getBody().size() == 1 && catchBlock.getBody().get(0) instanceof Assignment) { Assignment assignment = (Assignment) catchBlock.getBody().get(0); diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java index cd23ad51ba1..ad18a76bc5b 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java @@ -722,12 +722,9 @@ private boolean isInPrestate(Collection prestate, String na } public String generateModifierSetAssertions(Model m) { - StringBuilder res = new StringBuilder(); - - res.append(TAB + "//Modifier set assertions"); - return res.toString(); + return TAB + "//Modifier set assertions"; } public String generateTestCase(Model m, Map typeInfMap) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractPredicateAbstractionDomainElement.java b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractPredicateAbstractionDomainElement.java index f84f62c0768..dedc02ce25c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractPredicateAbstractionDomainElement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractPredicateAbstractionDomainElement.java @@ -35,7 +35,7 @@ public AbstractPredicateAbstractionDomainElement( * isTopElem is set to true; otherwise, it is a bottom element. */ protected AbstractPredicateAbstractionDomainElement(boolean isTopElem) { - this.predicates = DefaultImmutableSet.nil(); + this.predicates = DefaultImmutableSet.nil(); this.topElem = isTopElem; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java index fc695fba0b4..bdc3ef6f2d0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java +++ b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java @@ -1,22 +1,7 @@ package de.uka.ilkd.key.axiom_abstraction.predicateabstraction; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Function; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.naming.NameAlreadyBoundException; - import de.uka.ilkd.key.java.Services; -import de.uka.ilkd.key.logic.Name; -import de.uka.ilkd.key.logic.Named; -import de.uka.ilkd.key.logic.Namespace; -import de.uka.ilkd.key.logic.NamespaceSet; -import de.uka.ilkd.key.logic.ProgramElementName; -import de.uka.ilkd.key.logic.Term; -import de.uka.ilkd.key.logic.TermBuilder; -import de.uka.ilkd.key.logic.TermFactory; +import de.uka.ilkd.key.logic.*; import de.uka.ilkd.key.logic.op.IProgramVariable; import de.uka.ilkd.key.logic.op.LocationVariable; import de.uka.ilkd.key.logic.sort.Sort; @@ -26,6 +11,13 @@ import de.uka.ilkd.key.util.Pair; import de.uka.ilkd.key.util.mergerule.MergeRuleUtils; +import javax.naming.NameAlreadyBoundException; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Interface for predicates used for predicate abstraction. An abstraction predicate is a mapping * from program variables or constants to formulae instantiated for the respective variable. @@ -188,8 +180,7 @@ public String toParseableString(final Services services) { sb.append("(").append("'").append(predicateFormWithPlaceholder.first.sort()).append(" ") .append(predicateFormWithPlaceholder.first).append("', '") .append(OutputStreamProofSaver.escapeCharacters(OutputStreamProofSaver - .printAnything(predicateFormWithPlaceholder.second, services, false) - .toString().trim().replaceAll("(\\r|\\n|\\r\\n)+", ""))) + .printAnything(predicateFormWithPlaceholder.second, services, false).trim().replaceAll("(\\r|\\n|\\r\\n)+", ""))) .append("')"); return sb.toString(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/ConjunctivePredicateAbstractionLattice.java b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/ConjunctivePredicateAbstractionLattice.java index 5b89813546d..5a62d5f522a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/ConjunctivePredicateAbstractionLattice.java +++ b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/ConjunctivePredicateAbstractionLattice.java @@ -160,7 +160,7 @@ public AbstractDomainElement next() { } ImmutableSet predicatesForElem = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); ImmutableFixedLengthBitSet currBitSet = getBitSetsByNumZeroes().get(nrZeroes).get(idx); diff --git a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/DisjunctivePredicateAbstractionLattice.java b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/DisjunctivePredicateAbstractionLattice.java index 5c349399161..1a418b68d11 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/DisjunctivePredicateAbstractionLattice.java +++ b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/DisjunctivePredicateAbstractionLattice.java @@ -160,7 +160,7 @@ public AbstractDomainElement next() { } ImmutableSet predicatesForElem = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); ImmutableFixedLengthBitSet currBitSet = getBitSetsByNumZeroes().get(nrZeroes).get(idx); diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java b/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java index 728f281b14b..ebc78907b10 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java @@ -406,7 +406,6 @@ public void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos goal.apply(app); } - return; } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/instantiation_model/TacletInstantiationModel.java b/key.core/src/main/java/de/uka/ilkd/key/control/instantiation_model/TacletInstantiationModel.java index 11073054ed0..6ecbfa46056 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/instantiation_model/TacletInstantiationModel.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/instantiation_model/TacletInstantiationModel.java @@ -160,7 +160,7 @@ private TacletApp createTacletAppFromIfs(TacletApp tacletApp) throws IfMismatchE SVInstantiationParserException, MissingInstantiationException, SortMismatchException { ImmutableList instList = - ImmutableSLList.nil(); + ImmutableSLList.nil(); for (int i = ifChoiceModel.length - 1; i >= 0; --i) { instList = instList.prepend(ifChoiceModel[i].getSelection(i)); diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/UseInformationFlowContractMacro.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/UseInformationFlowContractMacro.java index e6140a3fad9..1b0a067e6c9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/UseInformationFlowContractMacro.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/UseInformationFlowContractMacro.java @@ -60,7 +60,7 @@ public String getDescription() { private static final Set ADMITTED_RULENAME_SET = asSet(ADMITTED_RULENAMES); - private static ImmutableSet appliedInfFlowRules = DefaultImmutableSet.nil(); + private static ImmutableSet appliedInfFlowRules = DefaultImmutableSet.nil(); /** * Gets the set of admitted rule names. diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowContractPO.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowContractPO.java index ab5e4c4aacc..0ffcbf391b0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowContractPO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowContractPO.java @@ -158,7 +158,7 @@ protected Modality getTerminationMarker() { @Override public InformationFlowContract getContract() { - return (InformationFlowContract) contract; + return contract; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java index ddeddbe06bb..c6d0f4a5188 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java @@ -26,22 +26,22 @@ public class InfFlowProofSymbols { private boolean isFreshContract; private ImmutableSet> sorts = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); private ImmutableSet> predicates = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); private ImmutableSet> functions = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); private ImmutableSet> programVariables = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); private ImmutableSet> schemaVariables = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); private ImmutableSet> taclets = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); /* * private static final ImmutableSet tacletPrefixes = @@ -76,7 +76,7 @@ private InfFlowProofSymbols getLabeledSymbols() { private ImmutableSet> getLabeledSorts() { ImmutableSet> labeledSorts = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); for (Pair s : sorts) { if (s.second) { labeledSorts = labeledSorts.add(new Pair(s.first, false)); @@ -87,7 +87,7 @@ private ImmutableSet> getLabeledSorts() { private ImmutableSet> getLabeledPredicates() { ImmutableSet> labeledPredicates = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); for (Pair p : predicates) { if (p.second) { labeledPredicates = @@ -99,7 +99,7 @@ private ImmutableSet> getLabeledPredicates() { private ImmutableSet> getLabeledFunctions() { ImmutableSet> labeledFunctions = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); for (Pair f : functions) { if (f.second) { labeledFunctions = @@ -111,7 +111,7 @@ private ImmutableSet> getLabeledFunctions() { private ImmutableSet> getLabeledProgramVariables() { ImmutableSet> labeledProgramVariables = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); for (Pair pv : programVariables) { if (pv.second) { labeledProgramVariables = labeledProgramVariables @@ -123,7 +123,7 @@ private ImmutableSet> getLabeledProgramVariables( private ImmutableSet> getLabeledSchemaVariables() { ImmutableSet> labeledSchemaVariables = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); for (Pair sv : schemaVariables) { if (sv.second) { labeledSchemaVariables = @@ -135,7 +135,7 @@ private ImmutableSet> getLabeledSchemaVariables() private ImmutableSet> getLabeledTaclets() { ImmutableSet> labeledTaclets = - DefaultImmutableSet.>nil(); + DefaultImmutableSet.nil(); for (Pair t : taclets) { if (t.second) { labeledTaclets = labeledTaclets.add(new Pair(t.first, false)); @@ -445,7 +445,7 @@ public void addLabeledTotalTerm(Term t) { } private ImmutableSet getSorts() { - ImmutableSet sorts = DefaultImmutableSet.nil(); + ImmutableSet sorts = DefaultImmutableSet.nil(); for (Pair s : this.sorts) { sorts = sorts.add(s.first); } @@ -494,7 +494,7 @@ private LinkedList removeArraySorts(LinkedList sorts) { } private ImmutableSet getPredicates() { - ImmutableSet predicates = DefaultImmutableSet.nil(); + ImmutableSet predicates = DefaultImmutableSet.nil(); for (Pair p : this.predicates) { predicates = predicates.add(p.first); } @@ -502,7 +502,7 @@ private ImmutableSet getPredicates() { } private ImmutableSet getFunctions() { - ImmutableSet functions = DefaultImmutableSet.nil(); + ImmutableSet functions = DefaultImmutableSet.nil(); for (Pair f : this.functions) { functions = functions.add(f.first); } @@ -510,7 +510,7 @@ private ImmutableSet getFunctions() { } private ImmutableSet getProgramVariables() { - ImmutableSet programVariables = DefaultImmutableSet.nil(); + ImmutableSet programVariables = DefaultImmutableSet.nil(); for (Pair pv : this.programVariables) { programVariables = programVariables.add(pv.first); } @@ -518,7 +518,7 @@ private ImmutableSet getProgramVariables() { } private ImmutableSet getSchemaVariables() { - ImmutableSet schemaVariables = DefaultImmutableSet.nil(); + ImmutableSet schemaVariables = DefaultImmutableSet.nil(); for (Pair sv : this.schemaVariables) { schemaVariables = schemaVariables.add(sv.first); } @@ -526,7 +526,7 @@ private ImmutableSet getSchemaVariables() { } private ImmutableSet getTaclets() { - ImmutableSet taclets = DefaultImmutableSet.nil(); + ImmutableSet taclets = DefaultImmutableSet.nil(); for (Pair t : this.taclets) { taclets = taclets.add(t.first); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicBlockExecutionSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicBlockExecutionSnippet.java index 2fcda9e5601..a5380157ce8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicBlockExecutionSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicBlockExecutionSnippet.java @@ -30,7 +30,7 @@ class BasicBlockExecutionSnippet extends ReplaceAndRegisterMethod implements Fac @Override public Term produce(BasicSnippetData d, ProofObligationVars poVars) throws UnsupportedOperationException { - ImmutableList posts = ImmutableSLList.nil(); + ImmutableList posts = ImmutableSLList.nil(); if (poVars.post.self != null) { posts = posts.append(d.tb.equals(poVars.post.self, poVars.pre.self)); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java index 01025e2bc83..a5e2560d1a2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java @@ -25,7 +25,7 @@ public class BasicLoopExecutionSnippet extends ReplaceAndRegisterMethod implemen @Override public Term produce(BasicSnippetData d, ProofObligationVars poVars) throws UnsupportedOperationException { - ImmutableList posts = ImmutableSLList.nil(); + ImmutableList posts = ImmutableSLList.nil(); if (poVars.post.self != null) posts = posts.append(d.tb.equals(poVars.post.self, poVars.pre.self)); diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java index 9b6cf11a2ff..e82f61e7101 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java @@ -152,7 +152,7 @@ public Class getType() { // add guard term to information flow specs (necessary for soundness) // and add the modified specs to the table ImmutableList infFlowSpecs = invariant.getInfFlowSpecs(services); - ImmutableList modifedSpecs = ImmutableSLList.nil(); + ImmutableList modifedSpecs = ImmutableSLList.nil(); for (InfFlowSpec infFlowSpec : infFlowSpecs) { ImmutableList modifiedPreExps = infFlowSpec.preExpressions.append(guardTerm); ImmutableList modifiedPostExps = infFlowSpec.postExpressions.append(guardTerm); @@ -236,7 +236,7 @@ public Class getType() { private ImmutableList toTermList(ImmutableSet vars) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (ProgramVariable v : vars) { result = result.append(tb.var(v)); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSymbolicExecutionSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSymbolicExecutionSnippet.java index 91f2c2328cd..af13124c0eb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSymbolicExecutionSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSymbolicExecutionSnippet.java @@ -45,7 +45,7 @@ public Term produce(BasicSnippetData d, ProofObligationVars poVars) assert poVars.exceptionParameter.op() instanceof LocationVariable : "Something is wrong with the catch variable"; - ImmutableList posts = ImmutableSLList.nil(); + ImmutableList posts = ImmutableSLList.nil(); if (poVars.post.self != null) { posts = posts.append(d.tb.equals(poVars.post.self, poVars.pre.self)); } @@ -143,7 +143,7 @@ private JavaBlock buildJavaBlock(BasicSnippetData d, ImmutableList formalP final CopyAssignment assignStat = new CopyAssignment(exceptionVar, eVar); final Catch catchStat = new Catch(excDecl, new StatementBlock(assignStat)); final Try tryStat = new Try(sb, new Branch[] { catchStat }); - final StatementBlock sb2 = new StatementBlock(new Statement[] { nullStat, tryStat }); + final StatementBlock sb2 = new StatementBlock(nullStat, tryStat); // create java block JavaBlock result = JavaBlock.createJavaBlock(sb2); diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowContractAppInOutRelationSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowContractAppInOutRelationSnippet.java index 7c06a3543e5..5488edf06df 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowContractAppInOutRelationSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowContractAppInOutRelationSnippet.java @@ -24,7 +24,7 @@ protected Term buildObjectSensitivePostRelation(InfFlowSpec infFlowSpec1, InfFlowSpec infFlowSpec2, BasicSnippetData d, ProofObligationVars vs1, ProofObligationVars vs2, Term eqAtLocsTerm) { // build equalities for newObjects terms - ImmutableList newObjEqs = ImmutableSLList.nil(); + ImmutableList newObjEqs = ImmutableSLList.nil(); Iterator newObjects1It = infFlowSpec1.newObjects.iterator(); Iterator newObjects2It = infFlowSpec2.newObjects.iterator(); for (int i = 0; i < infFlowSpec1.newObjects.size(); i++) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java index 2f47e47e2b6..ee2734f756c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java @@ -93,7 +93,7 @@ private Term buildInputRelation(BasicSnippetData d, ProofObligationVars vs1, private Term buildOutputRelation(BasicSnippetData d, ProofObligationVars vs1, ProofObligationVars vs2, InfFlowSpec infFlowSpec1, InfFlowSpec infFlowSpec2) { // build equalities for post expressions - ImmutableList eqAtLocs = ImmutableSLList.nil(); + ImmutableList eqAtLocs = ImmutableSLList.nil(); Iterator postExp1It = infFlowSpec1.postExpressions.iterator(); Iterator postExp2It = infFlowSpec2.postExpressions.iterator(); @@ -119,7 +119,7 @@ protected Term buildObjectSensitivePostRelation(InfFlowSpec infFlowSpec1, InfFlowSpec infFlowSpec2, BasicSnippetData d, ProofObligationVars vs1, ProofObligationVars vs2, Term eqAtLocsTerm) { // build equalities for newObjects terms - ImmutableList newObjEqs = ImmutableSLList.nil(); + ImmutableList newObjEqs = ImmutableSLList.nil(); Iterator newObjects1It = infFlowSpec1.newObjects.iterator(); Iterator newObjects2It = infFlowSpec2.newObjects.iterator(); for (int i = 0; i < infFlowSpec1.newObjects.size(); i++) { @@ -133,7 +133,7 @@ protected Term buildObjectSensitivePostRelation(InfFlowSpec infFlowSpec1, final Term newObjsSeq1 = d.tb.seq(infFlowSpec1.newObjects); final Term newObjsSeq2 = d.tb.seq(infFlowSpec2.newObjects); final Function newObjectsIso = - (Function) d.services.getNamespaces().functions().lookup("newObjectsIsomorphic"); + d.services.getNamespaces().functions().lookup("newObjectsIsomorphic"); final Term isoTerm = d.tb.func(newObjectsIso, newObjsSeq1, vs1.pre.heap, newObjsSeq2, vs2.pre.heap); diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java index ded45824c00..af618cebbb1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java @@ -72,7 +72,7 @@ private Function generateContApplPredicate(String nameString, Sort[] argSorts, T while (functionNS.parent() != null) functionNS = functionNS.parent(); - Function pred = (Function) functionNS.lookup(name); + Function pred = functionNS.lookup(name); if (pred == null) { pred = new Function(name, Sort.FORMULA, argSorts); @@ -111,8 +111,8 @@ abstract String generatePredicateName(IProgramMethod pm, StatementBlock block, */ private ImmutableList extractTermListForPredicate(IProgramMethod pm, ProofObligationVars poVars, boolean hasMby) { - ImmutableList relevantPreVars = ImmutableSLList.nil(); - ImmutableList relevantPostVars = ImmutableSLList.nil(); + ImmutableList relevantPreVars = ImmutableSLList.nil(); + ImmutableList relevantPostVars = ImmutableSLList.nil(); if (!pm.isStatic()) { // self is relevant in the pre and post state for constructors diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/proof/init/StateVars.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/proof/init/StateVars.java index 61c3adff26b..53c3eb5db98 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/proof/init/StateVars.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/proof/init/StateVars.java @@ -62,7 +62,7 @@ public StateVars(Term self, Term guard, ImmutableList localVars, Term resu this.heap = heap; this.mbyAtPre = mbyAtPre; - ImmutableList terms = ImmutableSLList.nil(); + ImmutableList terms = ImmutableSLList.nil(); terms = appendIfNotNull(terms, heap); terms = appendIfNotNull(terms, self); terms = appendIfNotNull(terms, guard); @@ -72,7 +72,7 @@ public StateVars(Term self, Term guard, ImmutableList localVars, Term resu terms = appendIfNotNull(terms, mbyAtPre); termList = terms; - ImmutableList allTerms = ImmutableSLList.nil(); + ImmutableList allTerms = ImmutableSLList.nil(); allTerms = allTerms.append(heap); allTerms = allTerms.append(self); allTerms = allTerms.append(guard); @@ -144,7 +144,7 @@ public StateVars(StateVars orig, String postfix, Services services) { private static ImmutableList copyVariables(ImmutableList ts, String postfix, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Term t : ts) { result = result.append(copyVariable(t, postfix, services)); } @@ -281,7 +281,7 @@ public static StateVars buildInfFlowPostVars(StateVars origPreVars, StateVars or Term mbyAtPre = (origPreVars.mbyAtPre == origPostVars.mbyAtPre) ? preVars.mbyAtPre : copyVariable(origPostVars.mbyAtPre, postfix, services); - ImmutableList localPostVars = ImmutableSLList.nil(); + ImmutableList localPostVars = ImmutableSLList.nil(); Iterator origPreVarsIt = origPreVars.localVars.iterator(); Iterator localPreVarsIt = preVars.localVars.iterator(); for (Term origPostVar : origPostVars.localVars) { @@ -391,7 +391,7 @@ static void register(Function f, Services services) { static ImmutableList ops(ImmutableList terms, Class opClass) throws IllegalArgumentException { - ImmutableList ops = ImmutableSLList.nil(); + ImmutableList ops = ImmutableSLList.nil(); for (Term t : terms) { ops = ops.append(t.op(opClass)); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/executor/InfFlowContractAppTacletExecutor.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/executor/InfFlowContractAppTacletExecutor.java index 74fc9308b00..f55f4c8caa1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/executor/InfFlowContractAppTacletExecutor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/executor/InfFlowContractAppTacletExecutor.java @@ -58,7 +58,7 @@ protected void addToAntec(Semisequent semi, TermLabelState termLabelState, private void updateStrategyInfo(Goal goal, final Term applFormula) { ImmutableList applFormulas = goal.getStrategyInfo(INF_FLOW_CONTRACT_APPL_PROPERTY); if (applFormulas == null) { - applFormulas = ImmutableSLList.nil(); + applFormulas = ImmutableSLList.nil(); } applFormulas = applFormulas.append(applFormula); StrategyInfoUndoMethod undo = strategyInfos -> { diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowContractAppTacletBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowContractAppTacletBuilder.java index 5068883891a..82a90a7b561 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowContractAppTacletBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowContractAppTacletBuilder.java @@ -184,7 +184,7 @@ ProofObligationVars generateApplicationDataSVs(String schemaPrefix, ProofObligat Term selfAtPostSV = (appData.pre.self == appData.post.self ? selfAtPreSV : createTermSV(appData.post.self, schemaPrefix, services)); - ImmutableList localVarsAtPostSVs = ImmutableSLList.nil(); + ImmutableList localVarsAtPostSVs = ImmutableSLList.nil(); Iterator appDataPreLocalVarsIt = appData.pre.localVars.iterator(); Iterator schemaLocalVarsAtPreIt = localVarsAtPreSVs.iterator(); for (Term appDataPostLocalVar : appData.post.localVars) { @@ -259,7 +259,7 @@ private Taclet genInfFlowContractApplTaclet(Goal goal, ProofObligationVars appDa tacletBuilder.setApplicationRestriction(RewriteTaclet.ANTECEDENT_POLARITY); tacletBuilder.setIfSequent(assumesSeq); RewriteTacletGoalTemplate goalTemplate = new RewriteTacletGoalTemplate(replaceWithSeq, - ImmutableSLList.nil(), schemaFind); + ImmutableSLList.nil(), schemaFind); tacletBuilder.addTacletGoalTemplate(goalTemplate); tacletBuilder.addRuleSet(new RuleSet(new Name(IF_CONTRACT_APPLICATION))); tacletBuilder.setSurviveSmbExec(true); diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java index e4fcad8fedb..0aed0e64a87 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java @@ -51,7 +51,7 @@ public AbstractInfFlowTacletBuilder(final Services services) { ImmutableList createTermSV(ImmutableList ts, String schemaPrefix, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Term t : ts) { result = result.append(createTermSV(t, schemaPrefix, services)); } @@ -128,7 +128,7 @@ Map collectQuantifiableVariables(Term repl */ public Term eqAtLocs(Services services, Term heap1, Term locset1, Term heap2, Term locset2) { return (locset1.equals(empty()) && locset2.equals(empty())) ? tt() - : func((Function) services.getNamespaces().functions().lookup(EQUAL_LOCS), heap1, + : func(services.getNamespaces().functions().lookup(EQUAL_LOCS), heap1, locset1, heap2, locset2); } @@ -147,7 +147,7 @@ public Term eqAtLocs(Services services, Term heap1, Term locset1, Term heap2, Te public Term eqAtLocsPost(Services services, Term heap1Pre, Term heap1Post, Term locset1, Term heap2Pre, Term heap2Post, Term locset2) { return (locset1.equals(empty()) && locset2.equals(empty())) ? tt() - : func((Function) services.getNamespaces().functions().lookup(EQUAL_LOCS_POST), + : func(services.getNamespaces().functions().lookup(EQUAL_LOCS_POST), heap1Pre, heap1Post, locset1, heap2Pre, heap2Post, locset2); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowUnfoldTacletBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowUnfoldTacletBuilder.java index 2a45e9492a8..87e37461cc3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowUnfoldTacletBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowUnfoldTacletBuilder.java @@ -131,7 +131,7 @@ private ProofObligationVars generateApplicationDataSVs(String schemaPrefix, Term selfAtPostSV = (poVars.pre.self == poVars.post.self ? selfAtPreSV : createTermSV(poVars.post.self, schemaPrefix, services)); - ImmutableList localVarsAtPostSVs = ImmutableSLList.nil(); + ImmutableList localVarsAtPostSVs = ImmutableSLList.nil(); Iterator appDataPreLocalVarsIt = poVars.pre.localVars.iterator(); Iterator schemaLocalVarsAtPreIt = localVarsAtPreSVs.iterator(); for (Term appDataPostLocalVar : poVars.post.localVars) { @@ -240,7 +240,7 @@ private static StateVars filterSchemaVars(StateVars origVars, StateVars schemaVa if (origVars.localVars == null) { localVars = null; } else if (origVars.localVars.isEmpty()) { - localVars = ImmutableSLList.nil(); + localVars = ImmutableSLList.nil(); } if (origVars.result == null) { result = null; diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowBlockContractTacletBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowBlockContractTacletBuilder.java index 7fbbc7a2131..ed37ff28e73 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowBlockContractTacletBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowBlockContractTacletBuilder.java @@ -77,7 +77,7 @@ Term buildContractApplications(ProofObligationVars contAppData, ImmutableSet ifContracts = services.getSpecificationRepository().getBlockContracts(blockContract.getBlock()); ifContracts = filterContracts(ifContracts); - ImmutableList contractsApplications = ImmutableSLList.nil(); + ImmutableList contractsApplications = ImmutableSLList.nil(); for (BlockContract cont : ifContracts) { InfFlowPOSnippetFactory f = POSnippetFactory.getInfFlowFactory(cont, contAppData, contAppData2, executionContext, services); @@ -90,7 +90,7 @@ Term buildContractApplications(ProofObligationVars contAppData, ImmutableSet filterContracts(ImmutableSet ifContracts) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (BlockContract cont : ifContracts) { if ((cont.getBlock().getStartPosition().getLine() == blockContract.getBlock() .getStartPosition().getLine()) diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowMethodContractTacletBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowMethodContractTacletBuilder.java index 89d9ece8318..1cdb3ea2ef0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowMethodContractTacletBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/InfFlowMethodContractTacletBuilder.java @@ -73,7 +73,7 @@ Term buildContractApplications(ProofObligationVars contAppData, ProofObligationVars contAppData2, Services services) { ImmutableSet ifContracts = getInformFlowContracts(methodContract.getTarget(), services); - ImmutableList contractsApplications = ImmutableSLList.nil(); + ImmutableList contractsApplications = ImmutableSLList.nil(); for (InformationFlowContract cont : ifContracts) { InfFlowPOSnippetFactory f = POSnippetFactory.getInfFlowFactory(cont, contAppData, contAppData2, services); @@ -90,7 +90,7 @@ private ImmutableSet getInformFlowContracts(IProgramMet ImmutableSet contracts = services.getSpecificationRepository().getContracts(pm.getContainerType(), pm); ImmutableSet ifContracts = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); for (Contract c : contracts) { if (c instanceof InformationFlowContract) { ifContracts = ifContracts.add((InformationFlowContract) c); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java b/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java index a62e5669c6c..35b33ae8e39 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java @@ -118,12 +118,11 @@ public void visit(Visitor v) { /* toString */ public String toString() { - StringBuffer result = new StringBuffer(); - result.append(".."); - result.append(super.toString()); - result.append("\n"); - result.append("..."); - return result.toString(); + String result = ".." + + super.toString() + + "\n" + + "..."; + return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/CreateArrayMethodBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/java/CreateArrayMethodBuilder.java index 76dde502608..673c68697a9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/CreateArrayMethodBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/CreateArrayMethodBuilder.java @@ -119,7 +119,7 @@ protected List createArray(ImmutableList fields) { * of the given list */ protected ImmutableList filterField(ImmutableArray list) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (int i = list.size() - 1; i >= 0; i--) { MemberDeclaration pe = list.get(i); if (pe instanceof FieldDeclaration) { @@ -137,7 +137,7 @@ protected ImmutableList filterField(ImmutableArray lis * of the given list */ protected final ImmutableList filterField(FieldDeclaration field) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); ImmutableArray spec = field.getFieldSpecifications(); for (int i = spec.size() - 1; i >= 0; i--) { result = result.prepend(spec.get(i)); @@ -152,7 +152,7 @@ protected final ImmutableList filterField(FieldDeclaration field) { * @return a list with all implicit fields found in 'list' */ protected ImmutableList filterImplicitFields(ImmutableList list) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Field aList : list) { Field field = aList; if (field instanceof ImplicitFieldSpecification) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java b/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java index 9f966f1d77d..4182098f21e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java @@ -580,7 +580,7 @@ public IProgramMethod getProgramMethod(KeYJavaType classType, String methodName, */ public IProgramMethod getProgramMethod(KeYJavaType classType, String methodName, ProgramVariable[] args, KeYJavaType context) { - ImmutableList types = ImmutableSLList.nil(); + ImmutableList types = ImmutableSLList.nil(); for (int i = args.length - 1; i >= 0; i--) { types = types.prepend(args[i].getKeYJavaType()); } @@ -775,7 +775,7 @@ public KeYJavaType getSuperclass(KeYJavaType type) { * gets an array of expression and returns a list of types */ private ImmutableList getKeYJavaTypes(ImmutableArray args) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (args != null) { for (int i = args.size() - 1; i >= 0; i--) { final Expression argument = args.get(i); @@ -829,7 +829,7 @@ public ImmutableList getImplicitFields(ClassDeclaration cl) { */ private ImmutableList filterLocalDeclaredFields(TypeDeclaration classDecl, Filter filter) { - ImmutableList fields = ImmutableSLList.nil(); + ImmutableList fields = ImmutableSLList.nil(); final ImmutableArray members = classDecl.getMembers(); for (int i = members.size() - 1; i >= 0; i--) { final MemberDeclaration member = members.get(i); @@ -916,7 +916,7 @@ private final ProgramVariable find(String programName, ImmutableList fiel * of the given list */ private final ImmutableList getFields(FieldDeclaration field) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); final ImmutableArray spec = field.getFieldSpecifications(); for (int i = spec.size() - 1; i >= 0; i--) { result = result.prepend(spec.get(i)); @@ -933,7 +933,7 @@ private final ImmutableList getFields(FieldDeclaration field) { * of the given list */ private ImmutableList getFields(ImmutableArray list) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (int i = list.size() - 1; i >= 0; i--) { final MemberDeclaration pe = list.get(i); if (pe instanceof FieldDeclaration) { @@ -1077,7 +1077,7 @@ public ImmutableList getAllAttributes(String programName, KeYJa */ public ImmutableList getAllAttributes(String programName, KeYJavaType type, boolean traverseSubtypes) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (!(type.getSort().extendsTrans(objectSort()))) { return result; @@ -1099,7 +1099,7 @@ public ImmutableList getAllAttributes(String programName, KeYJa // the assert statements below are not for fun, some methods rely // on the correct order - ImmutableList hierarchy = ImmutableSLList.nil(); + ImmutableList hierarchy = ImmutableSLList.nil(); if (traverseSubtypes) { hierarchy = kpmi.getAllSubtypes(type); assert !hierarchy.contains(type); @@ -1173,7 +1173,7 @@ public KeYJavaType getJavaIoSerializable() { */ public Sort objectSort() { if (getJavaLangObject() == null) { - return (Sort) services.getNamespaces().sorts().lookup("java.lang.Object"); + return services.getNamespaces().sorts().lookup("java.lang.Object"); } else { return getJavaLangObject().getSort(); } @@ -1184,7 +1184,7 @@ public Sort objectSort() { */ public Sort cloneableSort() { if (getJavaLangCloneable() == null) { - return (Sort) services.getNamespaces().sorts().lookup("java.lang.Cloneable"); + return services.getNamespaces().sorts().lookup("java.lang.Cloneable"); } else { return getJavaLangCloneable().getSort(); } @@ -1195,7 +1195,7 @@ public Sort cloneableSort() { */ public Sort serializableSort() { if (getJavaIoSerializable() == null) { - return (Sort) services.getNamespaces().sorts().lookup("java.io.Serializable"); + return services.getNamespaces().sorts().lookup("java.io.Serializable"); } else { return getJavaIoSerializable().getSort(); } @@ -1246,7 +1246,7 @@ public ExecutionContext getDefaultExecutionContext() { } final KeYJavaType kjt = getTypeByClassName(DEFAULT_EXECUTION_CONTEXT_CLASS); defaultExecutionContext = new ExecutionContext(new TypeRef(kjt), getToplevelPM(kjt, - DEFAULT_EXECUTION_CONTEXT_METHOD, ImmutableSLList.nil()), null); + DEFAULT_EXECUTION_CONTEXT_METHOD, ImmutableSLList.nil()), null); } return defaultExecutionContext; } @@ -1270,7 +1270,7 @@ public ImmutableList getAllSubtypes(KeYJavaType type) { */ public ImmutableList getAllSupertypes(KeYJavaType type) { if (type.getJavaType() instanceof ArrayType) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); for (Sort s : getSuperSorts(type.getSort())) res = res.append(getKeYJavaType(s)); return res; @@ -1279,7 +1279,7 @@ public ImmutableList getAllSupertypes(KeYJavaType type) { } private ImmutableList getSuperSorts(Sort sort) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); final Sort object = getJavaLangObject().getSort(); if (sort != object) for (Sort exsort : sort.extendsSorts(services)) { @@ -1320,7 +1320,7 @@ public ImmutableList getCommonSubtypes(KeYJavaType k1, KeYJavaType return result; } - result = ImmutableSLList.nil(); + result = ImmutableSLList.nil(); if (k1.getSort().extendsTrans(k2.getSort())) { result = getAllSubtypes(k1).prepend(k1); @@ -1432,7 +1432,7 @@ public IObserverFunction getStaticInv(KeYJavaType target) { */ public boolean isCanonicalProgramMethod(IProgramMethod method, KeYJavaType context) throws NullPointerException { - String name = method.getName().toString(); + String name = method.getName(); ImmutableArray paramTypes = method.getParamTypes(); IProgramMethod canonicalMethod; canonicalMethod = getProgramMethod(context, name, paramTypes, context); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/JavaProgramElement.java b/key.core/src/main/java/de/uka/ilkd/key/java/JavaProgramElement.java index d3c72f1824b..2020c6269b4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/JavaProgramElement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/JavaProgramElement.java @@ -125,7 +125,7 @@ public boolean equals(Object o) { */ public String reuseSignature(Services services, ExecutionContext ec) { final String s = getClass().toString(); - return s.substring(s.lastIndexOf('.') + 1, s.length()); + return s.substring(s.lastIndexOf('.') + 1); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java index 4ea06f1fe50..9676ea8e403 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java @@ -423,7 +423,7 @@ private Literal getLiteralFor(recoder.service.ConstantEvaluator.EvaluationResult * of the given list */ private ImmutableList filterField(FieldDeclaration field) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); ImmutableArray spec = field.getFieldSpecifications(); for (int i = spec.size() - 1; i >= 0; i--) { result = result.prepend(spec.get(i)); @@ -569,7 +569,7 @@ private Constructor getKeYClassConstructor( result = constructorCache.get(recoderClass); if (result == null) { - result = getKeYClass(recoderClass).getConstructor(new Class[] { ExtList.class }); + result = getKeYClass(recoderClass).getConstructor(ExtList.class); constructorCache.put(recoderClass, result); } } catch (NoSuchMethodException nsme) { @@ -1481,7 +1481,7 @@ public MethodReference convert(recoder.java.reference.MethodReference mr) { return new MethodReference(children, pm == null ? new ProgramElementName(mr.getName()) : pm.getProgramElementName(), prefix, - positionInfo(mr), (String) null); + positionInfo(mr), null); } // --------------Special treatment because of ambiguities ---------- @@ -1712,7 +1712,7 @@ public New convert(recoder.java.expression.operator.New n) { } if (rp == null) { - return new New(arguments, maybeAnonClass, (ReferencePrefix) null); + return new New(arguments, maybeAnonClass, null); } else { return new New(arguments, maybeAnonClass, (ReferencePrefix) callConvert(rp)); } @@ -1966,7 +1966,7 @@ public ExecutionContext convert(de.uka.ilkd.key.java.recoderext.ExecutionContext if (arg.getMethodContext() != null) { JavaInfo jInfo = services.getJavaInfo(); - ImmutableList paramTypes = ImmutableSLList.nil(); + ImmutableList paramTypes = ImmutableSLList.nil(); for (recoder.java.reference.TypeReference tr : arg.getMethodContext().getParamTypes()) { TypeReference keyTR = convert(tr); paramTypes = paramTypes.append(keyTR.getKeYJavaType()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java index 1949d75c078..58e2066e90a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java @@ -181,9 +181,9 @@ public KeYJavaType getKeYJavaType(recoder.abstraction.Type t) { } addKeYJavaType(t, s); } else if (t instanceof recoder.abstraction.NullType) { - s = (Sort) namespaces.sorts().lookup(NullSort.NAME); + s = namespaces.sorts().lookup(NullSort.NAME); if (s == null) { - Sort objectSort = (Sort) namespaces.sorts().lookup(new Name("java.lang.Object")); + Sort objectSort = namespaces.sorts().lookup(new Name("java.lang.Object")); assert objectSort != null; s = new NullSort(objectSort); } @@ -192,7 +192,7 @@ public KeYJavaType getKeYJavaType(recoder.abstraction.Type t) { recoder.abstraction.ParameterizedType pt = (recoder.abstraction.ParameterizedType) t; return getKeYJavaType(pt.getGenericType()); } else if (t instanceof recoder.abstraction.ClassType) { - s = (Sort) namespaces.sorts().lookup(new Name(t.getFullName())); + s = namespaces.sorts().lookup(new Name(t.getFullName())); if (s == null) { recoder.abstraction.ClassType ct = (recoder.abstraction.ClassType) t; if (ct.isInterface()) { @@ -310,7 +310,7 @@ private void addKeYJavaType(recoder.abstraction.Type t, Sort s) { private ImmutableSet directSuperSorts(recoder.abstraction.ClassType classType) { List supers = classType.getSupertypes(); - ImmutableSet ss = DefaultImmutableSet.nil(); + ImmutableSet ss = DefaultImmutableSet.nil(); for (recoder.abstraction.ClassType aSuper : supers) { ss = ss.add(getKeYJavaType(aSuper).getSort()); } @@ -464,7 +464,7 @@ private void addImplicitArrayMembers(ExtList members, KeYJavaType parent, KeYJav * of the given list */ private ImmutableList filterField(FieldDeclaration field) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); ImmutableArray spec = field.getFieldSpecifications(); for (int i = spec.size() - 1; i >= 0; i--) { result = result.prepend(spec.get(i)); @@ -481,7 +481,7 @@ private ImmutableList filterField(FieldDeclaration field) { * of the given list */ private ImmutableList filterField(ExtList list) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Object aList : list) { Object pe = aList; if (pe instanceof FieldDeclaration) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java b/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java index 9bdd0d93a84..be21d9725c4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java @@ -363,7 +363,7 @@ public TypeReference convert(recoder.java.reference.TypeReference tr) { // there is no explicit PackageReference convert method // but the cast is safe. - PackageReference packref = result != null ? (PackageReference) convert(result) : null; + PackageReference packref = result != null ? convert(result) : null; return new SchemaTypeReference(new ProgramElementName(tr.getName()), tr.getDimensions(), packref); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java index a81cff9a60c..38c25371f81 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java @@ -217,7 +217,7 @@ public boolean isInterface() { * returns the local declared supertypes */ public ImmutableList getSupertypes() { - ImmutableList types = ImmutableSLList.nil(); + ImmutableList types = ImmutableSLList.nil(); if (implementing != null) { for (int i = implementing.getTypeReferenceCount() - 1; i >= 0; i--) { types = types.prepend(implementing.getTypeReferenceAt(i).getKeYJavaType()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java index f3d79df362e..09091737e45 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java @@ -184,7 +184,7 @@ public boolean isInterface() { * returns the local declared supertypes */ public ImmutableList getSupertypes() { - ImmutableList types = ImmutableSLList.nil(); + ImmutableList types = ImmutableSLList.nil(); if (extending != null) { for (int i = extending.getTypeReferenceCount() - 1; i >= 0; i--) { types = types.prepend(extending.getTypeReferenceAt(i).getKeYJavaType()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/SuperArrayDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/SuperArrayDeclaration.java index bb39194e877..0363c271524 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/SuperArrayDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/SuperArrayDeclaration.java @@ -41,7 +41,7 @@ public FieldDeclaration length() { * returns the local declared supertypes */ public ImmutableList getSupertypes() { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java index e413c305d06..ea5e9dcc86f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java @@ -140,7 +140,7 @@ public ReferencePrefix setReferencePrefix(ReferencePrefix r) { public KeYJavaType getKeYJavaType(Services javaServ, ExecutionContext ec) { throw new IllegalStateException("Metaclass references are not supported by KeY as" - + "\'java.lang.Class\' is not part of the Java Card standard"); + + "'java.lang.Class' is not part of the Java Card standard"); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java index 711e83ec321..4963bef3e37 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java @@ -262,7 +262,7 @@ public Expression getArgumentAt(int index) { * determines the arguments types and constructs a signature of the current method */ public ImmutableList getMethodSignature(Services services, ExecutionContext ec) { - ImmutableList signature = ImmutableSLList.nil(); + ImmutableList signature = ImmutableSLList.nil(); if (arguments != null) { final TypeConverter typeConverter = services.getTypeConverter(); for (int i = arguments.size() - 1; i >= 0; i--) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchemaTypeReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchemaTypeReference.java index dd5d3b9f45c..bdc49b7b63c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchemaTypeReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchemaTypeReference.java @@ -16,7 +16,7 @@ public class SchemaTypeReference extends TypeReferenceImp implements AbstractPro public SchemaTypeReference(ProgramElementName name, int dimension, ReferencePrefix prefix) { super(name, dimension, prefix); - final StringBuffer sb = new StringBuffer(""); + final StringBuffer sb = new StringBuffer(); // as no inner classes prefix must be package reference PackageReference rp = (PackageReference) prefix; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java index 8354e2e5b05..98e6cd45d7d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java @@ -15,7 +15,7 @@ public class JavaASTCollector extends JavaASTWalker { /** the type of nodes to be collected */ private Class type; /** the list of found elements */ - private ImmutableList resultList = ImmutableSLList.nil(); + private ImmutableList resultList = ImmutableSLList.nil(); /** * create the JavaASTWalker diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/ProgramSVCollector.java b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/ProgramSVCollector.java index df2567a2338..42533223127 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/ProgramSVCollector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/ProgramSVCollector.java @@ -13,7 +13,7 @@ */ public class ProgramSVCollector extends JavaASTWalker { - private ImmutableList result = ImmutableSLList.nil(); + private ImmutableList result = ImmutableSLList.nil(); /** the instantiations needed for unwind loop constructs */ private SVInstantiations instantiations = SVInstantiations.EMPTY_SVINSTANTIATIONS; diff --git a/key.core/src/main/java/de/uka/ilkd/key/ldt/CharListLDT.java b/key.core/src/main/java/de/uka/ilkd/key/ldt/CharListLDT.java index 47ea21835fe..5496476814a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/ldt/CharListLDT.java +++ b/key.core/src/main/java/de/uka/ilkd/key/ldt/CharListLDT.java @@ -53,7 +53,7 @@ public final class CharListLDT extends LDT { // ------------------------------------------------------------------------- public CharListLDT(TermServices services) { - super(NAME, (Sort) services.getNamespaces().sorts().lookup(SeqLDT.NAME), services); + super(NAME, services.getNamespaces().sorts().lookup(SeqLDT.NAME), services); clIndexOfChar = addFunction(services, "clIndexOfChar"); clIndexOfCl = addFunction(services, "clIndexOfCl"); clLastIndexOfChar = addFunction(services, "clLastIndexOfChar"); @@ -228,7 +228,7 @@ public boolean hasLiteralFunction(Function f) { @Override public Expression translateTerm(Term t, ExtList children, Services services) { - final StringBuffer result = new StringBuffer(""); + final StringBuffer result = new StringBuffer(); Term term = t; while (term.op().arity() != 0) { result.append(translateCharTerm(term.sub(0))); diff --git a/key.core/src/main/java/de/uka/ilkd/key/ldt/HeapLDT.java b/key.core/src/main/java/de/uka/ilkd/key/ldt/HeapLDT.java index fb27647e91f..f257db76da5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/ldt/HeapLDT.java +++ b/key.core/src/main/java/de/uka/ilkd/key/ldt/HeapLDT.java @@ -95,7 +95,7 @@ public HeapLDT(TermServices services) { final Namespace sorts = services.getNamespaces().sorts(); final Namespace progVars = services.getNamespaces().programVariables(); - fieldSort = (Sort) sorts.lookup(new Name("Field")); + fieldSort = sorts.lookup(new Name("Field")); select = addSortDependingFunction(services, SELECT_NAME.toString()); store = addFunction(services, "store"); create = addFunction(services, "create"); @@ -339,7 +339,7 @@ public Function getFieldSymbolForPV(LocationVariable fieldPV, Services services) assert fieldPV != services.getJavaInfo().getArrayLength(); final Name name = new Name(getFieldSymbolName(fieldPV)); - Function result = (Function) services.getNamespaces().functions().lookup(name); + Function result = services.getNamespaces().functions().lookup(name); if (result == null) { int index = name.toString().indexOf("::"); assert index > 0; diff --git a/key.core/src/main/java/de/uka/ilkd/key/ldt/LDT.java b/key.core/src/main/java/de/uka/ilkd/key/ldt/LDT.java index 261e2df0589..78fd6d45ea3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/ldt/LDT.java +++ b/key.core/src/main/java/de/uka/ilkd/key/ldt/LDT.java @@ -43,7 +43,7 @@ public abstract class LDT implements Named { // ------------------------------------------------------------------------- protected LDT(Name name, TermServices services) { - sort = (Sort) services.getNamespaces().sorts().lookup(name); + sort = services.getNamespaces().sorts().lookup(name); if (sort == null) throw new RuntimeException("LDT " + name + " not found.\n" + "It seems that there are definitions missing from the .key files."); @@ -81,7 +81,7 @@ protected final Function addFunction(Function f) { */ protected final Function addFunction(TermServices services, String funcName) { final Namespace funcNS = services.getNamespaces().functions(); - final Function f = (Function) funcNS.lookup(new Name(funcName)); + final Function f = funcNS.lookup(new Name(funcName)); if (f == null) throw new RuntimeException("LDT: Function " + funcName + " not found.\n" + "It seems that there are definitions missing from the .key files."); diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/BoundVarsVisitor.java b/key.core/src/main/java/de/uka/ilkd/key/logic/BoundVarsVisitor.java index eda395ca857..9df375394dd 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/BoundVarsVisitor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/BoundVarsVisitor.java @@ -12,7 +12,7 @@ public class BoundVarsVisitor extends DefaultVisitor { private ImmutableSet bdVars = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/ClashFreeSubst.java b/key.core/src/main/java/de/uka/ilkd/key/logic/ClashFreeSubst.java index f1ceee86f8a..629717f0d7d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/ClashFreeSubst.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/ClashFreeSubst.java @@ -238,7 +238,7 @@ public static class VariableCollectVisitor extends DefaultVisitor { /** creates the Variable collector */ public VariableCollectVisitor() { - vars = DefaultImmutableSet.nil(); + vars = DefaultImmutableSet.nil(); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/MethodStackInfo.java b/key.core/src/main/java/de/uka/ilkd/key/logic/MethodStackInfo.java index 3d16ce92272..0f8ccf52047 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/MethodStackInfo.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/MethodStackInfo.java @@ -25,7 +25,7 @@ public MethodStackInfo(ProgramElement element) { * returns the method call stack */ public ImmutableList getMethodStack() { - ImmutableList list = ImmutableSLList.nil(); + ImmutableList list = ImmutableSLList.nil(); if (element instanceof ProgramPrefix) { final ImmutableArray prefix = ((ProgramPrefix) element).getPrefixElements(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/ProgramElementName.java b/key.core/src/main/java/de/uka/ilkd/key/logic/ProgramElementName.java index 71ce08ff37b..a2d43131ba4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/ProgramElementName.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/ProgramElementName.java @@ -27,7 +27,7 @@ public class ProgramElementName extends Name */ public ProgramElementName(String name) { super(name); - this.qualifierString = "".intern(); + this.qualifierString = ""; this.shortName = name.intern(); this.creationInfo = null; comments = new Comment[0]; @@ -40,7 +40,7 @@ public ProgramElementName(String name) { */ public ProgramElementName(String name, Comment[] c) { super(name); - this.qualifierString = "".intern(); + this.qualifierString = ""; this.shortName = name.intern(); this.creationInfo = null; comments = c; @@ -48,7 +48,7 @@ public ProgramElementName(String name, Comment[] c) { public ProgramElementName(String name, NameCreationInfo creationInfo) { super(name); - this.qualifierString = "".intern(); + this.qualifierString = ""; this.shortName = name.intern(); this.creationInfo = creationInfo; comments = new Comment[0]; @@ -56,7 +56,7 @@ public ProgramElementName(String name, NameCreationInfo creationInfo) { public ProgramElementName(String name, NameCreationInfo creationInfo, Comment[] c) { super(name); - this.qualifierString = "".intern(); + this.qualifierString = ""; this.shortName = name.intern(); this.creationInfo = creationInfo; comments = c; diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/TermCreationException.java b/key.core/src/main/java/de/uka/ilkd/key/logic/TermCreationException.java index 9500a216efc..7cc6d747114 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/TermCreationException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/TermCreationException.java @@ -30,7 +30,7 @@ private static String getErrorMessage(Operator op, Term failed) { return "Building a term failed. Normally there is an arity mismatch " + "or one of the subterms' sorts " - + "is not compatible (e.g. like the \'2\' in \"true & 2\")\n" + + "is not compatible (e.g. like the '2' in \"true & 2\")\n" + "The top level operator was " + op + "(Sort: " + op.sort(subs) + ")" + (op instanceof SortedOperator ? "; its expected arg sorts were:\n" + argsToString((SortedOperator) op) diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/TermImpl.java b/key.core/src/main/java/de/uka/ilkd/key/logic/TermImpl.java index 72a110f61d1..ca3921b2518 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/TermImpl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/TermImpl.java @@ -117,7 +117,7 @@ public TermImpl(Operator op, ImmutableArray subs, private ImmutableSet determineFreeVars() { ImmutableSet localFreeVars = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); if (op instanceof QuantifiableVariable) { localFreeVars = localFreeVars.add((QuantifiableVariable) op); @@ -285,8 +285,8 @@ public final boolean equalsModRenaming(Term o) { if (o == this) { return true; } - return unifyHelp(this, o, ImmutableSLList.nil(), - ImmutableSLList.nil(), null); + return unifyHelp(this, o, ImmutableSLList.nil(), + ImmutableSLList.nil(), null); } // diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/label/OriginTermLabelFactory.java b/key.core/src/main/java/de/uka/ilkd/key/logic/label/OriginTermLabelFactory.java index f3d819d35f7..d20a35c5ba1 100755 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/label/OriginTermLabelFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/label/OriginTermLabelFactory.java @@ -181,8 +181,8 @@ private char matchChar(String actual, String line, String expected) throws TermL */ private void matchEnd(StringTokenizer tokenizer, String line) throws TermLabelException { if (tokenizer.hasMoreTokens()) { - throw new TermLabelException("Unexpected token \'" + tokenizer.nextToken() + "\', " - + "expected: \'\"\'" + "\nin line \"" + line + "\""); + throw new TermLabelException("Unexpected token '" + tokenizer.nextToken() + "', " + + "expected: '\"'" + "\nin line \"" + line + "\""); } } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelManager.java b/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelManager.java index 2350b476f4f..969d8ca293b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelManager.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelManager.java @@ -132,7 +132,7 @@ public class TermLabelManager { /** * All rule independent {@link TermLabelUpdate}s. */ - private ImmutableList allRulesUpdates = ImmutableSLList.nil(); + private ImmutableList allRulesUpdates = ImmutableSLList.nil(); /** * All rule specific {@link TermLabelRefactoring}s. @@ -144,12 +144,12 @@ public class TermLabelManager { * All rule independent {@link TermLabelRefactoring}s. */ private ImmutableList allRulesRefactorings = - ImmutableSLList.nil(); + ImmutableSLList.nil(); /** * The {@link Name}s of all supported {@link TermLabel}s. */ - private ImmutableList supportedTermLabelnames = ImmutableSLList.nil(); + private ImmutableList supportedTermLabelnames = ImmutableSLList.nil(); /** * {@link Map}s the {@link Name} of a {@link TermLabel} to its {@link TermLabelMerger}. diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelOperationsInterpreter.java b/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelOperationsInterpreter.java index e903e29d009..da8e169d0ca 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelOperationsInterpreter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelOperationsInterpreter.java @@ -67,7 +67,7 @@ public static ImmutableArray sub(ImmutableArray left, * @return a list which represents a redundancy free result of merging labels in t1 and t2 */ public static ImmutableList resolveRedundancy(Term t1, Term t2) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (!t2.hasLabels()) { return result.prepend(t1); } else if (!t1.hasLabels()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/op/ProgramMethod.java b/key.core/src/main/java/de/uka/ilkd/key/logic/op/ProgramMethod.java index 979e80a2d6c..864cd5437b7 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/op/ProgramMethod.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/op/ProgramMethod.java @@ -448,7 +448,7 @@ public MatchConditions match(SourceData source, MatchConditions matchCond) { @Override public ImmutableList collectParameters() { - ImmutableList paramVars = ImmutableSLList.nil(); + ImmutableList paramVars = ImmutableSLList.nil(); int numParams = getParameterDeclarationCount(); for (int i = numParams - 1; i >= 0; i--) { ParameterDeclaration pd = getParameterDeclarationAt(i); diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/GenericSort.java b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/GenericSort.java index 35e40443ba8..8aba47102ff 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/GenericSort.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/GenericSort.java @@ -50,8 +50,8 @@ public GenericSort(Name name, ImmutableSet ext, ImmutableSet oneOf) public GenericSort(Name name) { - super(name, DefaultImmutableSet.nil(), false); - this.oneOf = DefaultImmutableSet.nil(); + super(name, DefaultImmutableSet.nil(), false); + this.oneOf = DefaultImmutableSet.nil(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/NullSort.java b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/NullSort.java index a52fae93f7d..83e3569a4ea 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/NullSort.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/NullSort.java @@ -56,7 +56,7 @@ public ImmutableSet extendsSorts(Services services) { ImmutableSet result = extCache.get(); if (result == null || lastServices.get() != services) { - result = DefaultImmutableSet.nil(); + result = DefaultImmutableSet.nil(); for (Named n : services.getNamespaces().sorts().allElements()) { Sort s = (Sort) n; diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProgramSVSort.java b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProgramSVSort.java index b298ff7cc74..1da417b0aa8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProgramSVSort.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProgramSVSort.java @@ -275,7 +275,7 @@ public boolean canStandFor(ProgramElement pe, Services services) { // -------------------------------------------------------------------------- public ProgramSVSort(Name name) { - super(name, DefaultImmutableSet.nil(), false); + super(name, DefaultImmutableSet.nil(), false); NAME2SORT.put(name, this); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProxySort.java b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProxySort.java index aeff980c63a..b76ba80a837 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProxySort.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/ProxySort.java @@ -12,6 +12,6 @@ public ProxySort(Name name, ImmutableSet ext) { } public ProxySort(Name name) { - this(name, DefaultImmutableSet.nil()); + this(name, DefaultImmutableSet.nil()); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/SortImpl.java b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/SortImpl.java index 92cac1c5a96..f0536290897 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/logic/sort/SortImpl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/logic/sort/SortImpl.java @@ -24,7 +24,7 @@ public SortImpl(Name name, Sort ext) { public SortImpl(Name name) { - this(name, DefaultImmutableSet.nil()); + this(name, DefaultImmutableSet.nil()); } public boolean equals(Object o) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/AbstractProofMacro.java b/key.core/src/main/java/de/uka/ilkd/key/macros/AbstractProofMacro.java index 566c729ba2a..f536a576ed9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/AbstractProofMacro.java +++ b/key.core/src/main/java/de/uka/ilkd/key/macros/AbstractProofMacro.java @@ -26,7 +26,7 @@ public abstract class AbstractProofMacro implements ProofMacro { private static ImmutableList getGoals(Node node) { if (node == null) { // can happen during initialisation - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } else { return node.proof().getSubtreeEnabledGoals(node); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/HeapSimplificationMacro.java b/key.core/src/main/java/de/uka/ilkd/key/macros/HeapSimplificationMacro.java index 760b3a997b6..19ad5e90cd6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/HeapSimplificationMacro.java +++ b/key.core/src/main/java/de/uka/ilkd/key/macros/HeapSimplificationMacro.java @@ -34,76 +34,76 @@ public String getDescription() { } // note that rules in the 'concrete' rule set are usually not included here - private static final Set ADMITTED_RULES_SET = asSet(new String[] { "selectOfStore", - "selectOfCreate", "selectOfAnon", "selectOfMemset", - - "selectCreatedOfStore", "selectCreatedOfCreate", "selectCreatedOfAnon", - "selectCreatedOfMemset", - - "dismissNonSelectedField", "dismissNonSelectedFieldEQ", "replaceKnownSelect", - "dropEffectlessStores", "memsetEmpty", "selectCreatedOfAnonAsFormula", - - "wellFormedStoreObject", "wellFormedStoreArray", "wellFormedStorePrimitive", - "wellFormedStorePrimitiveArray", "wellFormedStoreLocSet", "wellFormedCreate", - "wellFormedAnon", "wellFormedMemsetArrayObject", "wellFormedMemsetArrayPrimitive", - "wellFormedMemsetObject", "wellFormedMemsetLocSet", "wellFormedMemsetPrimitive", - - - // EQ versions of the above - "selectOfStoreEQ", "selectOfCreateEQ", "selectOfAnonEQ", "selectOfMemsetEQ", - - "selectCreatedOfStoreEQ", "selectCreatedOfCreateEQ", "selectCreatedOfAnonEQ", - "selectCreatedOfMemsetEQ", - - "wellFormedStoreObjectEQ", "wellFormedStoreArrayEQ", "wellFormedStorePrimitiveEQ", - "wellFormedStorePrimitiveArrayEQ", "wellFormedStoreLocSetEQ", "wellFormedCreateEQ", - "wellFormedAnonEQ", "wellFormedMemsetArrayObjectEQ", "wellFormedMemsetArrayPrimitiveEQ", - "wellFormedMemsetObjectEQ", "wellFormedMemsetLocSetEQ", "wellFormedMemsetPrimitiveEQ", - - // locset rules - "elementOfEmpty", "elementOfAllLocs", "elementOfSingleton", "elementOfUnion", - "elementOfIntersect", "elementOfSetMinus", "elementOfAllFields", "elementOfAllObjects", - "elementOfArrayRange", "elementOfFreshLocs", "elementOfInfiniteUnion", - "elementOfInfiniteUnion2Vars", - - "allFieldsEq", "subsetSingletonLeft", "subsetSingletonLeftEQ", "subsetSingletonRight", - "subsetSingletonRightEQ", "subsetUnionLeft", "subsetUnionLeftEQ", - "subsetOfIntersectWithItSelfEQ1", "subsetOfIntersectWithItSelfEQ2", "allFieldsSubsetOf", - "disjointAllFields", "disjointAllObjects", "disjointInfiniteUnion", - "disjointInfiniteUnion_2", "intersectAllFieldsFreshLocs", "disjointWithSingleton1", - "disjointWithSingleton2", "sortsDisjointModuloNull", - - "createdInHeapWithSingleton", "createdInHeapWithAllFields", "createdInHeapWithArrayRange", - "createdInHeapWithSingletonEQ", "createdInHeapWithUnionEQ", - "createdInHeapWithSetMinusFreshLocsEQ", "createdInHeapWithAllFieldsEQ", - "createdInHeapWithArrayRangeEQ", "createdInHeapWithSelectEQ", "createdInHeapWithObserverEQ", - - "elementOfEmptyEQ", "elementOfAllLocsEQ", "elementOfSingletonEQ", "elementOfUnionEQ", - "elementOfIntersectEQ", "elementOfSetMinusEQ", "elementOfAllFieldsEQ", - "elementOfAllObjectsEQ", "elementOfArrayRangeEQ", "elementOfFreshLocsEQ", - "elementOfInfiniteUnion2VarsEQ", - - // rules listed under "other lemma" - "unionEqualsEmpty", "unionEqualsEmptyEQ", "intersectWithSingleton", "setMinusSingleton", - "unionIntersectItself", "unionIntersectItself_2", "unionIntersectItself_3", - "unionIntersectItself_4", "unionIntersectItself_5", "unionIntersectItself_6", - - // normalization rules are currently not included - - // semantics blasting rules - // "equalityToElementOfRight", - // "subsetToElementOfRight", - "disjointDefinition", // TODO: may have own rules in future - "definitionAllElementsOfArray", "definitionAllElementsOfArrayLocsets", - - // alpha rules - "impRight", "andLeft", "orRight", "close", "closeTrue", "closeFalse", "ifthenelse_negated", - // TODO: those must be more expensive - // "replace_known_left", - // "replace_known_right", - - // others - "castDel", "nonNull", "nonNullZero", "allRight", "exLeft", }); + private static final Set ADMITTED_RULES_SET = asSet("selectOfStore", + "selectOfCreate", "selectOfAnon", "selectOfMemset", + + "selectCreatedOfStore", "selectCreatedOfCreate", "selectCreatedOfAnon", + "selectCreatedOfMemset", + + "dismissNonSelectedField", "dismissNonSelectedFieldEQ", "replaceKnownSelect", + "dropEffectlessStores", "memsetEmpty", "selectCreatedOfAnonAsFormula", + + "wellFormedStoreObject", "wellFormedStoreArray", "wellFormedStorePrimitive", + "wellFormedStorePrimitiveArray", "wellFormedStoreLocSet", "wellFormedCreate", + "wellFormedAnon", "wellFormedMemsetArrayObject", "wellFormedMemsetArrayPrimitive", + "wellFormedMemsetObject", "wellFormedMemsetLocSet", "wellFormedMemsetPrimitive", + + + // EQ versions of the above + "selectOfStoreEQ", "selectOfCreateEQ", "selectOfAnonEQ", "selectOfMemsetEQ", + + "selectCreatedOfStoreEQ", "selectCreatedOfCreateEQ", "selectCreatedOfAnonEQ", + "selectCreatedOfMemsetEQ", + + "wellFormedStoreObjectEQ", "wellFormedStoreArrayEQ", "wellFormedStorePrimitiveEQ", + "wellFormedStorePrimitiveArrayEQ", "wellFormedStoreLocSetEQ", "wellFormedCreateEQ", + "wellFormedAnonEQ", "wellFormedMemsetArrayObjectEQ", "wellFormedMemsetArrayPrimitiveEQ", + "wellFormedMemsetObjectEQ", "wellFormedMemsetLocSetEQ", "wellFormedMemsetPrimitiveEQ", + + // locset rules + "elementOfEmpty", "elementOfAllLocs", "elementOfSingleton", "elementOfUnion", + "elementOfIntersect", "elementOfSetMinus", "elementOfAllFields", "elementOfAllObjects", + "elementOfArrayRange", "elementOfFreshLocs", "elementOfInfiniteUnion", + "elementOfInfiniteUnion2Vars", + + "allFieldsEq", "subsetSingletonLeft", "subsetSingletonLeftEQ", "subsetSingletonRight", + "subsetSingletonRightEQ", "subsetUnionLeft", "subsetUnionLeftEQ", + "subsetOfIntersectWithItSelfEQ1", "subsetOfIntersectWithItSelfEQ2", "allFieldsSubsetOf", + "disjointAllFields", "disjointAllObjects", "disjointInfiniteUnion", + "disjointInfiniteUnion_2", "intersectAllFieldsFreshLocs", "disjointWithSingleton1", + "disjointWithSingleton2", "sortsDisjointModuloNull", + + "createdInHeapWithSingleton", "createdInHeapWithAllFields", "createdInHeapWithArrayRange", + "createdInHeapWithSingletonEQ", "createdInHeapWithUnionEQ", + "createdInHeapWithSetMinusFreshLocsEQ", "createdInHeapWithAllFieldsEQ", + "createdInHeapWithArrayRangeEQ", "createdInHeapWithSelectEQ", "createdInHeapWithObserverEQ", + + "elementOfEmptyEQ", "elementOfAllLocsEQ", "elementOfSingletonEQ", "elementOfUnionEQ", + "elementOfIntersectEQ", "elementOfSetMinusEQ", "elementOfAllFieldsEQ", + "elementOfAllObjectsEQ", "elementOfArrayRangeEQ", "elementOfFreshLocsEQ", + "elementOfInfiniteUnion2VarsEQ", + + // rules listed under "other lemma" + "unionEqualsEmpty", "unionEqualsEmptyEQ", "intersectWithSingleton", "setMinusSingleton", + "unionIntersectItself", "unionIntersectItself_2", "unionIntersectItself_3", + "unionIntersectItself_4", "unionIntersectItself_5", "unionIntersectItself_6", + + // normalization rules are currently not included + + // semantics blasting rules + // "equalityToElementOfRight", + // "subsetToElementOfRight", + "disjointDefinition", // TODO: may have own rules in future + "definitionAllElementsOfArray", "definitionAllElementsOfArrayLocsets", + + // alpha rules + "impRight", "andLeft", "orRight", "close", "closeTrue", "closeFalse", "ifthenelse_negated", + // TODO: those must be more expensive + // "replace_known_left", + // "replace_known_right", + + // others + "castDel", "nonNull", "nonNullZero", "allRight", "exLeft"); @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/IntegerSimplificationMacro.java b/key.core/src/main/java/de/uka/ilkd/key/macros/IntegerSimplificationMacro.java index 3e0c6ee36ab..a1011097577 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/IntegerSimplificationMacro.java +++ b/key.core/src/main/java/de/uka/ilkd/key/macros/IntegerSimplificationMacro.java @@ -32,31 +32,31 @@ public String getDescription() { + "It applies only non-splitting simplification rules."; } - private static final Set ADMITTED_RULES_SET = asSet(new String[] { "add_eq_back", - "add_eq_back_2", "add_eq_back_2_fst_comm", "add_eq_back_3", "add_less_back", - "add_less_back_zero_1", "add_less_back_zero_1_comm", "add_less_back_zero_2", - "add_less_back_zero_2_comm", "add_literals", "add_sub_elim_left", "add_sub_elim_right", - "add_zero_left", "add_zero_right", "binaryAndOne", "binaryAndZeroLeft", - "binaryAndZeroRight", "binaryOrNeutralLeft", "binaryOrNeutralRight", - "bprod_lower_equals_upper", "bprod_one", "bprod_zero", "bsum_lower_equals_upper", - "bsum_zero", "castDel", "castDel2", "castDel3", - // "castedGetAny", - "div_literals", "double_unary_minus_literal", "equal_literals", "greater_literals", - "i_minus_i_is_zero", "inChar", "inByte", "inInt", "inLong", "inShort", "le1_add1_eq_le", - "leq_diff1_eq", "leq_diff_1", "leq_literals", "less_base", "less_literals", "lt_diff_1", - "lt_to_leq_1", "lt_to_leq_2", "minus_distribute_1", "minus_distribute_2", - "moduloByteIsInByte", "moduloCharIsInChar", "moduloIntIsInInt", "moduloLongIsInLong", - "moduloShortIsInShort", "mul_literals", "neg_literal", "polySimp_addAssoc", - "polySimp_addLiterals", "polySimp_elimOne", "polySimp_elimOneLeft0", "polySimp_mulAssoc", - "polySimp_mulLiterals", "pow_literals", "precOfInt", "precOfIntPair", "precOfPairInt", - "prod_empty", "prod_one", "qeq_literals", "square_nonneg", "sub", "sub_literals", - "sub_sub_elim", "sub_zero_1", "sub_zero_2", "sum_empty", "sum_zero", "times_minus_one_1", - "times_minus_one_2", "times_one_1", "times_one_2", "times_zero_1", "times_zero_2", - "translateJavaAddInt", "translateJavaAddLong", "translateJavaCastByte", - "translateJavaCastChar", "translateJavaCastInt", "translateJavaCastLong", - "translateJavaCastShort", "translateJavaDivInt", "translateJavaDivLong", "translateJavaMod", - "translateJavaMulInt", "translateJavaMulLong", "translateJavaSubInt", - "translateJavaSubLong", "translateJavaUnaryMinusInt", "translateJavaUnaryMinusLong" }); + private static final Set ADMITTED_RULES_SET = asSet("add_eq_back", + "add_eq_back_2", "add_eq_back_2_fst_comm", "add_eq_back_3", "add_less_back", + "add_less_back_zero_1", "add_less_back_zero_1_comm", "add_less_back_zero_2", + "add_less_back_zero_2_comm", "add_literals", "add_sub_elim_left", "add_sub_elim_right", + "add_zero_left", "add_zero_right", "binaryAndOne", "binaryAndZeroLeft", + "binaryAndZeroRight", "binaryOrNeutralLeft", "binaryOrNeutralRight", + "bprod_lower_equals_upper", "bprod_one", "bprod_zero", "bsum_lower_equals_upper", + "bsum_zero", "castDel", "castDel2", "castDel3", + // "castedGetAny", + "div_literals", "double_unary_minus_literal", "equal_literals", "greater_literals", + "i_minus_i_is_zero", "inChar", "inByte", "inInt", "inLong", "inShort", "le1_add1_eq_le", + "leq_diff1_eq", "leq_diff_1", "leq_literals", "less_base", "less_literals", "lt_diff_1", + "lt_to_leq_1", "lt_to_leq_2", "minus_distribute_1", "minus_distribute_2", + "moduloByteIsInByte", "moduloCharIsInChar", "moduloIntIsInInt", "moduloLongIsInLong", + "moduloShortIsInShort", "mul_literals", "neg_literal", "polySimp_addAssoc", + "polySimp_addLiterals", "polySimp_elimOne", "polySimp_elimOneLeft0", "polySimp_mulAssoc", + "polySimp_mulLiterals", "pow_literals", "precOfInt", "precOfIntPair", "precOfPairInt", + "prod_empty", "prod_one", "qeq_literals", "square_nonneg", "sub", "sub_literals", + "sub_sub_elim", "sub_zero_1", "sub_zero_2", "sum_empty", "sum_zero", "times_minus_one_1", + "times_minus_one_2", "times_one_1", "times_one_2", "times_zero_1", "times_zero_2", + "translateJavaAddInt", "translateJavaAddLong", "translateJavaCastByte", + "translateJavaCastChar", "translateJavaCastInt", "translateJavaCastLong", + "translateJavaCastShort", "translateJavaDivInt", "translateJavaDivLong", "translateJavaMod", + "translateJavaMulInt", "translateJavaMulLong", "translateJavaSubInt", + "translateJavaSubLong", "translateJavaUnaryMinusInt", "translateJavaUnaryMinusLong"); @Override protected Set getAdmittedRuleNames() { diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/ProofMacroFinishedInfo.java b/key.core/src/main/java/de/uka/ilkd/key/macros/ProofMacroFinishedInfo.java index 514b65364e5..36db1189608 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/ProofMacroFinishedInfo.java +++ b/key.core/src/main/java/de/uka/ilkd/key/macros/ProofMacroFinishedInfo.java @@ -120,13 +120,13 @@ public boolean isCancelled() { public ImmutableList getGoals() { final Object result = getResult(); if (result == null) { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } else { return (ImmutableList) result; } } public static ProofMacroFinishedInfo getDefaultInfo(ProofMacro macro, Proof proof) { - return new ProofMacroFinishedInfo(macro, ImmutableSLList.nil(), proof, false); + return new ProofMacroFinishedInfo(macro, ImmutableSLList.nil(), proof, false); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java index 19673020e42..4240fcdc940 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java @@ -111,7 +111,7 @@ private void makeTacletApp(Goal g, SequentFormula toHide, Taclet tac, boolean an Set svs = tac.collectSchemaVars(); assert svs.size() == 1; Iterator iter = svs.iterator(); - SchemaVariable sv = (SchemaVariable) iter.next(); + SchemaVariable sv = iter.next(); SVInstantiations inst = SVInstantiations.EMPTY_SVINSTANTIATIONS; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java index 99e96358f8c..fa8115aa823 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java @@ -185,7 +185,6 @@ private void executeRewriteTaclet(Parameters p, PosTacletApp pta, Goal goalold, failposInOccs.remove(pta.posInOccurrence()); succposInOccs.add(pta.posInOccurrence()); goalold.apply(pta); - return; } else { throw new IllegalArgumentException( "Unsuccessful application of rewrite taclet " + pta.taclet().displayName()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/DefaultBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/DefaultBuilder.java index f06b7e474b1..d1450db141d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/DefaultBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/DefaultBuilder.java @@ -122,7 +122,7 @@ public Sort visitArg_sorts_or_formula_helper(KeYParser.Arg_sorts_or_formula_help if (ctx.FORMULA() != null) return Sort.FORMULA; else - return (Sort) accept(ctx.sortId()); + return accept(ctx.sortId()); } /* diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/FunctionPredicateBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/FunctionPredicateBuilder.java index b83076e85c8..6bdb8bab212 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/FunctionPredicateBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/FunctionPredicateBuilder.java @@ -125,7 +125,7 @@ public Object visitFunc_decls(KeYParser.Func_declsContext ctx) { @Override public Object visitTransform_decl(KeYParser.Transform_declContext ctx) { - Sort retSort = (Sort) (ctx.FORMULA() != null ? Sort.FORMULA : accept(ctx.sortId())); + Sort retSort = ctx.FORMULA() != null ? Sort.FORMULA : accept(ctx.sortId()); String trans_name = accept(ctx.funcpred_name()); List argSorts = accept(ctx.arg_sorts_or_formula()); Transformer t = diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ProblemFinder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ProblemFinder.java index 89441ebd210..6e065b2d312 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ProblemFinder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ProblemFinder.java @@ -31,7 +31,7 @@ public Object visitFile(KeYParser.FileContext ctx) { @Override public KeYJavaType visitArrayopid(KeYParser.ArrayopidContext ctx) { - return (KeYJavaType) accept(ctx.keyjavatype()); + return accept(ctx.keyjavatype()); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/pp/CharListNotation.java b/key.core/src/main/java/de/uka/ilkd/key/pp/CharListNotation.java index fc29799c6be..3522a9f0afd 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/pp/CharListNotation.java +++ b/key.core/src/main/java/de/uka/ilkd/key/pp/CharListNotation.java @@ -52,7 +52,7 @@ private String translateCharTerm(Term t) { * quotation marks */ private String translateTerm(Term t) { - final StringBuilder result = new StringBuilder(""); + final StringBuilder result = new StringBuilder(); Term term = t; while (!term.op().name().toString().equals("clEmpty")) { if (!term.op().name().toString().equals("clCons")) diff --git a/key.core/src/main/java/de/uka/ilkd/key/pp/HideSequentPrintFilter.java b/key.core/src/main/java/de/uka/ilkd/key/pp/HideSequentPrintFilter.java index 9883443fe7c..1dffee2632c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/pp/HideSequentPrintFilter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/pp/HideSequentPrintFilter.java @@ -46,7 +46,7 @@ protected void filterSequent() { return; } - antec = ImmutableSLList.nil(); + antec = ImmutableSLList.nil(); it = originalSequent.antecedent().iterator(); while (it.hasNext()) { SequentFormula sf = it.next(); @@ -59,7 +59,7 @@ protected void filterSequent() { } } - succ = ImmutableSLList.nil(); + succ = ImmutableSLList.nil(); it = originalSequent.succedent().iterator(); while (it.hasNext()) { SequentFormula sf = it.next(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/pp/InitialPositionTable.java b/key.core/src/main/java/de/uka/ilkd/key/pp/InitialPositionTable.java index abaa82298b4..732404a2c10 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/pp/InitialPositionTable.java +++ b/key.core/src/main/java/de/uka/ilkd/key/pp/InitialPositionTable.java @@ -20,12 +20,12 @@ */ public class InitialPositionTable extends PositionTable { - private ImmutableList updateRanges = ImmutableSLList.nil(); + private ImmutableList updateRanges = ImmutableSLList.nil(); /** Ranges of keywords */ - private ImmutableList keywordRanges = ImmutableSLList.nil(); + private ImmutableList keywordRanges = ImmutableSLList.nil(); /** Ranges of java blocks */ - private ImmutableList javaBlockRanges = ImmutableSLList.nil(); + private ImmutableList javaBlockRanges = ImmutableSLList.nil(); /** * creates a new Initial PositionTable. @@ -85,7 +85,7 @@ private PosInSequent getTopPIS(ImmutableList posList, SequentPrintFilte * @return the path for the given pio */ public ImmutableList pathForPosition(PosInOccurrence pio, SequentPrintFilter filter) { - ImmutableList p = ImmutableSLList.nil(); + ImmutableList p = ImmutableSLList.nil(); p = prependPathInFormula(p, pio); int index = indexOfCfma(pio.sequentFormula(), filter); if (index == -1) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/pp/PositionTable.java b/key.core/src/main/java/de/uka/ilkd/key/pp/PositionTable.java index 26af8ad97d2..81bfbee0023 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/pp/PositionTable.java +++ b/key.core/src/main/java/de/uka/ilkd/key/pp/PositionTable.java @@ -86,7 +86,7 @@ private int searchEntry(int index) { protected ImmutableList pathForIndex(int index) { int sub = searchEntry(index); if (sub == -1) { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } else { return children[sub].pathForIndex(index - startPos[sub]).prepend(Integer.valueOf(sub)); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/pp/RegroupSequentPrintFilter.java b/key.core/src/main/java/de/uka/ilkd/key/pp/RegroupSequentPrintFilter.java index 2029d9bd81b..23370264d3f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/pp/RegroupSequentPrintFilter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/pp/RegroupSequentPrintFilter.java @@ -41,7 +41,7 @@ protected void filterSequent() { return; } - antec = ImmutableSLList.nil(); + antec = ImmutableSLList.nil(); it = originalSequent.antecedent().iterator(); while (it.hasNext()) { SequentFormula sf = it.next(); @@ -56,7 +56,7 @@ protected void filterSequent() { } } - succ = ImmutableSLList.nil(); + succ = ImmutableSLList.nil(); it = originalSequent.succedent().iterator(); while (it.hasNext()) { SequentFormula sf = it.next(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/pp/SequentPrintFilter.java b/key.core/src/main/java/de/uka/ilkd/key/pp/SequentPrintFilter.java index 3e46c140b03..cb80893f830 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/pp/SequentPrintFilter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/pp/SequentPrintFilter.java @@ -23,12 +23,12 @@ public abstract class SequentPrintFilter { /** * the antecedent of the filtered formula */ - ImmutableList antec = ImmutableSLList.nil(); + ImmutableList antec = ImmutableSLList.nil(); /** * the antecedent of the filtered formula */ - ImmutableList succ = ImmutableSLList.nil(); + ImmutableList succ = ImmutableSLList.nil(); /** * @return the original sequent @@ -79,13 +79,13 @@ public ImmutableList getFilteredSucc() { * entries. */ protected void filterIdentity() { - antec = ImmutableSLList.nil(); + antec = ImmutableSLList.nil(); Iterator it = originalSequent.antecedent().iterator(); while (it.hasNext()) { antec = antec.append(new IdentityFilterEntry(it.next())); } - succ = ImmutableSLList.nil(); + succ = ImmutableSLList.nil(); it = originalSequent.succedent().iterator(); while (it.hasNext()) { succ = succ.append(new IdentityFilterEntry(it.next())); diff --git a/key.core/src/main/java/de/uka/ilkd/key/pp/ShowSelectedSequentPrintFilter.java b/key.core/src/main/java/de/uka/ilkd/key/pp/ShowSelectedSequentPrintFilter.java index c3b6dfeaa9d..9858500b9d4 100755 --- a/key.core/src/main/java/de/uka/ilkd/key/pp/ShowSelectedSequentPrintFilter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/pp/ShowSelectedSequentPrintFilter.java @@ -35,7 +35,7 @@ public ImmutableList getFilteredAntec() { if (pos.isInAntec()) { return ImmutableSLList.nil().append(new Entry(pos)); } else { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } } @@ -44,7 +44,7 @@ public ImmutableList getFilteredSucc() { if (!pos.isInAntec()) { return ImmutableSLList.nil().append(new Entry(pos)); } else { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleAppIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleAppIndex.java index 879ffaf8456..de5a8ff93bd 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleAppIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleAppIndex.java @@ -34,7 +34,7 @@ public BuiltInRuleAppIndex(BuiltInRuleIndex index, NewRuleListener p_newRuleList */ public ImmutableList getBuiltInRule(Goal goal, PosInOccurrence pos) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); ImmutableList rules = index.rules(); while (!rules.isEmpty()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleIndex.java index 63980eb9089..27acc45740c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/BuiltInRuleIndex.java @@ -15,7 +15,7 @@ public class BuiltInRuleIndex implements java.io.Serializable { */ private static final long serialVersionUID = -4399004272449882750L; /** list of available built in rules */ - private ImmutableList rules = ImmutableSLList.nil(); + private ImmutableList rules = ImmutableSLList.nil(); /** constructs empty rule index */ public BuiltInRuleIndex() { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/FormulaTagManager.java b/key.core/src/main/java/de/uka/ilkd/key/proof/FormulaTagManager.java index 16b25f0360d..a8ee9d2badc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/FormulaTagManager.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/FormulaTagManager.java @@ -243,7 +243,7 @@ public String toString() { public final long age; public FormulaInfo(PosInOccurrence p_pio, long p_age) { - this(p_pio, ImmutableSLList.nil(), p_age); + this(p_pio, ImmutableSLList.nil(), p_age); } private FormulaInfo(PosInOccurrence p_pio, ImmutableList p_modifications, diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/Goal.java b/key.core/src/main/java/de/uka/ilkd/key/proof/Goal.java index 09f605f0f98..f7ed77298eb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/Goal.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/Goal.java @@ -54,7 +54,7 @@ public final class Goal { /** * list of all applied rule applications at this branch */ - private ImmutableList appliedRuleApps = ImmutableSLList.nil(); + private ImmutableList appliedRuleApps = ImmutableSLList.nil(); /** * this object manages the tags for all formulas of the sequent */ @@ -121,7 +121,7 @@ private Goal(Node node, RuleAppIndex ruleAppIndex, ImmutableList applie * @param namespaceSet */ public Goal(Node node, RuleAppIndex ruleAppIndex) { - this(node, ruleAppIndex, ImmutableSLList.nil(), null, + this(node, ruleAppIndex, ImmutableSLList.nil(), null, new QueueRuleApplicationManager(), new MapProperties(), node.proof().getServices().getNamespaces().copyWithParent().copyWithParent()); tagManager = new FormulaTagManager(this); @@ -537,7 +537,7 @@ public void removeLastAppliedRuleApp() { * @return the list of new created goals. */ public ImmutableList split(int n) { - ImmutableList goalList = ImmutableSLList.nil(); + ImmutableList goalList = ImmutableSLList.nil(); final Node parent = node; // has to be stored because the node // of this goal will be replaced diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/InstantiationProposerCollection.java b/key.core/src/main/java/de/uka/ilkd/key/proof/InstantiationProposerCollection.java index 7f35b25964b..9903b9d8773 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/InstantiationProposerCollection.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/InstantiationProposerCollection.java @@ -14,7 +14,7 @@ public class InstantiationProposerCollection implements InstantiationProposer { private ImmutableList proposers = - ImmutableSLList.nil(); + ImmutableSLList.nil(); /** * adds an instantiation proposer to the collection diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/MultiThreadedTacletIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/MultiThreadedTacletIndex.java index f49d4146756..45bd19b6089 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/MultiThreadedTacletIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/MultiThreadedTacletIndex.java @@ -71,7 +71,7 @@ public TacletIndex copy() { protected ImmutableList matchTaclets(ImmutableList tacletApps, RuleFilter p_filter, PosInOccurrence pos, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (tacletApps == null) { return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/NameRecorder.java b/key.core/src/main/java/de/uka/ilkd/key/proof/NameRecorder.java index dffac484a3f..c05f270b28c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/NameRecorder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/NameRecorder.java @@ -7,9 +7,9 @@ public class NameRecorder { - private ImmutableList pre = ImmutableSLList.nil(); + private ImmutableList pre = ImmutableSLList.nil(); - private ImmutableList post = ImmutableSLList.nil(); + private ImmutableList post = ImmutableSLList.nil(); public void setProposals(ImmutableList proposals) { pre = proposals; diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/Node.java b/key.core/src/main/java/de/uka/ilkd/key/proof/Node.java index 66f422500f0..996d806b844 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/Node.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/Node.java @@ -66,13 +66,13 @@ public class Node implements Iterable { * a linked list of the locally generated program variables. It extends the list of the parent * node. */ - private ImmutableList localProgVars = ImmutableSLList.nil(); + private ImmutableList localProgVars = ImmutableSLList.nil(); /** * a linked list of the locally generated function symbols. It extends the list of the parent * node. */ - private ImmutableList localFunctions = ImmutableSLList.nil(); + private ImmutableList localFunctions = ImmutableSLList.nil(); private boolean closed = false; @@ -114,7 +114,7 @@ public class Node implements Iterable { * taclet with an addrule section on this node, then these taclets are stored in this list */ private ImmutableSet localIntroducedRules = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); /** * Holds the undo methods for the information added by rules to the {@link Goal#strategyInfos}. diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/OpReplacer.java b/key.core/src/main/java/de/uka/ilkd/key/proof/OpReplacer.java index db8b3dfcdf4..75ffdf73e75 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/OpReplacer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/OpReplacer.java @@ -266,7 +266,7 @@ public Term replace(Term term) { * @return the list of transformed terms. */ public ImmutableList replace(ImmutableList terms) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (final Term term : terms) { result = result.append(replace(term)); } @@ -280,7 +280,7 @@ public ImmutableList replace(ImmutableList terms) { * @return the list of transformed terms. */ public ImmutableList replaceInfFlowSpec(ImmutableList terms) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (terms == null) { return result; } @@ -302,7 +302,7 @@ public ImmutableList replaceInfFlowSpec(ImmutableList * @return the set of transformed terms. */ public ImmutableSet replace(ImmutableSet terms) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (final Term term : terms) { result = result.add(replace(term)); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/ProgVarReplacer.java b/key.core/src/main/java/de/uka/ilkd/key/proof/ProgVarReplacer.java index e44251672ce..d617e9580bf 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/ProgVarReplacer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/ProgVarReplacer.java @@ -109,8 +109,8 @@ public ImmutableSet replace(ImmutableSet var public void replace(TacletIndex tacletIndex) { ImmutableList noPosTacletApps = tacletIndex.getPartialInstantiatedApps(); ImmutableSet appsToBeRemoved, appsToBeAdded; - appsToBeRemoved = DefaultImmutableSet.nil(); - appsToBeAdded = DefaultImmutableSet.nil(); + appsToBeRemoved = DefaultImmutableSet.nil(); + appsToBeAdded = DefaultImmutableSet.nil(); Iterator it = noPosTacletApps.iterator(); while (it.hasNext()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/ProofTreeEvent.java b/key.core/src/main/java/de/uka/ilkd/key/proof/ProofTreeEvent.java index 38c2ea571f2..064bf2bf988 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/ProofTreeEvent.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/ProofTreeEvent.java @@ -13,7 +13,7 @@ public class ProofTreeEvent { private Proof source; private Node node; private Goal goal; - private ImmutableList goals = ImmutableSLList.nil(); + private ImmutableList goals = ImmutableSLList.nil(); /** * Create ProofTreeEvent for an event that happens at the specified node. diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/RuleAppIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/RuleAppIndex.java index 3fac31de2f7..ca273b2464c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/RuleAppIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/RuleAppIndex.java @@ -161,7 +161,7 @@ public void removeNewRuleListener(NewRuleListener l) { */ public ImmutableList getTacletAppAt(TacletFilter filter, PosInOccurrence pos, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (!autoMode) { result = result.prepend(interactiveTacletAppIndex.getTacletAppAt(pos, filter, services)); @@ -183,7 +183,7 @@ public ImmutableList getTacletAppAt(TacletFilter filter, PosInOccurre */ public ImmutableList getTacletAppAtAndBelow(TacletFilter filter, PosInOccurrence pos, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (!autoMode) { result = result.prepend( interactiveTacletAppIndex.getTacletAppAtAndBelow(pos, filter, services)); @@ -205,7 +205,7 @@ public ImmutableList getTacletAppAtAndBelow(TacletFilter filter, PosI */ public ImmutableList getFindTaclet(TacletFilter filter, PosInOccurrence pos, TermServices services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (!autoMode) { result = result.prepend(interactiveTacletAppIndex.getFindTaclet(pos, filter, services)); } @@ -222,7 +222,7 @@ public ImmutableList getFindTaclet(TacletFilter filter, PosInOcc * @return list of all possible instantiations */ public ImmutableList getNoFindTaclet(TacletFilter filter, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (!autoMode) { result = interactiveTacletAppIndex.getNoFindTaclet(filter, services); } @@ -243,7 +243,7 @@ public ImmutableList getNoFindTaclet(TacletFilter filter, Servic */ public ImmutableList getRewriteTaclet(TacletFilter filter, PosInOccurrence pos, TermServices services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (!autoMode) { result = result.prepend(interactiveTacletAppIndex.getRewriteTaclet(pos, filter, services)); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/SemisequentTacletAppIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/SemisequentTacletAppIndex.java index 60395ec04c1..a17b87ba3b0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/SemisequentTacletAppIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/SemisequentTacletAppIndex.java @@ -24,7 +24,7 @@ */ public class SemisequentTacletAppIndex { private ImmutableMap termIndices = - DefaultImmutableMap.nilMap(); + DefaultImmutableMap.nilMap(); private TermTacletAppIndexCacheSet indexCaches; @@ -99,7 +99,7 @@ private void removeTermIndex(SequentFormula cfma) { private ImmutableList removeFormulas( ImmutableList infos) { - ImmutableList oldIndices = ImmutableSLList.nil(); + ImmutableList oldIndices = ImmutableSLList.nil(); for (FormulaChangeInfo info1 : infos) { final FormulaChangeInfo info = info1; diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/SingleThreadedTacletIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/SingleThreadedTacletIndex.java index f6304e9e4e5..373123f8f79 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/SingleThreadedTacletIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/SingleThreadedTacletIndex.java @@ -60,7 +60,7 @@ public TacletIndex copy() { @Override protected ImmutableList matchTaclets(ImmutableList tacletApps, RuleFilter p_filter, PosInOccurrence pos, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (tacletApps == null) { return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/TacletAppIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/TacletAppIndex.java index 5dbda0d7477..7325a7012eb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/TacletAppIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/TacletAppIndex.java @@ -213,7 +213,7 @@ public ImmutableList getTacletAppAt(PosInOccurrence pos, TacletFilter */ static ImmutableList createTacletApps(ImmutableList tacletInsts, PosInOccurrence pos, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (NoPosTacletApp tacletApp : tacletInsts) { if (tacletApp.taclet() instanceof FindTaclet) { PosTacletApp newTacletApp = tacletApp.setPosInOccurrence(pos, services); @@ -267,7 +267,7 @@ public ImmutableList getRewriteTaclet(PosInOccurrence pos, Tacle final Iterator it = getFindTaclet(pos, filter, services).iterator(); - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); while (it.hasNext()) { final NoPosTacletApp tacletApp = it.next(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/TacletIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/TacletIndex.java index f3a648f3eba..9a29ec4e7e6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/TacletIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/TacletIndex.java @@ -61,7 +61,7 @@ public abstract class TacletIndex { protected HashMap> succList = new LinkedHashMap<>(); /** contains NoFind-Taclets */ - protected ImmutableList noFindList = ImmutableSLList.nil(); + protected ImmutableList noFindList = ImmutableSLList.nil(); /** * keeps track of no pos taclet apps with partial instantiations @@ -80,7 +80,7 @@ public abstract class TacletIndex { rwList = new LinkedHashMap<>(); antecList = new LinkedHashMap<>(); succList = new LinkedHashMap<>(); - noFindList = ImmutableSLList.nil(); + noFindList = ImmutableSLList.nil(); addTaclets(toNoPosTacletApp(tacletSet)); } @@ -174,7 +174,7 @@ public void addTaclets(Iterable tacletAppList) { } public static ImmutableSet toNoPosTacletApp(Iterable rule) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Taclet t : rule) { result = result.prepend(NoPosTacletApp.createNoPosTacletApp(t)); } @@ -542,7 +542,7 @@ public NoPosTacletApp lookup(String name) { * @return list with all partial instantiated NoPosTacletApps */ public ImmutableList getPartialInstantiatedApps() { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); final Iterator it = partialInstantiatedRuleApps.iterator(); while (it.hasNext()) { result = result.prepend(it.next()); @@ -553,13 +553,12 @@ public ImmutableList getPartialInstantiatedApps() { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("TacletIndex with applicable rules: "); - sb.append("ANTEC\n " + antecList); - sb.append("\nSUCC\n " + succList); - sb.append("\nREWRITE\n " + rwList); - sb.append("\nNOFIND\n " + noFindList); - return sb.toString(); + String sb = "TacletIndex with applicable rules: " + + "ANTEC\n " + antecList + + "\nSUCC\n " + succList + + "\nREWRITE\n " + rwList + + "\nNOFIND\n " + noFindList; + return sb; } @@ -633,7 +632,7 @@ public int occurred(ProgramElement pe) { */ public ImmutableList getList( HashMap> map) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (int i = 0; i < PREFIXTYPES; i++) { if (occurred[i]) { ImmutableList inMap = map.get(prefixClasses[i]); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndex.java b/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndex.java index 1ae8a775de4..e6ef30cc3bc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndex.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndex.java @@ -73,7 +73,7 @@ private static ImmutableList getRewriteTaclet(PosInOccurrence po */ private static ImmutableList getFindTaclet(PosInOccurrence pos, RuleFilter filter, Services services, TacletIndex tacletIndex) { - ImmutableList tacletInsts = ImmutableSLList.nil(); + ImmutableList tacletInsts = ImmutableSLList.nil(); if (pos.isTopLevel()) { if (pos.isInAntec()) { tacletInsts = tacletInsts.prepend(antecTaclet(pos, filter, services, tacletIndex)); @@ -476,7 +476,7 @@ private ImmutableList convert(ImmutableList rules, private ImmutableList collectTacletApps(PosInOccurrence pos, RuleFilter p_filter, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); final ImmutableList>> allTacletsHereAndBelow = collectAllTacletAppsHereAndBelow(pos, ImmutableSLList.nil()); @@ -603,7 +603,7 @@ private static void fireRulesAdded(NewRuleListener listener, */ public static ImmutableList filter(RuleFilter p_filter, ImmutableList taclets) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (final NoPosTacletApp app : taclets) { if (p_filter.filter(app.taclet())) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndexCacheSet.java b/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndexCacheSet.java index a81d37dea28..de4da953af1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndexCacheSet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/TermTacletAppIndexCacheSet.java @@ -90,7 +90,7 @@ public void putIndexForTerm(Term t, TermTacletAppIndex index) {} * cache for locations that are below updates, but not below programs or in the scope of binders */ private final ITermTacletAppIndexCache belowUpdateCacheEmptyPrefix = - new BelowUpdateCache(ImmutableSLList.nil()); + new BelowUpdateCache(ImmutableSLList.nil()); /** * cache for locations that are below programs, but not in the scope of binders @@ -110,12 +110,12 @@ public void putIndexForTerm(Term t, TermTacletAppIndex index) {} public TermTacletAppIndexCacheSet(Map cache) { assert cache != null; this.cache = cache; - antecCache = new TopLevelCache(ImmutableSLList.nil(), cache); - succCache = new TopLevelCache(ImmutableSLList.nil(), cache); + antecCache = new TopLevelCache(ImmutableSLList.nil(), cache); + succCache = new TopLevelCache(ImmutableSLList.nil(), cache); topLevelCacheEmptyPrefix = - new TopLevelCache(ImmutableSLList.nil(), cache); + new TopLevelCache(ImmutableSLList.nil(), cache); belowProgCacheEmptyPrefix = - new BelowProgCache(ImmutableSLList.nil(), cache); + new BelowProgCache(ImmutableSLList.nil(), cache); } //////////////////////////////////////////////////////////////////////////// diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/delayedcut/DelayedCutProcessor.java b/key.core/src/main/java/de/uka/ilkd/key/proof/delayedcut/DelayedCutProcessor.java index 8725afff39d..02f3f1c0978 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/delayedcut/DelayedCutProcessor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/delayedcut/DelayedCutProcessor.java @@ -437,7 +437,7 @@ private int add(LinkedList pairs, LinkedList openLea * This function uncovers the decision predicate that is hidden after applying the cut rule. */ private void uncoverDecisionPredicate(DelayedCut cut, List openLeaves) { - ImmutableList list = ImmutableSLList.nil(); + ImmutableList list = ImmutableSLList.nil(); for (NodeGoalPair pair : openLeaves) { list = list.append(new NodeGoalPair(pair.node, pair.goal.apply(cut.getHideApp()).head())); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractOperationPO.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractOperationPO.java index 759342a6733..af6269bdba8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractOperationPO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractOperationPO.java @@ -810,7 +810,7 @@ protected Term buildProgramTerm(ImmutableList paramVars, // create java block final JavaBlock jb = buildJavaBlock(formalParamVars, selfVar, resultVar, exceptionVar, - atPreVars.keySet().contains(getSavedHeap(services)), sb); + atPreVars.containsKey(getSavedHeap(services)), sb); // create program term Term programTerm = tb.prog(getTerminationMarker(), jb, postTerm); @@ -978,7 +978,7 @@ protected boolean isCopyOfMethodArgumentsUsed() { private ImmutableList createFormalParamVars( final ImmutableList paramVars, final Services proofServices) { // create arguments from formal parameters for method call - ImmutableList formalParamVars = ImmutableSLList.nil(); + ImmutableList formalParamVars = ImmutableSLList.nil(); for (ProgramVariable paramVar : paramVars) { if (isCopyOfMethodArgumentsUsed()) { ProgramElementName pen = new ProgramElementName("_" + paramVar.name()); @@ -999,7 +999,7 @@ private ImmutableList createFormalParamVars( private ImmutableList collectLookupContracts( final IProgramMethod pm, final Services proofServices) { ImmutableList lookupContracts = - ImmutableSLList.nil(); + ImmutableSLList.nil(); ImmutableSet cs = proofServices.getSpecificationRepository() .getOperationContracts(getCalleeKeYJavaType(), pm); for (KeYJavaType superType : proofServices.getJavaInfo() diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractPO.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractPO.java index f0af230e8a8..ab8b3dbb8ad 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractPO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractPO.java @@ -94,8 +94,8 @@ void generateWdTaclets(InitConfig proofConfig) { if (!WellDefinednessCheck.isOn()) { return; } - ImmutableSet res = DefaultImmutableSet.nil(); - ImmutableSet names = DefaultImmutableSet.nil(); + ImmutableSet res = DefaultImmutableSet.nil(); + ImmutableSet names = DefaultImmutableSet.nil(); for (WellDefinednessCheck ch : specRepos.getAllWdChecks()) { if (ch instanceof MethodWellDefinedness) { MethodWellDefinedness mwd = (MethodWellDefinedness) ch; @@ -329,7 +329,7 @@ private void registerClassAxiomTaclets(KeYJavaType selfKJT, InitConfig proofConf ImmutableList> scc = allSCCs.get(node); for (Taclet axiomTaclet : axiom.getTaclets( DefaultImmutableSet.fromImmutableList( - scc == null ? ImmutableSLList.>nil() : scc), + scc == null ? ImmutableSLList.nil() : scc), proofConfig.getServices())) { assert axiomTaclet != null : "class axiom returned null taclet: " + axiom.getName(); // only include if choices are appropriate @@ -382,7 +382,7 @@ private void getSCCForNode(final Vertex node, ImmutableSet axioms, if (node.index == node.lowLink) { ImmutableList> scc = - ImmutableSLList.>nil(); + ImmutableSLList.nil(); Vertex sccMember; do { sccMember = stack.pop(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractProfile.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractProfile.java index cd8652516ce..e9c9c9c3ef0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractProfile.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/AbstractProfile.java @@ -42,7 +42,7 @@ public abstract class AbstractProfile implements Profile { private static ImmutableSet extractNames( ImmutableSet supportedGCB) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); final Iterator it = supportedGCB.iterator(); while (it.hasNext()) { @@ -87,7 +87,7 @@ public RuleCollection getStandardRules() { } protected ImmutableSet getStrategyFactories() { - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } protected ImmutableList initBuiltInRules() { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/DependencyContractPO.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/DependencyContractPO.java index 9d9ebee5fed..4d33f640cf8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/DependencyContractPO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/DependencyContractPO.java @@ -192,7 +192,7 @@ public void readProblem() throws ProofInputException { wellFormedHeaps = tb.and(wellFormedHeaps, wellFormedAnonHeap); } // prepare update - final boolean atPre = preHeapVars.values().contains(h); + final boolean atPre = preHeapVars.containsValue(h); final Term dep = getContract().getDep(atPre ? preHeapVarsReverse.get(h) : h, atPre, selfVar, paramVars, preHeapVars, proofServices); final Term changedHeap = tb.anon(tb.var(h), tb.setMinus(tb.allLocs(), dep), anonHeap); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java index eb0da28acf1..aeed4cf77fb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java @@ -65,7 +65,7 @@ public class InitConfig { * allow to use different ruleset modelling or skipping certain features (e.g. nullpointer * checks when resolving references) */ - private ImmutableSet activatedChoices = DefaultImmutableSet.nil(); + private ImmutableSet activatedChoices = DefaultImmutableSet.nil(); /** HashMap for quick lookups taclet name->taclet */ private Map activatedTacletCache = null; @@ -183,7 +183,7 @@ public void setActivatedChoices(ImmutableSet activatedChoices) { ImmutableList category2DefaultChoiceList = ImmutableSLList.nil(); for (final String s : c2DC.values()) { - final Choice c = (Choice) choiceNS().lookup(new Name(s)); + final Choice c = choiceNS().lookup(new Name(s)); if (c != null) { category2DefaultChoiceList = category2DefaultChoiceList.prepend(c); } @@ -277,7 +277,7 @@ private void fillActiveTacletCache() { */ public ImmutableList builtInRules() { Profile profile = getProfile(); - return (profile == null ? ImmutableSLList.nil() + return (profile == null ? ImmutableSLList.nil() : profile.getStandardRules().getStandardBuiltInRules()); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/ProofObligationVars.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/ProofObligationVars.java index 4dfcab5f543..e61b264bee8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/ProofObligationVars.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/ProofObligationVars.java @@ -133,7 +133,7 @@ private Term buildExceptionParameter(Services services) { */ private ImmutableList buildFormalParamVars(Services services) throws IllegalArgumentException { - ImmutableList formalParamVars = ImmutableSLList.nil(); + ImmutableList formalParamVars = ImmutableSLList.nil(); for (Term param : pre.localVars) { ProgramVariable paramVar = param.op(ProgramVariable.class); ProgramElementName pen = new ProgramElementName("_" + paramVar.name()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/WellDefinednessPO.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/WellDefinednessPO.java index 99967072e2b..0e620768d99 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/WellDefinednessPO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/WellDefinednessPO.java @@ -112,7 +112,7 @@ private static Map createAtPres(LocationVaria private static ImmutableList addGhostParams( ImmutableList paramVars, ImmutableList origParams) { // make sure ghost parameters are present - ImmutableList ghostParams = ImmutableSLList.nil(); + ImmutableList ghostParams = ImmutableSLList.nil(); for (ProgramVariable param : origParams) { if (param.isGhost()) ghostParams = ghostParams.append(param); @@ -171,7 +171,7 @@ private static Variables buildVariables(WellDefinednessCheck check, Services ser if (vars.params != null && !vars.params.isEmpty()) { params = createParams(target, vars.params, services); } else { - params = ImmutableSLList.nil(); + params = ImmutableSLList.nil(); } return new Variables(self, result, exception, atPres, params, heap, anonHeap, services); } @@ -192,7 +192,7 @@ private void register(Variables vars, Services proofServices) { @Override protected ImmutableSet selectClassAxioms(KeYJavaType kjt) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (ClassAxiom axiom : specRepos.getClassAxioms(kjt)) { if (axiom instanceof ClassAxiom && check instanceof ClassWellDefinedness) { final ClassAxiom classAxiom = axiom; diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java index 653c50e1a25..541b8b8c6c0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java @@ -514,8 +514,8 @@ protected EnvInput createEnvInput(FileRepo fileRepo) throws IOException { includes); } else { if (filename.lastIndexOf('.') != -1) { - throw new IllegalArgumentException("Unsupported file extension \'" - + filename.substring(filename.lastIndexOf('.')) + "\' of read-in file " + throw new IllegalArgumentException("Unsupported file extension '" + + filename.substring(filename.lastIndexOf('.')) + "' of read-in file " + filename + ". Allowed extensions are: .key, .proof, .java or " + "complete directories."); } else { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java index 1a219a5b934..070a1982c81 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java @@ -195,7 +195,7 @@ public void beginExpr(ProofElementID eid, String str) { BuiltinRuleInformation builtinInfo = (BuiltinRuleInformation) ruleInfo; if (builtinInfo.builtinIfInsts == null) { - builtinInfo.builtinIfInsts = ImmutableSLList.>nil(); + builtinInfo.builtinIfInsts = ImmutableSLList.nil(); } builtinInfo.currIfInstFormula = 0; builtinInfo.currIfInstPosInTerm = PosInTerm.getTopLevel(); @@ -203,7 +203,7 @@ public void beginExpr(ProofElementID eid, String str) { case NEW_NAMES: // newnames final String[] newNames = str.split(","); - ruleInfo.currNewNames = ImmutableSLList.nil(); + ruleInfo.currNewNames = ImmutableSLList.nil(); for (int in = 0; in < newNames.length; in++) { ruleInfo.currNewNames = ruleInfo.currNewNames.append(new Name(newNames[in])); } @@ -425,8 +425,8 @@ public boolean isBuiltinInfo() { private static class TacletInformation extends RuleInformation { /* + Taclet Information */ protected LinkedList loadedInsts = null; - protected ImmutableList ifSeqFormulaList = ImmutableSLList.nil(); - protected ImmutableList ifDirectFormulaList = ImmutableSLList.nil(); + protected ImmutableList ifSeqFormulaList = ImmutableSLList.nil(); + protected ImmutableList ifDirectFormulaList = ImmutableSLList.nil(); public TacletInformation(String ruleName) { super(ruleName); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediateProofReplayer.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediateProofReplayer.java index a9e1ac9188f..dd3ebe00f6f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediateProofReplayer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediateProofReplayer.java @@ -476,7 +476,7 @@ private TacletApp constructTacletApp(TacletAppIntermediate currInterm, Goal curr ourApp = constructInsts(ourApp, currGoal, currInterm.getInsts(), services); ImmutableList ifFormulaList = - ImmutableSLList.nil(); + ImmutableSLList.nil(); for (String ifFormulaStr : currInterm.getIfSeqFormulaList()) { ifFormulaList = ifFormulaList.append(new IfFormulaInstSeq(seq, Integer.parseInt(ifFormulaStr))); @@ -811,7 +811,7 @@ private void reportError(String string, Throwable e) { protected static ImmutableSet collectAppsForRule(String ruleName, Goal g, PosInOccurrence pos) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (final IBuiltInRuleApp app : g.ruleAppIndex().getBuiltInRules(g, pos)) { if (app.rule().name().toString().equals(ruleName)) { @@ -849,7 +849,7 @@ protected static TacletApp constructInsts(TacletApp app, Goal currGoal, LOGGER.error("{} from {} is not in uninsts", varname, app.rule().name()); continue; } - final String value = s.substring(eq + 1, s.length()); + final String value = s.substring(eq + 1); if (sv instanceof VariableSV) { app = parseSV1(app, sv, value, services); } @@ -865,7 +865,7 @@ protected static TacletApp constructInsts(TacletApp app, Goal currGoal, continue; } - String value = s.substring(eq + 1, s.length()); + String value = s.substring(eq + 1); app = parseSV2(app, sv, value, currGoal); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java index 3bb2d1f15b7..743fbdd687f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java @@ -309,7 +309,7 @@ public ImmutableSet readExtendedSignature() { readSorts(); readFuncAndPred(); - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } /** @@ -328,7 +328,7 @@ public ImmutableSet readContracts() { specRepos.addContracts(ImmutableSet.fromCollection(cinvs.getContracts())); specRepos.addClassInvariants(ImmutableSet.fromCollection(cinvs.getInvariants())); - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } @Nonnull diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/join/JoinProcessor.java b/key.core/src/main/java/de/uka/ilkd/key/proof/join/JoinProcessor.java index 0a1e45c29da..955987c6866 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/join/JoinProcessor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/join/JoinProcessor.java @@ -96,7 +96,7 @@ private void processJoin() { orRight(result); - ImmutableList list = ImmutableSLList.nil(); + ImmutableList list = ImmutableSLList.nil(); for (NodeGoalPair pair : cut.getGoalsAfterUncovering()) { if (pair.node == partner.getNode(0) || pair.node == partner.getNode(1)) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/mgt/ProofCorrectnessMgt.java b/key.core/src/main/java/de/uka/ilkd/key/proof/mgt/ProofCorrectnessMgt.java index c2b0174c696..56eee3610d5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/mgt/ProofCorrectnessMgt.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/mgt/ProofCorrectnessMgt.java @@ -101,7 +101,7 @@ public boolean isContractApplicable(Contract contract) { // look for cycles while (!newPaths.isEmpty()) { final Iterator> it = newPaths.iterator(); - newPaths = DefaultImmutableSet.>nil(); + newPaths = DefaultImmutableSet.nil(); while (it.hasNext()) { final ImmutableList path = it.next(); @@ -147,7 +147,7 @@ public boolean contractApplicableFor(KeYJavaType kjt, IObserverFunction target) ImmutableSet newProofs = proofs; while (newProofs.size() > 0) { final Iterator it = newProofs.iterator(); - newProofs = DefaultImmutableSet.nil(); + newProofs = DefaultImmutableSet.nil(); while (it.hasNext()) { final Proof p = it.next(); @@ -234,7 +234,7 @@ public void ruleUnApplied(RuleApp r) { public ImmutableSet getUsedContracts() { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (RuleApp ruleApp : cachedRuleApps) { RuleJustification ruleJusti = getJustification(ruleApp); if (ruleJusti instanceof RuleJustificationBySpec) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangeJournal.java b/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangeJournal.java index 50063c68f7b..7b437e3212b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangeJournal.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangeJournal.java @@ -34,7 +34,7 @@ public class NodeChangeJournal implements GoalListener { * applied to each of them */ private ImmutableMap changes = - DefaultImmutableMap.nilMap(); + DefaultImmutableMap.nilMap(); /** * @param p_goal the original goal/node @@ -51,7 +51,7 @@ public NodeChangeJournal(Proof p_proof, Goal p_goal) { * listeners */ public RuleAppInfo getRuleAppInfo(RuleApp p_ruleApp) { - ImmutableList nrs = ImmutableSLList.nil(); + ImmutableList nrs = ImmutableSLList.nil(); for (final ImmutableMapEntry entry : changes) { final Node newNode = entry.key(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangesHolder.java b/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangesHolder.java index d6d0d1f8cf1..5e09713a8d9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangesHolder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeChangesHolder.java @@ -10,7 +10,7 @@ public class NodeChangesHolder { public ImmutableList scis; NodeChangesHolder() { - this(ImmutableSLList.nil()); + this(ImmutableSLList.nil()); } NodeChangesHolder(ImmutableList p_scis) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeReplacement.java b/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeReplacement.java index e6e1ac61add..a5ca24e7064 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeReplacement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/proofevent/NodeReplacement.java @@ -154,7 +154,7 @@ private void addNodeChange(NodeChange p_nc) { private void removeNodeChanges(SequentFormula p_cf, boolean p_inAntec) { Iterator it = changes.iterator(); - changes = ImmutableSLList.nil(); + changes = ImmutableSLList.nil(); NodeChange oldNC; PosInOccurrence oldPio; @@ -162,7 +162,7 @@ private void removeNodeChanges(SequentFormula p_cf, boolean p_inAntec) { oldNC = it.next(); if (oldNC instanceof NodeChangeARFormula) { - oldPio = ((NodeChangeARFormula) oldNC).getPos(); + oldPio = oldNC.getPos(); if (oldPio.isInAntec() == p_inAntec && oldPio.sequentFormula().equals(p_cf)) continue; } @@ -180,7 +180,7 @@ public Node getNode() { */ public Iterator getNodeChanges() { if (changes == null) { - changes = ImmutableSLList.nil(); + changes = ImmutableSLList.nil(); addNodeChanges(); } return changes.iterator(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/prover/impl/ApplyStrategy.java b/key.core/src/main/java/de/uka/ilkd/key/prover/impl/ApplyStrategy.java index 2e0ab686483..bf4affe9331 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/prover/impl/ApplyStrategy.java +++ b/key.core/src/main/java/de/uka/ilkd/key/prover/impl/ApplyStrategy.java @@ -142,7 +142,7 @@ private synchronized ApplyStrategyInfo doWork(final GoalChooser goalChooser, return new ApplyStrategyInfo( stopCondition.getStopMessage(maxApplications, timeout, proof, time, countApplied, srInfo), - proof, null, (Goal) null, System.currentTimeMillis() - time, countApplied, + proof, null, null, System.currentTimeMillis() - time, countApplied, closedGoals); } } catch (InterruptedException e) { @@ -338,7 +338,7 @@ public void clear() { final GoalChooser goalChooser = getGoalChooserForProof(proof); proof = null; if (goalChooser != null) { - goalChooser.init(null, ImmutableSLList.nil()); + goalChooser.init(null, ImmutableSLList.nil()); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DefaultGoalChooser.java b/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DefaultGoalChooser.java index cf6baa92c25..dbe6a145b93 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DefaultGoalChooser.java +++ b/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DefaultGoalChooser.java @@ -68,9 +68,9 @@ public void init(Proof p_proof, ImmutableList p_goals) { } protected void setupGoals(ImmutableList p_goals) { - goalList = ImmutableSLList.nil(); - selectedList = ImmutableSLList.nil(); - nextGoals = ImmutableSLList.nil(); + goalList = ImmutableSLList.nil(); + selectedList = ImmutableSLList.nil(); + nextGoals = ImmutableSLList.nil(); if (allGoalsSatisfiable) { goalList = p_goals; @@ -145,7 +145,7 @@ public Goal getNextGoal() { */ public void removeGoal(Goal p_goal) { selectedList = selectedList.removeAll(p_goal); - nextGoals = ImmutableSLList.nil(); + nextGoals = ImmutableSLList.nil(); if (selectedList.isEmpty()) setupGoals(goalList); @@ -168,7 +168,7 @@ public void updateGoalList(Node node, ImmutableList newGoals) { if (proof.openGoals().isEmpty()) // proof has been closed - nextGoals = selectedList = goalList = ImmutableSLList.nil(); + nextGoals = selectedList = goalList = ImmutableSLList.nil(); else { if (selectedList.isEmpty() || (currentSubtreeRoot != null && !isSatisfiableSubtree(currentSubtreeRoot))) @@ -177,10 +177,10 @@ public void updateGoalList(Node node, ImmutableList newGoals) { } protected void updateGoalListHelp(Node node, ImmutableList newGoals) { - ImmutableList prevGoalList = ImmutableSLList.nil(); + ImmutableList prevGoalList = ImmutableSLList.nil(); boolean newGoalsInserted = false; - nextGoals = ImmutableSLList.nil(); + nextGoals = ImmutableSLList.nil(); // Remove "node" and goals contained within "newGoals" while (!selectedList.isEmpty()) { @@ -225,7 +225,7 @@ protected ImmutableList insertNewGoals(ImmutableList newGoals, protected static ImmutableList rotateList(ImmutableList p_list) { if (p_list.isEmpty()) - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); return p_list.tail().append(p_list.head()); } @@ -233,7 +233,7 @@ protected static ImmutableList rotateList(ImmutableList p_list) { protected void removeClosedGoals() { boolean changed = false; Iterator it = goalList.iterator(); - goalList = ImmutableSLList.nil(); + goalList = ImmutableSLList.nil(); while (it.hasNext()) { final Goal goal = it.next(); @@ -243,7 +243,7 @@ protected void removeClosedGoals() { } it = selectedList.iterator(); - ImmutableList newList = ImmutableSLList.nil(); + ImmutableList newList = ImmutableSLList.nil(); while (it.hasNext()) { final Goal goal = it.next(); @@ -258,11 +258,11 @@ protected void removeClosedGoals() { } if (changed) { - nextGoals = ImmutableSLList.nil(); + nextGoals = ImmutableSLList.nil(); // for "selectedList", order does matter it = newList.iterator(); - selectedList = ImmutableSLList.nil(); + selectedList = ImmutableSLList.nil(); while (it.hasNext()) selectedList = selectedList.prepend(it.next()); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DepthFirstGoalChooser.java b/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DepthFirstGoalChooser.java index 372cf16d29e..d6e46481ead 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DepthFirstGoalChooser.java +++ b/key.core/src/main/java/de/uka/ilkd/key/prover/impl/DepthFirstGoalChooser.java @@ -57,10 +57,10 @@ protected ImmutableList insertNewGoals(ImmutableList newGoals, } protected void updateGoalListHelp(Node node, ImmutableList newGoals) { - ImmutableList prevGoalList = ImmutableSLList.nil(); + ImmutableList prevGoalList = ImmutableSLList.nil(); boolean newGoalsInserted = false; - nextGoals = ImmutableSLList.nil(); + nextGoals = ImmutableSLList.nil(); // Remove "node" and goals contained within "newGoals" while (!selectedList.isEmpty()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractBuiltInRuleApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractBuiltInRuleApp.java index 3e50098896a..f5b3ed2e02d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractBuiltInRuleApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractBuiltInRuleApp.java @@ -61,7 +61,7 @@ public AbstractBlockContractBuiltInRuleApp tryToInstantiate(final Goal goal, final ImmutableSet contracts = AbstractBlockContractRule.getApplicableContracts(instantiation, goal, services); setStatement(instantiation.statement); - ImmutableSet cons = DefaultImmutableSet.nil(); + ImmutableSet cons = DefaultImmutableSet.nil(); for (BlockContract cont : contracts) { if (cont.getBlock().getStartPosition().getLine() == getStatement().getStartPosition() .getLine()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractRule.java b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractRule.java index 6c853c9121d..744ed366e3b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractRule.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBlockContractRule.java @@ -113,7 +113,7 @@ public static ImmutableSet getApplicableContracts( */ protected static ImmutableSet filterAppliedContracts( final ImmutableSet collectedContracts, final Goal goal) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (BlockContract contract : collectedContracts) { if (!contractApplied(contract, goal) || InfFlowCheckInfo.isInfFlow(goal)) { result = result.add(contract); @@ -210,7 +210,7 @@ protected static Term buildAfterVar(Term varTerm, String suffix, Services servic final TermBuilder tb = services.getTermBuilder(); KeYJavaType resultType = ((LocationVariable) varTerm.op()).getKeYJavaType(); if (!suffix.equalsIgnoreCase("")) { - suffix = new String("_" + suffix); + suffix = "_" + suffix; } String name = tb.newName(varTerm.toString() + "_After" + suffix); LocationVariable varAtPostVar = @@ -226,7 +226,7 @@ protected static ImmutableList buildLocalOutsAtPre(ImmutableList var return varTerms; } final TermBuilder tb = services.getTermBuilder(); - ImmutableList renamedLocalOuts = ImmutableSLList.nil(); + ImmutableList renamedLocalOuts = ImmutableSLList.nil(); for (Term varTerm : varTerms) { assert varTerm.op() instanceof LocationVariable; @@ -248,7 +248,7 @@ protected static ImmutableList buildLocalOutsAtPost(ImmutableList va return varTerms; } final TermBuilder tb = services.getTermBuilder(); - ImmutableList renamedLocalOuts = ImmutableSLList.nil(); + ImmutableList renamedLocalOuts = ImmutableSLList.nil(); for (Term varTerm : varTerms) { assert varTerm.op() instanceof LocationVariable; diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBuiltInRuleApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBuiltInRuleApp.java index e103776fe2f..4eaf6bf7029 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBuiltInRuleApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractBuiltInRuleApp.java @@ -22,7 +22,7 @@ protected AbstractBuiltInRuleApp(BuiltInRule rule, PosInOccurrence pio, ImmutableList ifInsts) { this.builtInRule = rule; this.pio = pio; - this.ifInsts = (ifInsts == null ? ImmutableSLList.nil() : ifInsts); + this.ifInsts = (ifInsts == null ? ImmutableSLList.nil() : ifInsts); } protected AbstractBuiltInRuleApp(BuiltInRule rule, PosInOccurrence pio) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractContractRuleApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractContractRuleApp.java index 40b9962fc3b..a913bef39b1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractContractRuleApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractContractRuleApp.java @@ -21,7 +21,7 @@ protected AbstractContractRuleApp(BuiltInRule rule, PosInOccurrence pio) { } protected AbstractContractRuleApp(BuiltInRule rule, PosInOccurrence pio, Contract contract) { - this(rule, pio, ImmutableSLList.nil(), contract); + this(rule, pio, ImmutableSLList.nil(), contract); } protected AbstractContractRuleApp(BuiltInRule rule, PosInOccurrence pio, diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractBuiltInRuleApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractBuiltInRuleApp.java index b4ecc01acff..29a50befea1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractBuiltInRuleApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractBuiltInRuleApp.java @@ -61,7 +61,7 @@ public AbstractLoopContractBuiltInRuleApp tryToInstantiate(final Goal goal, final ImmutableSet contracts = AbstractLoopContractRule.getApplicableContracts(instantiation, goal, services); setStatement(instantiation.statement); - ImmutableSet cons = DefaultImmutableSet.nil(); + ImmutableSet cons = DefaultImmutableSet.nil(); for (LoopContract cont : contracts) { if (cont.isOnBlock() && cont.getBlock().getStartPosition().getLine() == getStatement() .getStartPosition().getLine()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractRule.java b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractRule.java index 43c0cfc699f..2a8f41de723 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractRule.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopContractRule.java @@ -102,7 +102,7 @@ public static ImmutableSet getApplicableContracts( */ protected static ImmutableSet filterAppliedContracts( final ImmutableSet collectedContracts, final Goal goal) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (LoopContract contract : collectedContracts) { if (!contractApplied(contract, goal)) { result = result.add(contract); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopInvariantRule.java b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopInvariantRule.java index d19683c3c89..27ffd07ad74 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopInvariantRule.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/AbstractLoopInvariantRule.java @@ -493,7 +493,7 @@ protected static AdditionalHeapTerms createAdditionalHeapTerms(Services services heapContext.forEach( heap -> mods.put(heap, inst.inv.getModifies(heap, inst.selfTerm, atPres, services))); - ImmutableList anonUpdateData = ImmutableSLList.nil(); + ImmutableList anonUpdateData = ImmutableSLList.nil(); for (LocationVariable heap : heapContext) { // weigl: prevent NPE Term modifiesTerm = mods.get(heap); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/BoundUniquenessChecker.java b/key.core/src/main/java/de/uka/ilkd/key/rule/BoundUniquenessChecker.java index bd3740c4acb..6268728fa81 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/BoundUniquenessChecker.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/BoundUniquenessChecker.java @@ -22,7 +22,7 @@ public class BoundUniquenessChecker { private HashSet boundVars = new LinkedHashSet(); - private ImmutableList terms = ImmutableSLList.nil(); + private ImmutableList terms = ImmutableSLList.nil(); public BoundUniquenessChecker(Sequent seq) { addAll(seq); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/IfFormulaInstSeq.java b/key.core/src/main/java/de/uka/ilkd/key/rule/IfFormulaInstSeq.java index 999b36f9e6c..9d5e4926d73 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/IfFormulaInstSeq.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/IfFormulaInstSeq.java @@ -51,7 +51,7 @@ public SequentFormula getConstrainedFormula() { */ private static ImmutableList createListHelp(Sequent p_s, boolean antec) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); Iterator it; if (antec) { it = p_s.antecedent().iterator(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/LoopInvariantBuiltInRuleApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/LoopInvariantBuiltInRuleApp.java index 69ab7ddc402..97ec26dff10 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/LoopInvariantBuiltInRuleApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/LoopInvariantBuiltInRuleApp.java @@ -289,7 +289,7 @@ public LoopInvariantBuiltInRuleApp setIfInsts(ImmutableList ifI public LoopInvariantBuiltInRuleApp setLoopInvariant(LoopSpecification inv) { assert inv != null; - if (this.loop == (While) inv.getLoop()) + if (this.loop == inv.getLoop()) this.spec = inv; return new LoopInvariantBuiltInRuleApp(builtInRule, pio, ifInsts, inv, heapContext, services); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/NoFindTaclet.java b/key.core/src/main/java/de/uka/ilkd/key/rule/NoFindTaclet.java index 59e5fc83b4d..afc6d73f05d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/NoFindTaclet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/NoFindTaclet.java @@ -62,7 +62,7 @@ public ImmutableSet getIfFindVariables() { */ @Override protected ImmutableSet getBoundVariablesHelper() { - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/NoPosTacletApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/NoPosTacletApp.java index be1aa9be2be..c796ea3a19e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/NoPosTacletApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/NoPosTacletApp.java @@ -267,7 +267,7 @@ public boolean complete() { @Override protected ImmutableSet contextVars(SchemaVariable sv) { - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } @@ -311,7 +311,7 @@ public NoPosTacletApp matchFind(PosInOccurrence pos, Services services, Term t) MatchConditions res; if (taclet() instanceof FindTaclet) { - res = ((FindTaclet) taclet()).getMatcher().matchFind(t, mc, services); + res = taclet().getMatcher().matchFind(t, mc, services); // the following check will partly be repeated within the // constructor; this could be optimised if (res == null || !checkVarCondNotFreeIn(taclet(), res.getInstantiations(), pos)) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/OneStepSimplifier.java b/key.core/src/main/java/de/uka/ilkd/key/rule/OneStepSimplifier.java index b89073cf3d4..2b3817ca212 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/OneStepSimplifier.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/OneStepSimplifier.java @@ -111,7 +111,7 @@ public OneStepSimplifier() { // Visibility must be public because it is no longe private ImmutableList tacletsForRuleSet(Proof proof, String ruleSetName, ImmutableList excludedRuleSetNames) { assert !proof.openGoals().isEmpty(); - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); // collect apps present in all open goals Set allApps = @@ -180,11 +180,11 @@ private void initIndices(Proof proof) { if (proof != lastProof) { shutdownIndices(); lastProof = proof; - appsTakenOver = ImmutableSLList.nil(); + appsTakenOver = ImmutableSLList.nil(); indices = new TacletIndex[ruleSets.size()]; notSimplifiableCaches = (Map[]) new LRUCache[indices.length]; int i = 0; - ImmutableList done = ImmutableSLList.nil(); + ImmutableList done = ImmutableSLList.nil(); for (String ruleSet : ruleSets) { ImmutableList taclets = tacletsForRuleSet(proof, ruleSet, done); indices[i] = TacletIndexKit.getKit().createTacletIndex(taclets); @@ -474,7 +474,7 @@ private Instantiation computeInstantiation(Services services, PosInOccurrence os final List ifInsts = new ArrayList(seq.size()); // simplify as long as possible - ImmutableList list = ImmutableSLList.nil(); + ImmutableList list = ImmutableSLList.nil(); SequentFormula simplifiedCf = cf; while (true) { simplifiedCf = simplifyConstrainedFormula(services, simplifiedCf, ossPIO.isInAntec(), diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/PosTacletApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/PosTacletApp.java index cff26d710a4..7a3ec210d9a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/PosTacletApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/PosTacletApp.java @@ -106,7 +106,7 @@ private static ImmutableSet varsBoundAboveFindPos(Taclet t PosInOccurrence pos) { if (!(taclet instanceof RewriteTaclet)) { - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } return collectBoundVarsAbove(pos); @@ -122,7 +122,7 @@ private static Iterator allVariableSV(Taclet taclet) { @Override protected ImmutableSet contextVars(SchemaVariable sv) { if (!taclet().getPrefix(sv).context()) { - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } return varsBoundAboveFindPos(taclet(), posInOccurrence()); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/QueryExpand.java b/key.core/src/main/java/de/uka/ilkd/key/rule/QueryExpand.java index 8a7d5586333..d1e94a5a835 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/QueryExpand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/QueryExpand.java @@ -325,7 +325,6 @@ private void findQueriesAndEvaluationPositions(Term t, int level, Vector) pathInTerm.clone(), qepLevel + 1, instVars, qepIsPositive); qeps.add(qep); - return; } else if (op == Junctor.AND || op == Junctor.OR) { pathInTerm.set(nextLevel, 0); findQueriesAndEvaluationPositions(t.sub(0), nextLevel, pathInTerm, instVars, @@ -348,10 +347,8 @@ private void findQueriesAndEvaluationPositions(Term t, int level, Vector" is in both, positive and negative scope. Query expansion // below it would be unsound. // Alternatively "<->" could be converted into "->" and "<-" - return; } else if (t.javaBlock() != JavaBlock.EMPTY_JAVABLOCK) { // do not descend below java // blocks. - return; } else if (op == Quantifier.ALL) { if (curPosIsPositive) { // Quantifier that will be Skolemized // This is a potential query evaluation position. diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/SVNameCorrespondenceCollector.java b/key.core/src/main/java/de/uka/ilkd/key/rule/SVNameCorrespondenceCollector.java index d45376db2ec..deeb6ce9484 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/SVNameCorrespondenceCollector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/SVNameCorrespondenceCollector.java @@ -30,7 +30,7 @@ public class SVNameCorrespondenceCollector extends DefaultVisitor { * This map contains (a, b) if there is a substitution {b a} somewhere in the taclet */ private ImmutableMap nameCorrespondences = - DefaultImmutableMap.nilMap(); + DefaultImmutableMap.nilMap(); private final HeapLDT heapLDT; diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/Taclet.java b/key.core/src/main/java/de/uka/ilkd/key/rule/Taclet.java index 2606e8439d6..668fa519175 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/Taclet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/Taclet.java @@ -269,7 +269,7 @@ protected void createAndInitializeMatcher() { public ImmutableSet getBoundVariables() { if (boundVariables == null) { ImmutableSet result = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); for (final TacletGoalTemplate tgt : goalTemplates()) { result = result.union(tgt.getBoundVariables()); @@ -498,7 +498,7 @@ protected ImmutableSet getIfVariables() { TacletSchemaVariableCollector svc = new TacletSchemaVariableCollector(); svc.visit(ifSequent()); - ifVariables = DefaultImmutableSet.nil(); + ifVariables = DefaultImmutableSet.nil(); for (final SchemaVariable sv : svc.vars()) { ifVariables = ifVariables.add(sv); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/TacletApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/TacletApp.java index 5d7859b4eef..79fbd851313 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/TacletApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/TacletApp.java @@ -150,7 +150,7 @@ private static ImmutableSet collectPrefixInstantiations(Ta SVInstantiations instantiations) { ImmutableSet instanceSet = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); for (final SchemaVariable var : pre.prefix()) { instanceSet = @@ -403,7 +403,7 @@ public boolean isExecutable(TermServices services) { protected ImmutableSet calculateNonInstantiatedSV() { if (missingVars == null) { ImmutableSet localMissingVars = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); TacletSchemaVariableCollector coll = new TacletSchemaVariableCollector(instantiations()); coll.visitWithoutAddrule(taclet()); @@ -488,7 +488,7 @@ public final TacletApp tryToInstantiateAsMuchAsPossible(Services services) { final TermBuilder tb = services.getTermBuilder(); TacletApp app = this; - ImmutableList proposals = ImmutableSLList.nil(); + ImmutableList proposals = ImmutableSLList.nil(); for (final SchemaVariable sv : uninstantiatedVars()) { if (sv.arity() != 0) { @@ -590,7 +590,7 @@ public final TacletApp tryToInstantiate(Services services) { final TermBuilder tb = services.getTermBuilder(); TacletApp app = this; - ImmutableList proposals = ImmutableSLList.nil(); + ImmutableList proposals = ImmutableSLList.nil(); for (final SchemaVariable sv : uninstantiatedVars()) { if (sv.arity() != 0) { @@ -895,7 +895,7 @@ public TacletApp setIfFormulaInstantiations(ImmutableListnil(); + p_list = ImmutableSLList.nil(); } assert ifInstsCorrectSize(p_list) && ifInstantiations == null : "If instantiations list has wrong size " @@ -929,7 +929,7 @@ public ImmutableList findIfFormulaInstantiations(Sequent seq, Service createSemisequentList(taclet().ifSequent().antecedent()), IfFormulaInstSeq.createList(seq, false, services), IfFormulaInstSeq.createList(seq, true, services), - ImmutableSLList.nil(), matchConditions(), services); + ImmutableSLList.nil(), matchConditions(), services); } /** @@ -960,7 +960,7 @@ private ImmutableList findIfFormulaInstantiationsHelp( TacletApp res = setAllInstantiations(matchCond, instAlreadyMatched, services); if (res != null) return ImmutableSLList.nil().prepend(res); - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } else { // Change from succedent to antecedent ruleSuccTail = ruleAntecTail; @@ -975,7 +975,7 @@ private ImmutableList findIfFormulaInstantiationsHelp( // For each matching formula call the method again to match // the remaining terms - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); Iterator itCand = mr.getFormulas().iterator(); Iterator itMC = mr.getMatchConditions().iterator(); ruleSuccTail = ruleSuccTail.tail(); @@ -988,7 +988,7 @@ private ImmutableList findIfFormulaInstantiationsHelp( } private ImmutableList createSemisequentList(Semisequent p_ss) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); for (Object p_s : p_ss) res = res.prepend((SequentFormula) p_s); @@ -1271,7 +1271,7 @@ public static boolean checkVarCondNotFreeIn(Taclet taclet, SVInstantiations inst * @return a set of logic variables that are bound above the specified subterm */ protected static ImmutableSet collectBoundVarsAbove(PosInOccurrence pos) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); PIOPathIterator it = pos.iterator(); int i; diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/TacletSchemaVariableCollector.java b/key.core/src/main/java/de/uka/ilkd/key/rule/TacletSchemaVariableCollector.java index b5b0c3e41a9..9390e1802b9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/TacletSchemaVariableCollector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/TacletSchemaVariableCollector.java @@ -45,7 +45,7 @@ public class TacletSchemaVariableCollector extends DefaultVisitor { public TacletSchemaVariableCollector() { - varList = ImmutableSLList.nil(); + varList = ImmutableSLList.nil(); } @@ -54,7 +54,7 @@ public TacletSchemaVariableCollector() { * constructs to determine which labels are needed) */ public TacletSchemaVariableCollector(SVInstantiations svInsts) { - varList = ImmutableSLList.nil(); + varList = ImmutableSLList.nil(); instantiations = svInsts; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractApp.java b/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractApp.java index 01749e51c85..4def14497c3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractApp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractApp.java @@ -30,7 +30,7 @@ public UseDependencyContractApp(BuiltInRule builtInRule, PosInOccurrence pio) { public UseDependencyContractApp(BuiltInRule builtInRule, PosInOccurrence pio, Contract instantiation, PosInOccurrence step) { - this(builtInRule, pio, ImmutableSLList.nil(), instantiation, step); + this(builtInRule, pio, ImmutableSLList.nil(), instantiation, step); } public UseDependencyContractApp(BuiltInRule rule, PosInOccurrence pio, diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractRule.java b/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractRule.java index d9608c63d73..d5a7e8b8e34 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractRule.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/UseDependencyContractRule.java @@ -159,7 +159,7 @@ private static Pair> getChangedLocsForStep( final TermBuilder TB = services.getTermBuilder(); if (heapTerm.equals(stepHeap)) { return new Pair>(TB.empty(), - ImmutableSLList.nil()); + ImmutableSLList.nil()); } else if (op == heapLDT.getStore()) { final Term h = heapTerm.sub(0); final Term o = heapTerm.sub(1); @@ -383,7 +383,7 @@ public ImmutableList apply(Goal goal, Services services, RuleApp ruleApp) selfTerm = focus.sub(target.getHeapCount(services) * target.getStateCount()); } - ImmutableList paramTerms = ImmutableSLList.nil(); + ImmutableList paramTerms = ImmutableSLList.nil(); for (int i = target.getHeapCount(services) * target.getStateCount() + (target.isStatic() ? 0 : 1); i < focus.arity(); i++) { paramTerms = paramTerms.append(focus.sub(i)); @@ -426,7 +426,7 @@ public ImmutableList apply(Goal goal, Services services, RuleApp ruleApp) final Term[] subs = focus.subs().toArray(new Term[focus.arity()]); int heapExprIndex = 0; boolean useful = false; - ImmutableList ifInsts = ImmutableSLList.nil(); + ImmutableList ifInsts = ImmutableSLList.nil(); int hc = 0; for (LocationVariable heap : heaps) { if (hc >= obsHeapCount) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/UseOperationContractRule.java b/key.core/src/main/java/de/uka/ilkd/key/rule/UseOperationContractRule.java index 6e3220e3477..0f5fe411f14 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/UseOperationContractRule.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/UseOperationContractRule.java @@ -183,7 +183,7 @@ private static IProgramMethod getProgramMethod(MethodOrConstructorReference mr, } } else { New n = (New) mr; - ImmutableList sig = ImmutableSLList.nil(); + ImmutableList sig = ImmutableSLList.nil(); for (Expression e : n.getArguments()) { sig = sig.append(e.getKeYJavaType(services, ec)); } @@ -213,7 +213,7 @@ private static Term getActualSelf(MethodOrConstructorReference mr, IProgramMetho private static ImmutableList getActualParams(MethodOrConstructorReference mr, ExecutionContext ec, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Expression expr : mr.getArguments()) { Term actualParam = services.getTypeConverter().convertToLogicElement(expr, ec); result = result.append(actualParam); @@ -231,7 +231,7 @@ private static ImmutableList getActualParams(MethodOrConstructorReference public static ImmutableSet getApplicableContracts( Instantiation inst, Services services) { if (inst == null) { - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } // there must be applicable contracts for the operation @@ -653,7 +653,7 @@ public ImmutableList apply(Goal goal, Services services, RuleApp ruleApp) Term wellFormedAnon = null; Term atPreUpdates = null; Term reachableState = null; - ImmutableList anonUpdateDatas = ImmutableSLList.nil(); + ImmutableList anonUpdateDatas = ImmutableSLList.nil(); for (LocationVariable heap : heapContext) { final AnonUpdateData tAnon; @@ -730,7 +730,7 @@ public ImmutableList apply(Goal goal, Services services, RuleApp ruleApp) mbyOk = tb.tt(); } finalPreTerm = tb.applySequential(new Term[] { inst.u, atPreUpdates }, - tb.and(new Term[] { pre, reachableState, mbyOk })); + tb.and(pre, reachableState, mbyOk)); } else { // termination has already been shown in the functional proof, // thus we do not need to show it again in information flow proofs. diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/WhileInvariantRule.java b/key.core/src/main/java/de/uka/ilkd/key/rule/WhileInvariantRule.java index dfa184972c9..ee99c717496 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/WhileInvariantRule.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/WhileInvariantRule.java @@ -287,7 +287,7 @@ private static Term buildAtPostVar(Term varTerm, String suffix, Services service final TermBuilder tb = services.getTermBuilder(); final KeYJavaType resultType = ((LocationVariable) varTerm.op()).getKeYJavaType(); if (!suffix.equalsIgnoreCase("")) { - suffix = new String("_" + suffix); + suffix = "_" + suffix; } final String name = tb.newName(varTerm.toString() + "_After" + suffix); final LocationVariable varAtPostVar = @@ -335,7 +335,7 @@ private static ImmutableList buildLocalOutsAtPre(ImmutableList varTe return varTerms; } final TermBuilder tb = services.getTermBuilder(); - ImmutableList localOuts = ImmutableSLList.nil(); + ImmutableList localOuts = ImmutableSLList.nil(); for (final Term varTerm : varTerms) { assert varTerm.op() instanceof LocationVariable; @@ -357,7 +357,7 @@ private static ImmutableList buildLocalOutsAtPost(ImmutableList varT return varTerms; } final TermBuilder tb = services.getTermBuilder(); - ImmutableList localOuts = ImmutableSLList.nil(); + ImmutableList localOuts = ImmutableSLList.nil(); for (final Term varTerm : varTerms) { assert varTerm.op() instanceof LocationVariable; @@ -802,7 +802,7 @@ public ImmutableList apply(Goal goal, Services services, final RuleApp rul Term frameCondition = null; Term reachableState = null; Term anonHeap = null; - ImmutableList anonUpdateDatas = ImmutableSLList.nil(); + ImmutableList anonUpdateDatas = ImmutableSLList.nil(); for (LocationVariable heap : heapContext) { final AnonUpdateData tAnon = createAnonUpdate(heap, mods.get(heap), inst.inv, services); anonUpdateDatas = anonUpdateDatas.append(tAnon); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/DropEffectlessStoresCondition.java b/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/DropEffectlessStoresCondition.java index d3531cab007..ec9088f0f99 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/DropEffectlessStoresCondition.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/DropEffectlessStoresCondition.java @@ -59,7 +59,7 @@ private static Term dropEffectlessStoresHelper(Term heapTerm, TermServices servi private static Term dropEffectlessStores(Term t, Services services) { HeapLDT heapLDT = services.getTypeConverter().getHeapLDT(); assert t.sort() == heapLDT.targetSort(); - return dropEffectlessStoresHelper(t, services, DefaultImmutableSet.>nil(), + return dropEffectlessStoresHelper(t, services, DefaultImmutableSet.nil(), heapLDT.getStore()); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/MetaDisjointCondition.java b/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/MetaDisjointCondition.java index 3dfc9816d55..50693c9ca87 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/MetaDisjointCondition.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/MetaDisjointCondition.java @@ -37,8 +37,8 @@ private static boolean clearlyDisjoint(Term t1, Term t2, Services services) { final ImmutableSet t1set = services.getTermBuilder().unionToSet(t1); final ImmutableSet t2set = services.getTermBuilder().unionToSet(t2); - ImmutableSet t1Ops = DefaultImmutableSet.nil(); - ImmutableSet t2Ops = DefaultImmutableSet.nil(); + ImmutableSet t1Ops = DefaultImmutableSet.nil(); + ImmutableSet t2Ops = DefaultImmutableSet.nil(); for (Term t : t1set) { if (t.op().equals(setLDT.getSingleton()) && t.sub(0).op() instanceof Function && ((Function) t.sub(0).op()).isUnique()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/TypeResolver.java b/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/TypeResolver.java index 00ad418d85e..615391c4ee6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/TypeResolver.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/conditions/TypeResolver.java @@ -218,7 +218,7 @@ private Sort getContainerSort(Operator op, TermServices services) { Function func = (Function) op; String funcName = func.name().toString(); String sortName = funcName.substring(0, funcName.indexOf("::")); - return (Sort) services.getNamespaces().sorts().lookup(new Name(sortName)); + return services.getNamespaces().sorts().lookup(new Name(sortName)); } else { Debug.fail("Unknown member type", op); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/executor/javadl/TacletExecutor.java b/key.core/src/main/java/de/uka/ilkd/key/rule/executor/javadl/TacletExecutor.java index 250f6c14d49..c66ac7d268e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/executor/javadl/TacletExecutor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/executor/javadl/TacletExecutor.java @@ -162,7 +162,7 @@ protected ImmutableList instantiateSemisequent(Semisequent semi, PosInOccurrence applicationPosInOccurrence, MatchConditions matchCond, Goal goal, RuleApp tacletApp, Services services) { - ImmutableList replacements = ImmutableSLList.nil(); + ImmutableList replacements = ImmutableSLList.nil(); for (SequentFormula sf : semi) { replacements = replacements.append(instantiateReplacement(termLabelState, sf, services, @@ -296,9 +296,7 @@ protected void applyAddrule(ImmutableList rules, Goal goal, Services ser for (Taclet tacletToAdd : rules) { final Node n = goal.node(); - final StringBuilder uniqueTail = new StringBuilder(tacletToAdd.name().toString()); - uniqueTail.append(AUTONAME).append(n.getUniqueTacletId()); - tacletToAdd = tacletToAdd.setName(uniqueTail.toString()); + tacletToAdd = tacletToAdd.setName(tacletToAdd.name().toString() + AUTONAME + n.getUniqueTacletId()); // the new Taclet may contain variables with a known @@ -341,7 +339,7 @@ protected void applyAddrule(ImmutableList rules, Goal goal, Services ser protected void applyAddProgVars(ImmutableSet pvs, SequentChangeInfo currentSequent, Goal goal, PosInOccurrence posOfFind, Services services, MatchConditions matchCond) { - ImmutableList renamings = ImmutableSLList.nil(); + ImmutableList renamings = ImmutableSLList.nil(); for (final SchemaVariable sv : pvs) { final ProgramVariable inst = (ProgramVariable) matchCond.getInstantiations().getInstantiation(sv); @@ -429,10 +427,10 @@ protected ImmutableList checkIfGoals(Goal p_goal, ifPart = services.getTermBuilder().not(ifPart); if (res == null) { - res = ImmutableSLList.nil(); + res = ImmutableSLList.nil(); for (int j = 0; j < p_numberOfNewGoals + 1; j++) { res = res.prepend(SequentChangeInfo.createSequentChangeInfo( - (SemisequentChangeInfo) null, (SemisequentChangeInfo) null, + (SemisequentChangeInfo) null, null, p_goal.sequent(), p_goal.sequent())); } ifObl = ifPart; @@ -457,11 +455,11 @@ protected ImmutableList checkIfGoals(Goal p_goal, } if (res == null) { - res = ImmutableSLList.nil(); + res = ImmutableSLList.nil(); for (int j = 0; j < p_numberOfNewGoals; j++) { res = res.prepend( SequentChangeInfo.createSequentChangeInfo((SemisequentChangeInfo) null, - (SemisequentChangeInfo) null, p_goal.sequent(), p_goal.sequent())); + null, p_goal.sequent(), p_goal.sequent())); } } else { // find the sequent the if obligation has to be added to diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/GenericSortInstantiations.java b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/GenericSortInstantiations.java index 9771eaddaa1..894abf5f80d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/GenericSortInstantiations.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/GenericSortInstantiations.java @@ -32,7 +32,7 @@ public final class GenericSortInstantiations { public static final GenericSortInstantiations EMPTY_INSTANTIATIONS = - new GenericSortInstantiations(DefaultImmutableMap.nilMap()); + new GenericSortInstantiations(DefaultImmutableMap.nilMap()); private final ImmutableMap insts; @@ -55,7 +55,7 @@ public static GenericSortInstantiations create( Iterator>> p_instantiations, ImmutableList p_conditions, Services services) { - ImmutableList sorts = ImmutableSLList.nil(); + ImmutableList sorts = ImmutableSLList.nil(); GenericSortCondition c; final Iterator it; @@ -154,7 +154,7 @@ public boolean isEmpty() { * anything about further generic sorts) */ public ImmutableList toConditions() { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); for (final ImmutableMapEntry entry : insts) { @@ -191,7 +191,7 @@ public Sort getRealSort(Sort p_s, TermServices services) { /** exception thrown if no solution exists */ private final static GenericSortException UNSATISFIABLE_SORT_CONSTRAINTS = new GenericSortException("Conditions for generic sorts could not be solved: ", - ImmutableSLList.nil()); + ImmutableSLList.nil()); /** * Really solve the conditions given @@ -211,8 +211,8 @@ private static ImmutableMap solve(ImmutableList // "topologicalSorts" ImmutableList topologicalSorts = topology(p_sorts); - res = solveHelp(topologicalSorts, DefaultImmutableMap.nilMap(), - p_conditions, ImmutableSLList.nil(), services); + res = solveHelp(topologicalSorts, DefaultImmutableMap.nilMap(), + p_conditions, ImmutableSLList.nil(), services); if (res == null) { @@ -254,9 +254,9 @@ private static ImmutableMap solveHelp( // Find the sorts "gs" has to be a supersort of and the // identity conditions - ImmutableList subsorts = ImmutableSLList.nil(); + ImmutableList subsorts = ImmutableSLList.nil(); ImmutableList idConditions = - ImmutableSLList.nil(); + ImmutableSLList.nil(); // subsorts given by the conditions (could be made faster // by using a hash map for storing the conditions) @@ -356,7 +356,7 @@ private static ImmutableList chooseResults(GenericSort p_gs, private static ImmutableList toList(ImmutableSet p_set) { ImmutableList res; - res = ImmutableSLList.nil(); + res = ImmutableSLList.nil(); final Iterator it = p_set.iterator(); while (it.hasNext()) res = res.prepend(it.next()); @@ -397,7 +397,7 @@ private static ImmutableMap solveForcedInst( return p_curRes; // nothing further to be done Iterator it = topology(p_remainingSorts).iterator(); - p_remainingSorts = ImmutableSLList.nil(); + p_remainingSorts = ImmutableSLList.nil(); // reverse the order of the sorts, to start with the most // general one @@ -487,7 +487,7 @@ private static ImmutableMap solveForcedInstHelp( * @return sorted sorts */ private static ImmutableList topology(ImmutableList p_sorts) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); Iterator it; GenericSort curMax; GenericSort tMax; @@ -503,7 +503,7 @@ private static ImmutableList topology(ImmutableList p_ continue; } - tList = ImmutableSLList.nil(); + tList = ImmutableSLList.nil(); while (it.hasNext()) { tMax = it.next(); @@ -578,13 +578,13 @@ private static ImmutableList findMinimalElements(Set p_inside) { if (p_inside.size() == 1) return ImmutableSLList.nil().prepend(p_inside.iterator().next()); - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); final Iterator it = p_inside.iterator(); mainloop: while (it.hasNext()) { final Sort sort = it.next(); - ImmutableList res2 = ImmutableSLList.nil(); + ImmutableList res2 = ImmutableSLList.nil(); final Iterator itSort = res.iterator(); while (itSort.hasNext()) { final Sort oldMinimal = itSort.next(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/ProgramSVInstantiation.java b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/ProgramSVInstantiation.java index 1c54d448614..0301f0eed3c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/ProgramSVInstantiation.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/ProgramSVInstantiation.java @@ -21,7 +21,7 @@ public class ProgramSVInstantiation { new ProgramSVInstantiation(); /** the map with the instantiations */ - private ImmutableList list = ImmutableSLList.nil(); + private ImmutableList list = ImmutableSLList.nil(); /** integer to cache the hashcode */ private int hashcode = 0; diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/SVInstantiations.java b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/SVInstantiations.java index 8fecf61036a..c208f8ff802 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/SVInstantiations.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/SVInstantiations.java @@ -71,10 +71,10 @@ public boolean canStandFor(ProgramElement pe, Services services) { /** creates a new SVInstantions object with an empty map */ private SVInstantiations() { - genericSortConditions = ImmutableSLList.nil(); - updateContext = ImmutableSLList.nil(); - map = DefaultImmutableMap.>nilMap(); - interesting = DefaultImmutableMap.>nilMap(); + genericSortConditions = ImmutableSLList.nil(); + updateContext = ImmutableSLList.nil(); + map = DefaultImmutableMap.nilMap(); + interesting = DefaultImmutableMap.nilMap(); } /** @@ -146,7 +146,7 @@ public SVInstantiations add(SchemaVariable sv, ImmutableArray labels, public SVInstantiations addList(SchemaVariable sv, Object[] list, Services services) { - return add(sv, new ListInstantiation(sv, ImmutableSLList.nil().prepend(list)), + return add(sv, new ListInstantiation(sv, ImmutableSLList.nil().prepend(list)), services); } @@ -173,7 +173,7 @@ public SVInstantiations addInteresting(SchemaVariable sv, ProgramElement pe, public SVInstantiations addInterestingList(SchemaVariable sv, Object[] list, Services services) { return addInteresting(sv, - new ListInstantiation(sv, ImmutableSLList.nil().prepend(list)), services); + new ListInstantiation(sv, ImmutableSLList.nil().prepend(list)), services); } @@ -474,7 +474,7 @@ public SVInstantiations clearUpdateContext() { // avoid unnecessary creation of SVInstantiations return this; } - return new SVInstantiations(map, interesting(), ImmutableSLList.nil(), + return new SVInstantiations(map, interesting(), ImmutableSLList.nil(), getGenericSortInstantiations(), getGenericSortConditions()); } @@ -594,7 +594,7 @@ public SVInstantiations union(SVInstantiations other, Services services) { result = result.put(entry.key(), entry.value()); } - ImmutableList updates = ImmutableSLList.nil(); + ImmutableList updates = ImmutableSLList.nil(); if (other.getUpdateContext().isEmpty()) { updates = getUpdateContext(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/TermLabelInstantiationEntry.java b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/TermLabelInstantiationEntry.java index a8a1861397b..ee694e6225b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/inst/TermLabelInstantiationEntry.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/inst/TermLabelInstantiationEntry.java @@ -18,10 +18,9 @@ public class TermLabelInstantiationEntry extends InstantiationEntry p_toMatch, Term p_template, MatchConditions p_matchCond, Services p_services) { ImmutableList resFormulas = - ImmutableSLList.nil(); - ImmutableList resMC = ImmutableSLList.nil(); + ImmutableSLList.nil(); + ImmutableList resMC = ImmutableSLList.nil(); Term updateFormula; if (p_matchCond.getInstantiations().getUpdateContext().isEmpty()) diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/VMTacletMatcher.java b/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/VMTacletMatcher.java index 0efef5bd3a8..db18abb04f3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/VMTacletMatcher.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/VMTacletMatcher.java @@ -114,13 +114,13 @@ public final IfMatchResult matchIf(ImmutableList p_toMat ImmutableList resFormulas = - ImmutableSLList.nil(); - ImmutableList resMC = ImmutableSLList.nil(); + ImmutableSLList.nil(); + ImmutableList resMC = ImmutableSLList.nil(); final boolean updateContextPresent = !p_matchCond.getInstantiations().getUpdateContext().isEmpty(); ImmutableList context = - ImmutableSLList.nil(); + ImmutableSLList.nil(); if (updateContextPresent) { context = p_matchCond.getInstantiations().getUpdateContext(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/instructions/MatchTermLabelInstruction.java b/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/instructions/MatchTermLabelInstruction.java index 7e32ede6d50..3b91efb7072 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/instructions/MatchTermLabelInstruction.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/instructions/MatchTermLabelInstruction.java @@ -33,7 +33,7 @@ private MatchConditions match(TermLabelSV sv, Term instantiationCandidate, return matchCond.setInstantiations( svInsts.add(sv, instantiationCandidate.getLabels(), services)); } else { - for (Object o : (ImmutableArray) inst.getInstantiation()) { + for (Object o : inst.getInstantiation()) { if (!instantiationCandidate.containsLabel((TermLabel) o)) { return null; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeProcedure.java b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeProcedure.java index d336f73c517..9265afdc8bf 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeProcedure.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeProcedure.java @@ -38,7 +38,7 @@ public abstract class MergeProcedure { /** Concrete merge procedures. */ - static ImmutableList CONCRETE_RULES = ImmutableSLList.nil(); + static ImmutableList CONCRETE_RULES = ImmutableSLList.nil(); static { CONCRETE_RULES = diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeRule.java b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeRule.java index 03c2676d946..6e933b9f578 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeRule.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeRule.java @@ -383,7 +383,7 @@ protected Triple, LinkedHashSetnil(), + return new ValuesMergeResult(DefaultImmutableSet.nil(), createIfThenElseTerm(state1, state2, valueInState1, valueInState2, distinguishingFormula, services), new LinkedHashSet(), new LinkedHashSet()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeTotalWeakening.java b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeTotalWeakening.java index b8c455d8643..3be14b79ca9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeTotalWeakening.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeTotalWeakening.java @@ -57,7 +57,7 @@ public ValuesMergeResult mergeValuesInStates(Term v, SymbolicExecutionState stat LinkedHashSet newNames = new LinkedHashSet(); newNames.add(newSkolemConstant.name()); - return new ValuesMergeResult(DefaultImmutableSet.nil(), tb.func(newSkolemConstant), + return new ValuesMergeResult(DefaultImmutableSet.nil(), tb.func(newSkolemConstant), newNames, new LinkedHashSet()); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeWithLatticeAbstraction.java b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeWithLatticeAbstraction.java index 23c575ee9d5..cc8c325b1c9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeWithLatticeAbstraction.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeWithLatticeAbstraction.java @@ -116,7 +116,7 @@ public ValuesMergeResult mergeValuesInStates(Term v, SymbolicExecutionState stat } else { - return new ValuesMergeResult(DefaultImmutableSet.nil(), + return new ValuesMergeResult(DefaultImmutableSet.nil(), MergeByIfThenElse.createIfThenElseTerm(state1, state2, valueInState1, valueInState2, distinguishingFormula, services), new LinkedHashSet(), new LinkedHashSet()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ForToWhile.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ForToWhile.java index aca56d1ab1f..735a05b09a8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ForToWhile.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ForToWhile.java @@ -95,7 +95,7 @@ public ProgramElement[] transform(ProgramElement pe, Services services, */ @Override public ImmutableList neededInstantiations(SVInstantiations svInst) { - ImmutableList ret = ImmutableSLList.nil(); + ImmutableList ret = ImmutableSLList.nil(); if (innerLabel != null) ret = ret.prepend(innerLabel); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/MethodCall.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/MethodCall.java index d5c69acab44..39ae1a993ef 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/MethodCall.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/MethodCall.java @@ -107,7 +107,7 @@ protected MethodCall(Name name, ProgramSV ec, SchemaVariable result, ProgramElem /** gets an array of expression and returns a list of types */ private ImmutableList getTypes(ImmutableArray args, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (int i = args.size() - 1; i >= 0; i--) { Expression argument = args.get(i); result = diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ProgramTransformer.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ProgramTransformer.java index a72f50b9dc2..bfbf51822a3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ProgramTransformer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/ProgramTransformer.java @@ -227,7 +227,7 @@ public KeYJavaType getKeYJavaType(Services javaServ, ExecutionContext ec) { * @return a list of schema variables relevant for this entity; */ public ImmutableList needs() { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } /** @@ -238,7 +238,7 @@ public ImmutableList needs() { * @return a list of schema variables relevant for this entity; */ public ImmutableList neededInstantiations(SVInstantiations svInst) { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/UnwindLoop.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/UnwindLoop.java index 5ab91f74716..042e17467e5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/UnwindLoop.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/UnwindLoop.java @@ -72,7 +72,7 @@ public SchemaVariable getOuterLabelSV() { */ @Override public ImmutableList neededInstantiations(SVInstantiations svInst) { - ImmutableList ret = ImmutableSLList.nil(); + ImmutableList ret = ImmutableSLList.nil(); if (innerLabel != null) { ret = ret.prepend(innerLabel); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/WhileInvariantTransformer.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/WhileInvariantTransformer.java index 6d6f36b2dfe..cdfba677383 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/WhileInvariantTransformer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/WhileInvariantTransformer.java @@ -298,7 +298,7 @@ public ImmutableList neededInstantiations(ProgramElement origina WhileInvariantTransformation w = new WhileInvariantTransformation(originalLoop, svInst, javaInfo == null ? null : javaInfo.getServices()); w.start(); - instantiations = ImmutableSLList.nil(); + instantiations = ImmutableSLList.nil(); if (w.innerLabelNeeded()) { instantiations = instantiations.prepend(innerLabel); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/MetaDiv.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/MetaDiv.java index 701b0b6c2d6..532ad928f63 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/MetaDiv.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/MetaDiv.java @@ -50,7 +50,7 @@ public Term transform(Term term, SVInstantiations svInst, Services services) { bigIntArg2 = new BigInteger(convertToDecimalString(arg2, services)); if (bigIntArg2.compareTo(new BigInteger("0")) == 0) { Name undefName = new Name("undef(" + term + ")"); - Function undef = (Function) services.getNamespaces().functions().lookup(undefName); + Function undef = services.getNamespaces().functions().lookup(undefName); if (undef == null) { undef = new Function(undefName, services.getTypeConverter().getIntegerLDT().targetSort(), new Sort[0]); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Monomial.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Monomial.java index 24af4f4540f..650f7354078 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Monomial.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Monomial.java @@ -29,7 +29,7 @@ private Monomial(final ImmutableList parts, final BigInteger coefficient) this.coefficient = coefficient; } - public static final Monomial ONE = new Monomial(ImmutableSLList.nil(), BigInteger.ONE); + public static final Monomial ONE = new Monomial(ImmutableSLList.nil(), BigInteger.ONE); public static Monomial create(Term monoTerm, Services services) { final LRUCache monomialCache = services.getCaches().getMonomialCache(); @@ -125,7 +125,7 @@ public Monomial reduce(Monomial m) { final BigInteger c = this.coefficient; if (a.signum() == 0 || c.signum() == 0) - return new Monomial(ImmutableSLList.nil(), BigInteger.ZERO); + return new Monomial(ImmutableSLList.nil(), BigInteger.ZERO); return new Monomial(difference(m.parts, this.parts), LexPathOrdering.divide(a, c)); } @@ -221,7 +221,7 @@ public String toString() { private static class Analyser { public BigInteger coeff = BigInteger.ONE; - public ImmutableList parts = ImmutableSLList.nil(); + public ImmutableList parts = ImmutableSLList.nil(); private final Services services; private final Operator numbers, mul; diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Polynomial.java b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Polynomial.java index 10ef8bda5b8..91bc9706dde 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Polynomial.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/metaconstruct/arith/Polynomial.java @@ -24,12 +24,12 @@ public class Polynomial { * The polynomial expression of the BigInteger constant '0'. */ public final static Polynomial ZERO = - new Polynomial(ImmutableSLList.nil(), BigInteger.ZERO); + new Polynomial(ImmutableSLList.nil(), BigInteger.ZERO); /** * The polynomial expression of the BigInteger constant '1'. */ public final static Polynomial ONE = - new Polynomial(ImmutableSLList.nil(), BigInteger.ONE); + new Polynomial(ImmutableSLList.nil(), BigInteger.ONE); /** * The BigInteger constant for the value '-1'. @@ -70,9 +70,9 @@ private static Polynomial createHelp(Term polynomial, Services services) { public Polynomial multiply(BigInteger c) { if (c.signum() == 0) { - return new Polynomial(ImmutableSLList.nil(), BigInteger.ZERO); + return new Polynomial(ImmutableSLList.nil(), BigInteger.ZERO); } - ImmutableList newParts = ImmutableSLList.nil(); + ImmutableList newParts = ImmutableSLList.nil(); for (Monomial part : parts) { newParts = newParts.prepend(part.multiply(c)); } @@ -82,10 +82,10 @@ public Polynomial multiply(BigInteger c) { public Polynomial multiply(Monomial m) { if (m.getCoefficient().signum() == 0) { - return new Polynomial(ImmutableSLList.nil(), BigInteger.ZERO); + return new Polynomial(ImmutableSLList.nil(), BigInteger.ZERO); } - ImmutableList newParts = ImmutableSLList.nil(); + ImmutableList newParts = ImmutableSLList.nil(); for (Monomial part : parts) { newParts = newParts.prepend(part.multiply(m)); } @@ -261,7 +261,7 @@ public String toString() { private static class Analyser { public BigInteger constantPart = BigInteger.ZERO; - public ImmutableList parts = ImmutableSLList.nil(); + public ImmutableList parts = ImmutableSLList.nil(); private final Services services; private final TypeConverter tc; private final Operator numbers, add; diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/AntecSuccTacletGoalTemplate.java b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/AntecSuccTacletGoalTemplate.java index 0b93a714779..9b396cbc960 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/AntecSuccTacletGoalTemplate.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/AntecSuccTacletGoalTemplate.java @@ -35,7 +35,7 @@ public AntecSuccTacletGoalTemplate(Sequent addedSeq, ImmutableList added public AntecSuccTacletGoalTemplate(Sequent addedSeq, ImmutableList addedRules, Sequent replacewith) { - this(addedSeq, addedRules, replacewith, DefaultImmutableSet.nil()); + this(addedSeq, addedRules, replacewith, DefaultImmutableSet.nil()); } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/RewriteTacletGoalTemplate.java b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/RewriteTacletGoalTemplate.java index bfe1a9f614e..1e3cb93584f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/RewriteTacletGoalTemplate.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/RewriteTacletGoalTemplate.java @@ -38,12 +38,12 @@ public RewriteTacletGoalTemplate(Sequent addedSeq, ImmutableList addedRu public RewriteTacletGoalTemplate(Sequent addedSeq, ImmutableList addedRules, Term replacewith) { - this(addedSeq, addedRules, replacewith, DefaultImmutableSet.nil()); + this(addedSeq, addedRules, replacewith, DefaultImmutableSet.nil()); } public RewriteTacletGoalTemplate(Term replacewith) { - this(Sequent.EMPTY_SEQUENT, ImmutableSLList.nil(), replacewith); + this(Sequent.EMPTY_SEQUENT, ImmutableSLList.nil(), replacewith); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletBuilder.java index 870367f34da..cfc12a5aa05 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletBuilder.java @@ -35,23 +35,23 @@ public abstract class TacletBuilder { protected Name name = NONAME; protected Sequent ifseq = Sequent.EMPTY_SEQUENT; - protected ImmutableList varsNew = ImmutableSLList.nil(); - protected ImmutableList varsNotFreeIn = ImmutableSLList.nil(); + protected ImmutableList varsNew = ImmutableSLList.nil(); + protected ImmutableList varsNotFreeIn = ImmutableSLList.nil(); protected ImmutableList varsNewDependingOn = - ImmutableSLList.nil(); - protected ImmutableList goals = ImmutableSLList.nil(); - protected ImmutableList ruleSets = ImmutableSLList.nil(); + ImmutableSLList.nil(); + protected ImmutableList goals = ImmutableSLList.nil(); + protected ImmutableList ruleSets = ImmutableSLList.nil(); protected TacletAttributes attrs = new TacletAttributes(); /** * List of additional generic conditions on the instantiations of schema variables. */ protected ImmutableList variableConditions = - ImmutableSLList.nil(); + ImmutableSLList.nil(); protected HashMap goal2Choices = null; protected ChoiceExpr choices = ChoiceExpr.TRUE; protected ImmutableSet tacletAnnotations = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); protected String origin; public void setAnnotations(ImmutableSet tacletAnnotations) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletGenerator.java b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletGenerator.java index 8252e467f12..490df9a6f68 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletGenerator.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletGenerator.java @@ -72,7 +72,7 @@ private TacletGoalTemplate createAxiomGoalTemplate(Term goalTerm) { Semisequent.EMPTY_SEMISEQUENT.insertFirst(axiomSf).semisequent(); final Sequent axiomSeq = Sequent.createAnteSequent(axiomSemiSeq); final TacletGoalTemplate axiomTemplate = - new TacletGoalTemplate(axiomSeq, ImmutableSLList.nil()); + new TacletGoalTemplate(axiomSeq, ImmutableSLList.nil()); return axiomTemplate; } @@ -131,8 +131,8 @@ public Taclet generateRelationalRepresentsTaclet(Name tacletName, Term originalA originalAxiom = tb.convertToFormula(originalAxiom); // create schema terms - ImmutableList pvs = ImmutableSLList.nil(); - ImmutableList svs = ImmutableSLList.nil(); + ImmutableList pvs = ImmutableSLList.nil(); + ImmutableList svs = ImmutableSLList.nil(); List heapSVs = new ArrayList(); for (ProgramVariable heap : heaps) { if (target.getStateCount() >= 1) { @@ -151,7 +151,7 @@ public Taclet generateRelationalRepresentsTaclet(Name tacletName, Term originalA final SchemaVariable selfSV = createSchemaVariable(self); - ImmutableList paramSVs = ImmutableSLList.nil(); + ImmutableList paramSVs = ImmutableSLList.nil(); for (ProgramVariable paramVar : paramVars) { paramSVs = paramSVs.append(createSchemaVariable(paramVar)); } @@ -165,7 +165,7 @@ public Taclet generateRelationalRepresentsTaclet(Name tacletName, Term originalA paramSVs, schemaAxiom.term, tacletBuilder, satisfiabilityGuard); final Sequent addedSeq = Sequent.createAnteSequent( Semisequent.EMPTY_SEMISEQUENT.insertFirst(guardedSchemaAxiom).semisequent()); - ImmutableList vars = ImmutableSLList.nil(); + ImmutableList vars = ImmutableSLList.nil(); for (SchemaVariable heapSV : heapSVs) { vars = vars.append(tb.var(heapSV)); } @@ -178,7 +178,7 @@ public Taclet generateRelationalRepresentsTaclet(Name tacletName, Term originalA final Term findTerm = tb.func(target, vars.toArray(new Term[0])); final RewriteTacletGoalTemplate axiomTemplate = - new RewriteTacletGoalTemplate(addedSeq, ImmutableSLList.nil(), findTerm); + new RewriteTacletGoalTemplate(addedSeq, ImmutableSLList.nil(), findTerm); // choices, rule set var choice = ChoiceExpr.variable("modelFields", @@ -215,8 +215,8 @@ public ImmutableSet generateFunctionalRepresentsTaclets(Name name, Term TermBuilder TB = services.getTermBuilder(); // instantiate axiom with schema variables - ImmutableList pvs = ImmutableSLList.nil(); - ImmutableList svs = ImmutableSLList.nil(); + ImmutableList pvs = ImmutableSLList.nil(); + ImmutableList svs = ImmutableSLList.nil(); List heapSVs = new ArrayList(); for (ProgramVariable heap : heaps) { if (target.getStateCount() >= 1) { @@ -234,7 +234,7 @@ public ImmutableSet generateFunctionalRepresentsTaclets(Name name, Term } final SchemaVariable selfSV = createSchemaVariable(self); - ImmutableList paramSVs = ImmutableSLList.nil(); + ImmutableList paramSVs = ImmutableSLList.nil(); for (ProgramVariable paramVar : paramVars) { paramSVs = paramSVs.append(createSchemaVariable(paramVar)); } @@ -323,7 +323,7 @@ public ImmutableSet generateFunctionalRepresentsTaclets(Name name, Term final RewriteTacletBuilder tacletBuilder = new RewriteTacletBuilder<>(); tacletBuilder.setFind(schemaLhs); tacletBuilder.addTacletGoalTemplate(new RewriteTacletGoalTemplate(Sequent.EMPTY_SEQUENT, - ImmutableSLList.nil(), limitedRhs)); + ImmutableSLList.nil(), limitedRhs)); // FIXME - there is a chance this will have to go along with all the other associated // changes @@ -386,7 +386,7 @@ private void functionalRepresentsAddSatisfiabilityBranch(IObserverFunction targe tacletBuilder.addVarsNewDependingOn(skolemSV, paramSV); } tacletBuilder.addTacletGoalTemplate(new RewriteTacletGoalTemplate(addedSeq, - ImmutableSLList.nil(), services.getTermBuilder().var(skolemSV))); + ImmutableSLList.nil(), services.getTermBuilder().var(skolemSV))); tacletBuilder.goalTemplates().tail().head().setName("Use Axiom"); tacletBuilder.goalTemplates().head().setName("Show Axiom Satisfiability"); } @@ -396,7 +396,7 @@ private Term functionalRepresentsSatisfiability(IObserverFunction target, TermSe List heapSVs, final SchemaVariable selfSV, ImmutableList paramSVs, final TermAndBoundVarPair schemaRepresents, final RewriteTacletBuilder tacletBuilder) { - ImmutableList vars = ImmutableSLList.nil(); + ImmutableList vars = ImmutableSLList.nil(); TermBuilder TB = services.getTermBuilder(); for (SchemaVariable heapSV : heapSVs) { vars = vars.append(TB.var(heapSV)); @@ -452,8 +452,8 @@ public ImmutableSet generateContractAxiomTaclets(Name name, Term origina ImmutableSet> toLimit, boolean satisfiabilityGuard, TermServices services) { - ImmutableList pvs = ImmutableSLList.nil(); - ImmutableList svs = ImmutableSLList.nil(); + ImmutableList pvs = ImmutableSLList.nil(); + ImmutableList svs = ImmutableSLList.nil(); final List heapSVs = new ArrayList(); for (ProgramVariable heap : heaps) { if (target.getStateCount() >= 1) { @@ -566,7 +566,7 @@ public ImmutableSet generateContractAxiomTaclets(Name name, Term origina tacletBuilder.setFind(find); tacletBuilder.setApplicationRestriction(RewriteTaclet.SAME_UPDATE_LEVEL); tacletBuilder.addTacletGoalTemplate( - new TacletGoalTemplate(addedSeq, ImmutableSLList.nil())); + new TacletGoalTemplate(addedSeq, ImmutableSLList.nil())); tacletBuilder.setName(name); tacletBuilder.addRuleSet(new RuleSet(new Name("classAxiom"))); @@ -656,7 +656,7 @@ public ImmutableSet generatePartialInvTaclet(Name name, List> toLimit, boolean isStatic, boolean eqVersion, Services services) { TermBuilder TB = services.getTermBuilder(); - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); Map replace = new LinkedHashMap(); int i = 0; for (ProgramVariable heap : HeapContext.getModHeaps(services, false)) { @@ -691,7 +691,7 @@ public ImmutableSet generatePartialInvTaclet(Name name, Listnil())); + new TacletGoalTemplate(addedSeq, ImmutableSLList.nil())); tacletBuilder.setName(name); tacletBuilder.addRuleSet(new RuleSet(new Name("partialInvAxiom"))); for (VariableSV boundSV : schemaAxiom.boundVars) { @@ -737,8 +737,8 @@ public ImmutableSet generatePartialInvTaclet(Name name, List... varPairs) { - ImmutableList progVars = ImmutableSLList.nil(); - ImmutableList schemaVars = ImmutableSLList.nil(); + ImmutableList progVars = ImmutableSLList.nil(); + ImmutableList schemaVars = ImmutableSLList.nil(); for (Pair varPair : varPairs) { progVars = progVars.append(varPair.first); schemaVars = schemaVars.append(varPair.second); @@ -771,7 +771,7 @@ private SchemaVariable createSchemaVariable(ProgramVariable programVar) { private ImmutableList createSchemaVariables( ImmutableList programVars) { - ImmutableList schemaVars = ImmutableSLList.nil(); + ImmutableList schemaVars = ImmutableSLList.nil(); for (ProgramVariable progVar : programVars) { SchemaVariable schemaVar = createSchemaVariable(progVar); schemaVars = schemaVars.append(schemaVar); @@ -820,7 +820,7 @@ private TermAndBoundVarPair replaceBoundLogicVars(Term t, TermServices services) } // find and resolve name conflicts between schema variables - ImmutableSet newSVs = DefaultImmutableSet.nil(); + ImmutableSet newSVs = DefaultImmutableSet.nil(); final Set namesOfNewSVs = new LinkedHashSet(); final Map replaceMap = new LinkedHashMap(); for (VariableSV sv : intermediateRes.boundVars) { @@ -852,7 +852,7 @@ private TermAndBoundVarPair replaceBoundLogicVars(Term t, TermServices services) private TermAndBoundVarPair replaceBoundLVsWithSVsHelper(Term t, TermServices services) { - ImmutableSet svs = DefaultImmutableSet.nil(); + ImmutableSet svs = DefaultImmutableSet.nil(); // prepare op replacer, new bound vars final Map map = new LinkedHashMap(); @@ -959,7 +959,7 @@ private Term prepareSatisfiabilityGuard(IObserverFunction target, List vars = ImmutableSLList.nil(); + ImmutableList vars = ImmutableSLList.nil(); for (SchemaVariable heapSV : heapSVs) { vars = vars.append(TB.var(heapSV)); } @@ -978,7 +978,7 @@ private Term prepareSatisfiabilityGuard(IObserverFunction target, List addedRules = ImmutableSLList.nil(); + private ImmutableList addedRules = ImmutableSLList.nil(); /** program variables added by this taclet to the namespace */ - private ImmutableSet addedProgVars = DefaultImmutableSet.nil(); + private ImmutableSet addedProgVars = DefaultImmutableSet.nil(); private String name = null; @@ -58,7 +58,7 @@ public TacletGoalTemplate(Sequent addedSeq, ImmutableList addedRules, * @param addedRules IList contains the new allowed rules at this branch */ public TacletGoalTemplate(Sequent addedSeq, ImmutableList addedRules) { - this(addedSeq, addedRules, DefaultImmutableSet.nil()); + this(addedSeq, addedRules, DefaultImmutableSet.nil()); } @@ -106,7 +106,7 @@ public ImmutableSet addedProgVars() { * @return all variables that occur bound in this goal template */ public ImmutableSet getBoundVariables() { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (Taclet taclet : rules()) { result = result.union(taclet.getBoundVariables()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletPrefixBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletPrefixBuilder.java index 1d75859bb5e..1c3134d4218 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletPrefixBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletPrefixBuilder.java @@ -16,11 +16,11 @@ public class TacletPrefixBuilder { * set of all schemavariables that are only allowed to be matched with quantifiable variables. */ private ImmutableSet currentlyBoundVars = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); private TacletBuilder tacletBuilder; protected ImmutableMap prefixMap = - DefaultImmutableMap.nilMap(); + DefaultImmutableMap.nilMap(); public TacletPrefixBuilder(TacletBuilder tacletBuilder) { this.tacletBuilder = tacletBuilder; diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java index 26685450d35..ad0447230e9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java @@ -103,7 +103,7 @@ public void updateChoices(Namespace choiceNS, boolean remove) { Choice c; Set soc; while (it.hasNext()) { - c = (Choice) it.next(); + c = it.next(); if (c2C.containsKey(c.category())) { soc = c2C.get(c.category()); soc.add(c.name().toString()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/smt/AbstractSMTTranslator.java b/key.core/src/main/java/de/uka/ilkd/key/smt/AbstractSMTTranslator.java index f34010cff60..938b68238d5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/smt/AbstractSMTTranslator.java +++ b/key.core/src/main/java/de/uka/ilkd/key/smt/AbstractSMTTranslator.java @@ -2156,9 +2156,7 @@ private StringBuilder getModalityPredicate(Term t, Vector * @param fun the interpreted function to be added. */ private void addSpecialFunction(Function fun) { - if (!specialFunctions.contains(fun)) { - specialFunctions.add(fun); - } + specialFunctions.add(fun); } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/smt/lang/SMTTermBinOp.java b/key.core/src/main/java/de/uka/ilkd/key/smt/lang/SMTTermBinOp.java index afee57a1dad..fa0833fa4a3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/smt/lang/SMTTermBinOp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/smt/lang/SMTTermBinOp.java @@ -202,7 +202,7 @@ public SMTSort sort() { @Override public boolean occurs(SMTTermVariable a) { for (int i = 0; i < getQuantVars().size(); i++) { - if (!a.getId().equals(((SMTTermVariable) getQuantVars().get(i)).getId())) { + if (!a.getId().equals(getQuantVars().get(i).getId())) { return true; } } @@ -355,7 +355,7 @@ public boolean isChainableBinOp(SMTTerm t) { public String toString(int nestPos) { LOGGER.warn("Warning: somehow a binop was created. {}", this.getOperator()); - StringBuffer tab = new StringBuffer(""); + StringBuffer tab = new StringBuffer(); for (int i = 0; i < nestPos; i++) { tab = tab.append(" "); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/smt/solvertypes/SolverPropertiesLoader.java b/key.core/src/main/java/de/uka/ilkd/key/smt/solvertypes/SolverPropertiesLoader.java index f0d4efda062..e22a6115850 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/smt/solvertypes/SolverPropertiesLoader.java +++ b/key.core/src/main/java/de/uka/ilkd/key/smt/solvertypes/SolverPropertiesLoader.java @@ -183,14 +183,13 @@ private static String uniqueName(String name) { return name; } // if NAME was already used, use _ as NAME and increase counter afterwards - StringBuilder nameBuilder = new StringBuilder(); - nameBuilder.append(name); - nameBuilder.append("_"); - nameBuilder.append(counter); + String nameBuilder = name + + "_" + + counter; counter++; NAME_COUNTERS.put(name, counter); // _ is now also a NAME that has been used and must be unique - return uniqueName(nameBuilder.toString()); + return uniqueName(nameBuilder); } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/AuxiliaryContract.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/AuxiliaryContract.java index 80f0a83f4d4..de1dbf5d55a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/AuxiliaryContract.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/AuxiliaryContract.java @@ -849,7 +849,7 @@ public OriginalVariables toOrigVars() { atPreVars.put(h, remembranceLocalVariables.get(h)); } return new OriginalVariables(self, result, exception, atPreVars, - ImmutableSLList.nil()); + ImmutableSLList.nil()); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassAxiomImpl.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassAxiomImpl.java index ab1e60fe25d..9f2b927af3a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassAxiomImpl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassAxiomImpl.java @@ -128,14 +128,14 @@ public VisibilityModifier getVisibility() { @Override public ImmutableSet getTaclets(ImmutableSet> toLimit, Services services) { - ImmutableList replaceVars = ImmutableSLList.nil(); + ImmutableList replaceVars = ImmutableSLList.nil(); replaceVars = replaceVars.append(services.getTypeConverter().getHeapLDT().getHeap()); if (!isStatic) { replaceVars = replaceVars.append(originalSelfVar); } Term rep = services.getTermBuilder().convertToFormula(originalRep); TacletGenerator TG = TacletGenerator.getInstance(); - ImmutableSet taclets = DefaultImmutableSet.nil(); + ImmutableSet taclets = DefaultImmutableSet.nil(); final int c = services.getCounter("classAxiom").getCountPlusPlus(); final String namePP = "Class axiom " + c + " in " + kjt.getFullName(); final Name tacletName = MiscTools.toValidTacletName(namePP); diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassInvariantImpl.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassInvariantImpl.java index d24bee4e924..62df6eb1a8a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassInvariantImpl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/ClassInvariantImpl.java @@ -188,6 +188,6 @@ public OriginalVariables getOrigVars() { } return new OriginalVariables(self, null, null, new LinkedHashMap(), - ImmutableSLList.nil()); + ImmutableSLList.nil()); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/Contract.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/Contract.java index 1c31a6eccd7..dfe9e25ca4a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/Contract.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/Contract.java @@ -324,7 +324,7 @@ public OriginalVariables(ProgramVariable selfVar, ProgramVariable resVar, this.exception = excVar; this.atPres = (Map) atPreVars; if (paramVars == null) { - this.params = ImmutableSLList.nil(); + this.params = ImmutableSLList.nil(); } else { this.params = (ImmutableList) paramVars; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalAuxiliaryContract.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalAuxiliaryContract.java index f65cc62ec42..9003a0a265b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalAuxiliaryContract.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalAuxiliaryContract.java @@ -172,7 +172,7 @@ public Term getPre(LocationVariable heap, ProgramVariable selfVar, Map atPreVars0 = (Map) atPreVars; return contract.getPrecondition(heap, selfVar, atPreVars0.entrySet().stream().collect( - MapUtil., LocationVariable, LocationVariable>collector( + MapUtil.collector( Map.Entry::getKey, entry -> (LocationVariable) entry.getValue())), services); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalOperationContractImpl.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalOperationContractImpl.java index a72a54bd8ce..f327f4039d1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalOperationContractImpl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalOperationContractImpl.java @@ -380,7 +380,7 @@ protected Map getReplaceMap(Map heapTerms, T private ImmutableList addGhostParams( ImmutableList paramVars) { // make sure ghost parameters are present - ImmutableList ghostParams = ImmutableSLList.nil(); + ImmutableList ghostParams = ImmutableSLList.nil(); for (ProgramVariable param : originalParamVars) { if (param.isGhost()) { ghostParams = ghostParams.append(param); @@ -393,7 +393,7 @@ private ImmutableList addGhostParams( /** Make sure ghost parameters appear in the list of parameter variables. */ private ImmutableList addGhostParamTerms(ImmutableList paramVars) { // make sure ghost parameters are present - ImmutableList ghostParams = ImmutableSLList.nil(); + ImmutableList ghostParams = ImmutableSLList.nil(); for (ProgramVariable param : originalParamVars) { if (param.isGhost()) { ghostParams = ghostParams.append(tb.var(param)); diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/LoopSpecImpl.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/LoopSpecImpl.java index ccb4ae01045..676076586fe 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/LoopSpecImpl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/LoopSpecImpl.java @@ -518,7 +518,7 @@ public OriginalVariables getOrigVars() { self = null; } return new OriginalVariables(self, null, null, atPreVars, - ImmutableSLList.nil()); + ImmutableSLList.nil()); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/MethodWellDefinedness.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/MethodWellDefinedness.java index cb1cf5c085f..1bf2c49595a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/MethodWellDefinedness.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/MethodWellDefinedness.java @@ -190,7 +190,7 @@ private boolean findExcNull(Term t, ProgramVariable exc) { * @return a list of schema variables */ private ImmutableList paramsSV() { - ImmutableList paramsSV = ImmutableSLList.nil(); + ImmutableList paramsSV = ImmutableSLList.nil(); for (ProgramVariable pv : getOrigVars().params) { paramsSV = paramsSV.append( SchemaVariableFactory.createTermSV(pv.name(), pv.getKeYJavaType().getSort())); @@ -223,7 +223,7 @@ Term generateMbyAtPreDef(ParsableVariable self, ImmutableList assert params != null; final ProgramVariable selfVar = self instanceof ProgramVariable ? (ProgramVariable) self : null; - ImmutableList paramVars = ImmutableSLList.nil(); + ImmutableList paramVars = ImmutableSLList.nil(); for (ParsableVariable pv : params) { assert pv instanceof ProgramVariable : pv.toString(); paramVars = paramVars.append((ProgramVariable) pv); diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/ModelMethodExecution.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/ModelMethodExecution.java index e58f692a9d8..74212bcc3ab 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/ModelMethodExecution.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/ModelMethodExecution.java @@ -81,7 +81,7 @@ public ImmutableSet getTaclets(ImmutableSet> getUsedObservers(Services services) { - return DefaultImmutableSet.>nil(); + return DefaultImmutableSet.nil(); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/PartialInvAxiom.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/PartialInvAxiom.java index 7b6e36cc1df..5b51c040fa8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/PartialInvAxiom.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/PartialInvAxiom.java @@ -121,7 +121,7 @@ public VisibilityModifier getVisibility() { @Override public ImmutableSet getTaclets(ImmutableSet> toLimit, Services services) { - ImmutableSet result = DefaultImmutableSet.nil(); + ImmutableSet result = DefaultImmutableSet.nil(); for (int i = 0; i < 2; i++) { // i==0 normal and i==1 EQ version diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java index e078d0bdcec..7bbb8481948 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java @@ -56,7 +56,7 @@ public PositionedString(@Nonnull String text, String fileName) { public PositionedString(String text) { - this(text, (String) null); + this(text, null); } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/QueryAxiom.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/QueryAxiom.java index 7438c7067ee..7af4fcec809 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/QueryAxiom.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/QueryAxiom.java @@ -243,7 +243,7 @@ public ImmutableSet getTaclets(ImmutableSetnil(), replacewith)); + new RewriteTacletGoalTemplate(addedSeq, ImmutableSLList.nil(), replacewith)); tacletBuilder.setName(MiscTools.toValidTacletName(name)); tacletBuilder.addRuleSet(new RuleSet(new Name("query_axiom"))); // Originally used to be "simplify" diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/RepresentsAxiom.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/RepresentsAxiom.java index df13a2a8fb3..23142a594e1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/RepresentsAxiom.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/RepresentsAxiom.java @@ -157,7 +157,7 @@ public ImmutableSet getTaclets(ImmutableSet res = DefaultImmutableSet.nil(); + ImmutableSet res = DefaultImmutableSet.nil(); res = res.union( tg.generateFunctionalRepresentsTaclets(tacletName, originalPre, originalRep, kjt, target, heaps, self, originalParamVars, atPreVars, toLimit, true, services)); diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/StatementWellDefinedness.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/StatementWellDefinedness.java index 64e80fa9656..fadbf23e75a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/StatementWellDefinedness.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/StatementWellDefinedness.java @@ -65,7 +65,7 @@ public abstract class StatementWellDefinedness extends WellDefinednessCheck { * @return a list of the parameter variables */ final static ImmutableList convertParams(ImmutableSet set) { - ImmutableList list = ImmutableSLList.nil(); + ImmutableList list = ImmutableSLList.nil(); for (ProgramVariable pv : set) { list = list.append(pv); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/WellDefinednessCheck.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/WellDefinednessCheck.java index fef67fd453f..bdf63f7e0f8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/WellDefinednessCheck.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/WellDefinednessCheck.java @@ -115,8 +115,8 @@ static enum Type { */ private Pair, ImmutableList> sort(Term spec) { assert spec != null; - ImmutableList implicit = ImmutableSLList.nil(); - ImmutableList explicit = ImmutableSLList.nil(); + ImmutableList implicit = ImmutableSLList.nil(); + ImmutableList explicit = ImmutableSLList.nil(); if (spec.arity() > 0 && spec.op().equals(Junctor.AND)) { // Conjunctions assert spec.arity() == 2; if (spec.hasLabels() @@ -329,7 +329,7 @@ private Condition replace(Condition pre, Variables vars) { } private ImmutableList replace(Iterable l, Variables vars) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); for (Term t : l) { res = res.append(replace(t, vars)); } @@ -337,7 +337,7 @@ private ImmutableList replace(Iterable l, Variables vars) { } private ImmutableList getHeaps() { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); return result.append(getHeap()); } @@ -571,7 +571,7 @@ private Term generateParamsOK(ImmutableList paramVars) { private TermListAndFunc buildFreePre(Term implicitPre, ParsableVariable self, ParsableVariable heap, ImmutableList params, boolean taclet, Services services) { - ImmutableList resList = ImmutableSLList.nil(); + ImmutableList resList = ImmutableSLList.nil(); // "self != null" final Term selfNotNull = generateSelfNotNull(self); @@ -799,7 +799,7 @@ final Type type() { * @return a list of all remaining clauses */ ImmutableList getRest() { - ImmutableList rest = ImmutableSLList.nil(); + ImmutableList rest = ImmutableSLList.nil(); final Term accessible = this.accessible; if (accessible != null) { rest = rest.append(accessible); @@ -951,7 +951,7 @@ public final WellDefinednessCheck addRepresents(Term rep) { public final TermAndFunc getPre(final Condition pre, ParsableVariable self, ParsableVariable heap, ImmutableList parameters, boolean taclet, Services services) { - ImmutableList params = ImmutableSLList.nil(); + ImmutableList params = ImmutableSLList.nil(); for (ParsableVariable pv : parameters) { params = params.append(pv); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/dl/translation/DLSpecFactory.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/dl/translation/DLSpecFactory.java index 865b95d8999..f899c42cbb0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/dl/translation/DLSpecFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/dl/translation/DLSpecFactory.java @@ -141,7 +141,7 @@ private ProgramVariable extractSelfVar(UseOperationContractRule.Instantiation in private ImmutableList extractParamVars( UseOperationContractRule.Instantiation inst) throws ProofInputException { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Term param : inst.actualParams) { if (param.op() instanceof ProgramVariable) { result = result.append((ProgramVariable) param.op()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLInfoExtractor.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLInfoExtractor.java index 3d51d02948a..9f268e73b09 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLInfoExtractor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLInfoExtractor.java @@ -71,7 +71,7 @@ private static SpecMathMode checkForSpecMathMode(ImmutableList comments } private static ImmutableList getJMLComments(TypeDeclaration td) { - ImmutableList coms = ImmutableSLList.nil(); + ImmutableList coms = ImmutableSLList.nil(); // Either mod is attached to the declaration itself ... coms = coms.prepend(td.getComments()); @@ -89,7 +89,7 @@ private static ImmutableList getJMLComments(TypeDeclaration td) { } private static ImmutableList getJMLComments(MethodDeclaration method) { - ImmutableList coms = ImmutableSLList.nil(); + ImmutableList coms = ImmutableSLList.nil(); // Either mod is attached to the method itself ... Comment[] methodComments = method.getComments(); @@ -187,7 +187,7 @@ private static ImmutableList extractFieldModifiers(String fieldName, // ------------------------------------------------------------------------- public static boolean hasJMLModifier(FieldDeclaration fd, String mod) { - ImmutableList coms = ImmutableSLList.nil(); + ImmutableList coms = ImmutableSLList.nil(); // Either mod is attached to the declaration itself ... coms = coms.prepend(fd.getComments()); @@ -305,7 +305,7 @@ public static boolean parameterIsNullable(IProgramMethod pm, int pos) { public static boolean parameterIsNullable(IProgramMethod pm, ParameterDeclaration pd) { assert pm.getMethodDeclaration().getParameters().contains(pd) : "parameter " + pd + " does not belong to method declaration " + pm; - ImmutableList comments = ImmutableSLList.nil(); + ImmutableList comments = ImmutableSLList.nil(); comments = comments.prepend(pd.getComments()); comments = comments.prepend(pd.getTypeReference().getComments()); comments = comments.prepend(pd.getVariableSpecification().getComments()); @@ -327,7 +327,7 @@ public static boolean parameterIsNullable(IProgramMethod pm, ParameterDeclaratio public static boolean resultIsNullable(IProgramMethod pm) { MethodDeclaration md = pm.getMethodDeclaration(); - ImmutableList comments = ImmutableSLList.nil(); + ImmutableList comments = ImmutableSLList.nil(); for (Modifier mod : md.getModifiers()) { comments = comments.prepend(mod.getComments()); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLSpecExtractor.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLSpecExtractor.java index acf3d94de0f..421aff0a45b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLSpecExtractor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/JMLSpecExtractor.java @@ -356,7 +356,7 @@ public ImmutableSet extractMethodSpecs(IProgramMethod pm, constructs = parser.parseClassLevel(concatenatedComment, fileName, pos); warnings = warnings.append(parser.getWarnings()); } else { - constructs = ImmutableSLList.nil(); + constructs = ImmutableSLList.nil(); } // create JML contracts out of constructs, add them to result diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/pretranslation/TextualJMLClassAxiom.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/pretranslation/TextualJMLClassAxiom.java index 964d03471d2..1d21e1def86 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/pretranslation/TextualJMLClassAxiom.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/jml/pretranslation/TextualJMLClassAxiom.java @@ -19,7 +19,7 @@ public final class TextualJMLClassAxiom extends TextualJMLConstruct { * @param inv the expression in this clause */ public TextualJMLClassAxiom(ImmutableList mods, LabeledParserRuleContext inv) { - super(ImmutableSLList.nil()); // no modifiers allowed in axiom clause (see + super(ImmutableSLList.nil()); // no modifiers allowed in axiom clause (see // Sect. 8 of reference manual) assert inv != null; this.inv = inv; diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLParameters.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLParameters.java index c19768f33ee..8d5f19a2243 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLParameters.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLParameters.java @@ -42,7 +42,7 @@ public boolean isListOfTerm() { * @return the list of types that compose the type signature */ public ImmutableList getSignature(Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (SLExpression expr : parameters) { KeYJavaType type = expr.getType(); if (type == null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLResolverManager.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLResolverManager.java index d448bda4b06..5a71a78afdd 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLResolverManager.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/translation/SLResolverManager.java @@ -25,7 +25,7 @@ public abstract class SLResolverManager { public final SLExceptionFactory excManager; private ImmutableList resolvers = - ImmutableSLList.nil(); + ImmutableSLList.nil(); private final KeYJavaType specInClass; private final ParsableVariable selfVar; private final boolean useLocalVarsAsImplicitReceivers; diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/AbstractFeatureStrategy.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/AbstractFeatureStrategy.java index ceb362a8278..8a08553f05c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/AbstractFeatureStrategy.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/AbstractFeatureStrategy.java @@ -60,7 +60,7 @@ protected Feature ifHeuristics(String[] names, int priority) { } protected TacletFilter getFilterFor(String[] p_names) { - ImmutableList heur = ImmutableSLList.nil(); + ImmutableList heur = ImmutableSLList.nil(); for (int i = 0; i != p_names.length; ++i) heur = heur.prepend(getHeuristic(p_names[i])); return new IHTacletFilter(false, heur); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/BuiltInRuleAppContainer.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/BuiltInRuleAppContainer.java index d78d7da8da1..751ab9942c8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/BuiltInRuleAppContainer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/BuiltInRuleAppContainer.java @@ -107,7 +107,7 @@ static RuleAppContainer createAppContainer(IBuiltInRuleApp bir, PosInOccurrence */ static ImmutableList createInitialAppContainers( ImmutableList birs, PosInOccurrence pio, Goal goal) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (IBuiltInRuleApp bir : birs) { result = result.prepend(createAppContainer(bir, pio, goal)); @@ -121,14 +121,14 @@ static ImmutableList createInitialAppContainers( @Override public ImmutableList createFurtherApps(Goal goal) { if (!isStillApplicable(goal)) { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } final PosInOccurrence pio = getPosInOccurrence(goal); RuleAppContainer container = createAppContainer(bir, pio, goal); if (container.getCost() instanceof TopRuleAppCost) { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } return ImmutableSLList.nil().prepend(container); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedBreakpointRuleApplicationManager.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedBreakpointRuleApplicationManager.java index 82247d49b01..59335ed234f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedBreakpointRuleApplicationManager.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedBreakpointRuleApplicationManager.java @@ -81,7 +81,7 @@ public void ruleAdded(RuleApp rule, PosInOccurrence pos) { @Override public void rulesAdded(ImmutableList rules, PosInOccurrence pos) { ImmutableList applicableRules = // - ImmutableSLList.nil(); + ImmutableSLList.nil(); for (RuleApp r : rules) { if (mayAddRule(r, pos)) { applicableRules = applicableRules.prepend(r); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedRuleApplicationManager.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedRuleApplicationManager.java index 6783e41b8d6..791c5dcba54 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedRuleApplicationManager.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/FocussedRuleApplicationManager.java @@ -127,7 +127,7 @@ protected boolean isRuleApplicationForFocussedFormula(RuleApp rule, PosInOccurre @Override public void rulesAdded(ImmutableList rules, PosInOccurrence pos) { - ImmutableList applicableRules = ImmutableSLList.nil(); + ImmutableList applicableRules = ImmutableSLList.nil(); for (RuleApp r : rules) { if (isRuleApplicationForFocussedFormula(r, pos)) { applicableRules = applicableRules.prepend(r); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/IsInRangeProvable.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/IsInRangeProvable.java index 84411bda321..0639d42132e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/IsInRangeProvable.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/IsInRangeProvable.java @@ -61,7 +61,7 @@ private ImmutableSet collectAxioms(Sequent seq, PosInOccurrence ignore, // extract formulas with equality (on integer terms) or one of the operators in // ops as top level operator final ImmutableSet result = extractAssumptionsFrom(seq.antecedent(), false, - DefaultImmutableSet.nil(), ops, formulaToIgnore, services); + DefaultImmutableSet.nil(), ops, formulaToIgnore, services); return extractAssumptionsFrom(seq.succedent(), true, result, ops, formulaToIgnore, services); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java index 6329c56276f..80278f9d401 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java @@ -666,7 +666,7 @@ private void setUpStringNormalisation(RuleSetDispatchFeature d) { bindRuleSet(d, "stringsExpandDefNormalOp", longConst(500)); bindRuleSet(d, "stringsContainsDefInline", SumFeature - .createSum(new Feature[] { EqNonDuplicateAppFeature.INSTANCE, longConst(1000) })); + .createSum(EqNonDuplicateAppFeature.INSTANCE, longConst(1000))); } private void setupReplaceKnown(RuleSetDispatchFeature d) { @@ -836,7 +836,7 @@ private void setupSplitting(RuleSetDispatchFeature d) { bindRuleSet(d, "cut_direct", SumFeature .createSum( - new Feature[] { not(TopLevelFindFeature.ANTEC_OR_SUCC_WITH_UPDATE), + not(TopLevelFindFeature.ANTEC_OR_SUCC_WITH_UPDATE), AllowedCutPositionFeature.INSTANCE, ifZero( NotBelowQuantifierFeature.INSTANCE, add( @@ -858,12 +858,11 @@ NotBelowQuantifierFeature.INSTANCE, add( countOccurrencesInSeq, // standard costs longConst(100)), SumFeature // check for cuts below quantifiers - .createSum(new Feature[] { - applyTF(cutFormula, ff.cutAllowedBelowQuantifier), - applyTF(FocusFormulaProjection.INSTANCE, - ff.quantifiedClauseSet), - ifZero(allowQuantifierSplitting(), longConst(0), - longConst(100)) })) })); + .createSum(applyTF(cutFormula, ff.cutAllowedBelowQuantifier), + applyTF(FocusFormulaProjection.INSTANCE, + ff.quantifiedClauseSet), + ifZero(allowQuantifierSplitting(), longConst(0), + longConst(100)))))); } private void setupSplittingApproval(RuleSetDispatchFeature d) { @@ -900,25 +899,24 @@ private void setupApplyEq(RuleSetDispatchFeature d, IntegerLDT numbers) { // this is important for reducing polynomials (start with the biggest // summands) bindRuleSet(d, "apply_equations", - SumFeature.createSum(new Feature[] { - ifZero(applyTF(FocusProjection.create(0), tf.intF), - add(applyTF(FocusProjection.create(0), tf.monomial), - ScaleFeature.createScaled(FindRightishFeature.create(numbers), 5.0))), - ifZero(MatchedIfFeature.INSTANCE, - add(CheckApplyEqFeature.INSTANCE, let(equation, AssumptionProjection.create(0), - add(not(applyTF(equation, ff.update)), - // there might be updates in - // front of the assumption - // formula; in this case we wait - // until the updates have - // been applied - let(left, sub(equation, 0), - let(right, sub(equation, 1), ifZero(applyTF(left, tf.intF), - add(applyTF(left, tf.nonNegOrNonCoeffMonomial), - applyTF(right, tf.polynomial), - MonomialsSmallerThanFeature.create(right, left, numbers)), - TermSmallerThanFeature.create(right, left)))))))), - longConst(-4000) })); + SumFeature.createSum(ifZero(applyTF(FocusProjection.create(0), tf.intF), + add(applyTF(FocusProjection.create(0), tf.monomial), + ScaleFeature.createScaled(FindRightishFeature.create(numbers), 5.0))), + ifZero(MatchedIfFeature.INSTANCE, + add(CheckApplyEqFeature.INSTANCE, let(equation, AssumptionProjection.create(0), + add(not(applyTF(equation, ff.update)), + // there might be updates in + // front of the assumption + // formula; in this case we wait + // until the updates have + // been applied + let(left, sub(equation, 0), + let(right, sub(equation, 1), ifZero(applyTF(left, tf.intF), + add(applyTF(left, tf.nonNegOrNonCoeffMonomial), + applyTF(right, tf.polynomial), + MonomialsSmallerThanFeature.create(right, left, numbers)), + TermSmallerThanFeature.create(right, left)))))))), + longConst(-4000))); } // ////////////////////////////////////////////////////////////////////////// @@ -987,38 +985,38 @@ EliminableQuantifierTF.INSTANCE, sub(not(EliminableQuantifierTF.INSTANCE)))), // category "conjunctive normal form" bindRuleSet(d, "cnf_orComm", - SumFeature.createSum(new Feature[] { applyTF("commRight", ff.clause), - applyTFNonStrict("commResidue", ff.clauseSet), - or(applyTF("commLeft", ff.andF), - add(applyTF("commLeft", ff.literal), - literalsSmallerThan("commRight", "commLeft", numbers))), - longConst(-100) })); + SumFeature.createSum(applyTF("commRight", ff.clause), + applyTFNonStrict("commResidue", ff.clauseSet), + or(applyTF("commLeft", ff.andF), + add(applyTF("commLeft", ff.literal), + literalsSmallerThan("commRight", "commLeft", numbers))), + longConst(-100))); bindRuleSet(d, "cnf_orAssoc", - SumFeature.createSum(new Feature[] { applyTF("assoc0", ff.clause), - applyTF("assoc1", ff.clause), applyTF("assoc2", ff.literal), longConst(-80) })); + SumFeature.createSum(applyTF("assoc0", ff.clause), + applyTF("assoc1", ff.clause), applyTF("assoc2", ff.literal), longConst(-80))); bindRuleSet(d, "cnf_andComm", - SumFeature.createSum(new Feature[] { applyTF("commLeft", ff.clause), - applyTF("commRight", ff.clauseSet), applyTFNonStrict("commResidue", ff.clauseSet), - // at least one of the subformulas has to be a literal; - // otherwise, - // sorting is not likely to have any big effect - ifZero( - add(applyTF("commLeft", not(ff.literal)), - applyTF("commRight", rec(ff.andF, not(ff.literal)))), - longConst(100), longConst(-60)), - clausesSmallerThan("commRight", "commLeft", numbers) })); + SumFeature.createSum(applyTF("commLeft", ff.clause), + applyTF("commRight", ff.clauseSet), applyTFNonStrict("commResidue", ff.clauseSet), + // at least one of the subformulas has to be a literal; + // otherwise, + // sorting is not likely to have any big effect + ifZero( + add(applyTF("commLeft", not(ff.literal)), + applyTF("commRight", rec(ff.andF, not(ff.literal)))), + longConst(100), longConst(-60)), + clausesSmallerThan("commRight", "commLeft", numbers))); bindRuleSet(d, "cnf_andAssoc", - SumFeature.createSum(new Feature[] { applyTF("assoc0", ff.clauseSet), - applyTF("assoc1", ff.clauseSet), applyTF("assoc2", ff.clause), longConst(-10) })); + SumFeature.createSum(applyTF("assoc0", ff.clauseSet), + applyTF("assoc1", ff.clauseSet), applyTF("assoc2", ff.clause), longConst(-10))); bindRuleSet(d, "cnf_dist", - SumFeature.createSum(new Feature[] { applyTF("distRight0", ff.clauseSet), - applyTF("distRight1", ff.clauseSet), ifZero(applyTF("distLeft", ff.clause), - longConst(-15), applyTF("distLeft", ff.clauseSet)), - longConst(-35) })); + SumFeature.createSum(applyTF("distRight0", ff.clauseSet), + applyTF("distRight1", ff.clauseSet), ifZero(applyTF("distLeft", ff.clause), + longConst(-15), applyTF("distLeft", ff.clauseSet)), + longConst(-35))); final TermBuffer superFor = new TermBuffer(); final Feature onlyBelowQuanAndOr = @@ -1066,20 +1064,19 @@ private void setupQuantifierInstantiation(RuleSetDispatchFeature d) { .create(InstantiationCost.create(varInst), allowQuantifierSplitting()); bindRuleSet(d, "gamma", - SumFeature.createSum(new Feature[] { FocusInAntecFeature.INSTANCE, - applyTF(FocusProjection.create(0), - add(ff.quantifiedClauseSet, - instQuantifiersWithQueries() ? longTermConst(0) - : ff.notContainsExecutable)), - forEach(varInst, HeuristicInstantiation.INSTANCE, - add(instantiate("t", varInst), branchPrediction, longConst(10))) })); + SumFeature.createSum(FocusInAntecFeature.INSTANCE, + applyTF(FocusProjection.create(0), + add(ff.quantifiedClauseSet, + instQuantifiersWithQueries() ? longTermConst(0) + : ff.notContainsExecutable)), + forEach(varInst, HeuristicInstantiation.INSTANCE, + add(instantiate("t", varInst), branchPrediction, longConst(10))))); final TermBuffer splitInst = new TermBuffer(); bindRuleSet(d, "triggered", - SumFeature.createSum(new Feature[] { - forEach(splitInst, TriggeredInstantiations.create(true), - add(instantiateTriggeredVariable(splitInst), longConst(500))), - longConst(1500) })); + SumFeature.createSum(forEach(splitInst, TriggeredInstantiations.create(true), + add(instantiateTriggeredVariable(splitInst), longConst(500))), + longConst(1500))); } else { bindRuleSet(d, "gamma", inftyConst()); @@ -1173,41 +1170,41 @@ private void setupPolySimp(RuleSetDispatchFeature d, IntegerLDT numbers) { longConst(-100))); bindRuleSet(d, "polySimp_mulAssoc", - SumFeature.createSum(new Feature[] { applyTF("mulAssocMono0", tf.monomial), - applyTF("mulAssocMono1", tf.monomial), applyTF("mulAssocAtom", tf.atom), - longConst(-80) })); + SumFeature.createSum(applyTF("mulAssocMono0", tf.monomial), + applyTF("mulAssocMono1", tf.monomial), applyTF("mulAssocAtom", tf.atom), + longConst(-80))); bindRuleSet(d, "polySimp_addOrder", - SumFeature.createSum(new Feature[] { applyTF("commLeft", tf.monomial), - applyTF("commRight", tf.polynomial), - monSmallerThan("commRight", "commLeft", numbers), longConst(-60) })); + SumFeature.createSum(applyTF("commLeft", tf.monomial), + applyTF("commRight", tf.polynomial), + monSmallerThan("commRight", "commLeft", numbers), longConst(-60))); bindRuleSet(d, "polySimp_addAssoc", - SumFeature.createSum(new Feature[] { applyTF("addAssocPoly0", tf.polynomial), - applyTF("addAssocPoly1", tf.polynomial), applyTF("addAssocMono", tf.monomial), - longConst(-10) })); + SumFeature.createSum(applyTF("addAssocPoly0", tf.polynomial), + applyTF("addAssocPoly1", tf.polynomial), applyTF("addAssocMono", tf.monomial), + longConst(-10))); bindRuleSet(d, "polySimp_dist", - SumFeature.createSum(new Feature[] { applyTF("distSummand0", tf.polynomial), - applyTF("distSummand1", tf.polynomial), - ifZero(applyTF("distCoeff", tf.monomial), longConst(-15), - applyTF("distCoeff", tf.polynomial)), - applyTF("distSummand0", tf.polynomial), + SumFeature.createSum(applyTF("distSummand0", tf.polynomial), + applyTF("distSummand1", tf.polynomial), + ifZero(applyTF("distCoeff", tf.monomial), longConst(-15), + applyTF("distCoeff", tf.polynomial)), + applyTF("distSummand0", tf.polynomial), - applyTF("distSummand1", tf.polynomial), longConst(-35) })); + applyTF("distSummand1", tf.polynomial), longConst(-35))); // category "direct equations" bindRuleSet(d, "polySimp_balance", SumFeature - .createSum(new Feature[] { applyTF("sepResidue", tf.polynomial), - ifZero(isInstantiated("sepPosMono"), - add(applyTF("sepPosMono", tf.nonNegMonomial), - monSmallerThan("sepResidue", "sepPosMono", numbers))), - ifZero(isInstantiated("sepNegMono"), - add(applyTF("sepNegMono", tf.negMonomial), - monSmallerThan("sepResidue", "sepNegMono", numbers))), - longConst(-30) })); + .createSum(applyTF("sepResidue", tf.polynomial), + ifZero(isInstantiated("sepPosMono"), + add(applyTF("sepPosMono", tf.nonNegMonomial), + monSmallerThan("sepResidue", "sepPosMono", numbers))), + ifZero(isInstantiated("sepNegMono"), + add(applyTF("sepNegMono", tf.negMonomial), + monSmallerThan("sepResidue", "sepNegMono", numbers))), + longConst(-30))); bindRuleSet(d, "polySimp_normalise", add(applyTF("invertRight", tf.zeroLiteral), applyTF("invertLeft", tf.negMonomial), longConst(-30))); @@ -1368,13 +1365,13 @@ private void setupInEqSimp(RuleSetDispatchFeature d, IntegerLDT numbers) { bindRuleSet(d, "inEqSimp_antiSymm", longConst(-20)); bindRuleSet(d, "inEqSimp_exactShadow", - SumFeature.createSum(new Feature[] { applyTF("esLeft", tf.nonCoeffMonomial), - applyTFNonStrict("esCoeff2", tf.nonNegLiteral), applyTF("esRight2", tf.polynomial), - ifZero(MatchedIfFeature.INSTANCE, - SumFeature.createSum(applyTFNonStrict("esCoeff1", tf.nonNegLiteral), - applyTF("esRight1", tf.polynomial), - not(PolynomialValuesCmpFeature.leq(instOf("esRight2"), instOf("esRight1"), - instOfNonStrict("esCoeff1"), instOfNonStrict("esCoeff2"))))) })); + SumFeature.createSum(applyTF("esLeft", tf.nonCoeffMonomial), + applyTFNonStrict("esCoeff2", tf.nonNegLiteral), applyTF("esRight2", tf.polynomial), + ifZero(MatchedIfFeature.INSTANCE, + SumFeature.createSum(applyTFNonStrict("esCoeff1", tf.nonNegLiteral), + applyTF("esRight1", tf.polynomial), + not(PolynomialValuesCmpFeature.leq(instOf("esRight2"), instOf("esRight1"), + instOfNonStrict("esCoeff1"), instOfNonStrict("esCoeff2"))))))); // category "propagation" @@ -1427,22 +1424,22 @@ private void setupInEqSimp(RuleSetDispatchFeature d, IntegerLDT numbers) { // does not do any normalisation) bindRuleSet(d, "inEqSimp_and_contradInEqs", - SumFeature.createSum(new Feature[] { applyTF("contradLeft", tf.monomial), - applyTF("contradRightSmaller", tf.polynomial), - applyTF("contradRightBigger", tf.polynomial), PolynomialValuesCmpFeature - .lt(instOf("contradRightSmaller"), instOf("contradRightBigger")) })); + SumFeature.createSum(applyTF("contradLeft", tf.monomial), + applyTF("contradRightSmaller", tf.polynomial), + applyTF("contradRightBigger", tf.polynomial), PolynomialValuesCmpFeature + .lt(instOf("contradRightSmaller"), instOf("contradRightBigger")))); bindRuleSet(d, "inEqSimp_andOr_subsumption", - SumFeature.createSum(new Feature[] { applyTF("subsumLeft", tf.monomial), - applyTF("subsumRightSmaller", tf.polynomial), - applyTF("subsumRightBigger", tf.polynomial), PolynomialValuesCmpFeature - .leq(instOf("subsumRightSmaller"), instOf("subsumRightBigger")) })); + SumFeature.createSum(applyTF("subsumLeft", tf.monomial), + applyTF("subsumRightSmaller", tf.polynomial), + applyTF("subsumRightBigger", tf.polynomial), PolynomialValuesCmpFeature + .leq(instOf("subsumRightSmaller"), instOf("subsumRightBigger")))); bindRuleSet(d, "inEqSimp_and_subsumptionEq", - SumFeature.createSum(new Feature[] { applyTF("subsumLeft", tf.monomial), - applyTF("subsumRightSmaller", tf.polynomial), - applyTF("subsumRightBigger", tf.polynomial), PolynomialValuesCmpFeature - .lt(instOf("subsumRightSmaller"), instOf("subsumRightBigger")) })); + SumFeature.createSum(applyTF("subsumLeft", tf.monomial), + applyTF("subsumRightSmaller", tf.polynomial), + applyTF("subsumRightBigger", tf.polynomial), PolynomialValuesCmpFeature + .lt(instOf("subsumRightSmaller"), instOf("subsumRightBigger")))); final TermBuffer one = new TermBuffer(); one.setContent(getServices().getTermBuilder().zTerm("1")); @@ -1450,27 +1447,27 @@ private void setupInEqSimp(RuleSetDispatchFeature d, IntegerLDT numbers) { two.setContent(getServices().getTermBuilder().zTerm("2")); bindRuleSet(d, "inEqSimp_or_tautInEqs", - SumFeature.createSum(new Feature[] { applyTF("tautLeft", tf.monomial), - applyTF("tautRightSmaller", tf.polynomial), - applyTF("tautRightBigger", tf.polynomial), - PolynomialValuesCmpFeature.leq(instOf("tautRightSmaller"), - opTerm(numbers.getAdd(), one, instOf("tautRightBigger"))) })); + SumFeature.createSum(applyTF("tautLeft", tf.monomial), + applyTF("tautRightSmaller", tf.polynomial), + applyTF("tautRightBigger", tf.polynomial), + PolynomialValuesCmpFeature.leq(instOf("tautRightSmaller"), + opTerm(numbers.getAdd(), one, instOf("tautRightBigger"))))); bindRuleSet(d, "inEqSimp_or_weaken", - SumFeature.createSum(new Feature[] { applyTF("weakenLeft", tf.monomial), - applyTF("weakenRightSmaller", tf.polynomial), - applyTF("weakenRightBigger", tf.polynomial), - PolynomialValuesCmpFeature.eq( - opTerm(numbers.getAdd(), one, instOf("weakenRightSmaller")), - instOf("weakenRightBigger")) })); + SumFeature.createSum(applyTF("weakenLeft", tf.monomial), + applyTF("weakenRightSmaller", tf.polynomial), + applyTF("weakenRightBigger", tf.polynomial), + PolynomialValuesCmpFeature.eq( + opTerm(numbers.getAdd(), one, instOf("weakenRightSmaller")), + instOf("weakenRightBigger")))); bindRuleSet(d, "inEqSimp_or_antiSymm", - SumFeature.createSum(new Feature[] { applyTF("antiSymmLeft", tf.monomial), - applyTF("antiSymmRightSmaller", tf.polynomial), - applyTF("antiSymmRightBigger", tf.polynomial), - PolynomialValuesCmpFeature.eq( - opTerm(numbers.getAdd(), two, instOf("antiSymmRightSmaller")), - instOf("antiSymmRightBigger")) })); + SumFeature.createSum(applyTF("antiSymmLeft", tf.monomial), + applyTF("antiSymmRightSmaller", tf.polynomial), + applyTF("antiSymmRightBigger", tf.polynomial), + PolynomialValuesCmpFeature.eq( + opTerm(numbers.getAdd(), two, instOf("antiSymmRightSmaller")), + instOf("antiSymmRightBigger")))); } @@ -1561,17 +1558,16 @@ private void setupInEqSimpInstantiationWithoutRetry(RuleSetDispatchFeature d) { final TermBuffer divisor = new TermBuffer(); final TermBuffer dividend = new TermBuffer(); - bindRuleSet(d, "inEqSimp_nonLin_divide", SumFeature.createSum(new Feature[] { - applyTF("divProd", tf.nonCoeffMonomial), - applyTFNonStrict("divProdBoundNonPos", tf.nonPosLiteral), - applyTFNonStrict("divProdBoundNonNeg", tf.nonNegLiteral), - ifZero(MatchedIfFeature.INSTANCE, - let(divisor, instOf("divX"), let(dividend, instOf("divProd"), - SumFeature.createSum(applyTF(divisor, tf.nonCoeffMonomial), - not(eq(dividend, divisor)), applyTFNonStrict("divXBoundPos", tf.posLiteral), - applyTFNonStrict("divXBoundNeg", tf.negLiteral), - ReducibleMonomialsFeature.createReducible(dividend, divisor), instantiate( - "divY", ReduceMonomialsProjection.create(dividend, divisor)))))) })); + bindRuleSet(d, "inEqSimp_nonLin_divide", SumFeature.createSum(applyTF("divProd", tf.nonCoeffMonomial), + applyTFNonStrict("divProdBoundNonPos", tf.nonPosLiteral), + applyTFNonStrict("divProdBoundNonNeg", tf.nonNegLiteral), + ifZero(MatchedIfFeature.INSTANCE, + let(divisor, instOf("divX"), let(dividend, instOf("divProd"), + SumFeature.createSum(applyTF(divisor, tf.nonCoeffMonomial), + not(eq(dividend, divisor)), applyTFNonStrict("divXBoundPos", tf.posLiteral), + applyTFNonStrict("divXBoundNeg", tf.negLiteral), + ReducibleMonomialsFeature.createReducible(dividend, divisor), instantiate( + "divY", ReduceMonomialsProjection.create(dividend, divisor)))))))); setupNonLinTermIsPosNeg(d, "inEqSimp_nonLin_pos", true); setupNonLinTermIsPosNeg(d, "inEqSimp_nonLin_neg", false); @@ -1585,24 +1581,24 @@ private void setupNonLinTermIsPosNeg(RuleSetDispatchFeature d, String ruleSet, b bindRuleSet(d, ruleSet, SumFeature - .createSum(new Feature[] { applyTF("divProd", tf.nonCoeffMonomial), - applyTFNonStrict("divProdBoundPos", tf.posLiteral), - applyTFNonStrict("divProdBoundNeg", tf.negLiteral), - ifZero(MatchedIfFeature.INSTANCE, - let(divisor, instOf("divX"), let(dividend, instOf("divProd"), - SumFeature.createSum(applyTF(divisor, tf.nonCoeffMonomial), - not(applyTF(dividend, eq(divisor))), - applyTFNonStrict("divXBoundNonPos", tf.nonPosLiteral), - applyTFNonStrict("divXBoundNonNeg", tf.nonNegLiteral), - ReducibleMonomialsFeature.createReducible(dividend, divisor), - let(quotient, - ReduceMonomialsProjection.create(dividend, divisor), add( - sum(antecFor, SequentFormulasGenerator.antecedent(), - not(applyTF(antecFor, - pos ? opSub(tf.geq, eq(quotient), tf.posLiteral) - : opSub(tf.leq, eq(quotient), - tf.negLiteral)))), - instantiate("divY", quotient))))))) })); + .createSum(applyTF("divProd", tf.nonCoeffMonomial), + applyTFNonStrict("divProdBoundPos", tf.posLiteral), + applyTFNonStrict("divProdBoundNeg", tf.negLiteral), + ifZero(MatchedIfFeature.INSTANCE, + let(divisor, instOf("divX"), let(dividend, instOf("divProd"), + SumFeature.createSum(applyTF(divisor, tf.nonCoeffMonomial), + not(applyTF(dividend, eq(divisor))), + applyTFNonStrict("divXBoundNonPos", tf.nonPosLiteral), + applyTFNonStrict("divXBoundNonNeg", tf.nonNegLiteral), + ReducibleMonomialsFeature.createReducible(dividend, divisor), + let(quotient, + ReduceMonomialsProjection.create(dividend, divisor), add( + sum(antecFor, SequentFormulasGenerator.antecedent(), + not(applyTF(antecFor, + pos ? opSub(tf.geq, eq(quotient), tf.posLiteral) + : opSub(tf.leq, eq(quotient), + tf.negLiteral)))), + instantiate("divY", quotient))))))))); } private void setupSquaresAreNonNegative(RuleSetDispatchFeature d) { @@ -1733,18 +1729,18 @@ private void setupDefOpsPrimaryCategories(RuleSetDispatchFeature d) { // the axiom defining division only has to be inserted once, because // it adds equations to the antecedent bindRuleSet(d, "defOps_div", - SumFeature.createSum(new Feature[] { NonDuplicateAppModPositionFeature.INSTANCE, - applyTF("divNum", tf.polynomial), applyTF("divDenom", tf.polynomial), - applyTF("divNum", tf.notContainsDivMod), - applyTF("divDenom", tf.notContainsDivMod), - ifZero(isBelow(ff.modalOperator), longConst(200)) })); + SumFeature.createSum(NonDuplicateAppModPositionFeature.INSTANCE, + applyTF("divNum", tf.polynomial), applyTF("divDenom", tf.polynomial), + applyTF("divNum", tf.notContainsDivMod), + applyTF("divDenom", tf.notContainsDivMod), + ifZero(isBelow(ff.modalOperator), longConst(200)))); bindRuleSet(d, "defOps_jdiv", - SumFeature.createSum(new Feature[] { NonDuplicateAppModPositionFeature.INSTANCE, - applyTF("divNum", tf.polynomial), applyTF("divDenom", tf.polynomial), - applyTF("divNum", tf.notContainsDivMod), - applyTF("divDenom", tf.notContainsDivMod), - ifZero(isBelow(ff.modalOperator), longConst(200)) })); + SumFeature.createSum(NonDuplicateAppModPositionFeature.INSTANCE, + applyTF("divNum", tf.polynomial), applyTF("divDenom", tf.polynomial), + applyTF("divNum", tf.notContainsDivMod), + applyTF("divDenom", tf.notContainsDivMod), + ifZero(isBelow(ff.modalOperator), longConst(200)))); bindRuleSet(d, "defOps_jdiv_inline", add(applyTF("divNum", tf.literal), applyTF("divDenom", tf.polynomial), longConst(-5000))); @@ -1828,19 +1824,18 @@ private void setupDivModDivision(RuleSetDispatchFeature d) { MultiplesModEquationsGenerator.create(numTerm, denomLC), checkCoeffE))); bindRuleSet(d, "defOps_divModPullOut", - SumFeature.createSum(new Feature[] { - not(add(applyTF("divNum", tf.literal), applyTF("divDenom", tf.literal))), - applyTF("divNum", tf.polynomial), applyTF("divDenom", tf.polynomial), - ifZero(applyTF("divDenom", tf.addF), - let(denomLC, sub(instOf("divDenom"), 1), not(isReduciblePoly)), - let(denomLC, instOf("divDenom"), ifZero(isReduciblePoly, - // no possible division - // has been found so far - add(NotInScopeOfModalityFeature.INSTANCE, ifZero(isReduciblePolyE, - // try again - // later - longConst(-POLY_DIVISION_COST)))))), - longConst(100) })); + SumFeature.createSum(not(add(applyTF("divNum", tf.literal), applyTF("divDenom", tf.literal))), + applyTF("divNum", tf.polynomial), applyTF("divDenom", tf.polynomial), + ifZero(applyTF("divDenom", tf.addF), + let(denomLC, sub(instOf("divDenom"), 1), not(isReduciblePoly)), + let(denomLC, instOf("divDenom"), ifZero(isReduciblePoly, + // no possible division + // has been found so far + add(NotInScopeOfModalityFeature.INSTANCE, ifZero(isReduciblePolyE, + // try again + // later + longConst(-POLY_DIVISION_COST)))))), + longConst(100))); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/RuleAppContainer.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/RuleAppContainer.java index e42d9f259ea..7f1385ae3c5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/RuleAppContainer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/RuleAppContainer.java @@ -84,15 +84,15 @@ public static RuleAppContainer createAppContainer(RuleApp p_app, PosInOccurrence */ public static ImmutableList createAppContainers( ImmutableList rules, PosInOccurrence pos, Goal goal) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (rules.size() == 1) { result = result.prepend(createAppContainer(rules.head(), pos, goal)); } else if (rules.size() > 1) { ImmutableList tacletApplications = - ImmutableSLList.nil(); + ImmutableSLList.nil(); ImmutableList builtInRuleApplications = - ImmutableSLList.nil(); + ImmutableSLList.nil(); for (RuleApp rule : rules) { if (rule instanceof NoPosTacletApp) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/TacletAppContainer.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/TacletAppContainer.java index 06c405d45ef..487dbd2e4b9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/TacletAppContainer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/TacletAppContainer.java @@ -182,7 +182,7 @@ protected static ImmutableList createInitialAppContainers( costs.add(p_goal.getGoalStrategy().computeCost(app, p_pio, p_goal)); } - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (RuleAppCost cost : costs) { final TacletAppContainer container = createContainer(p_app.head(), p_pio, p_goal, cost, true); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/InfFlowContractAppFeature.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/InfFlowContractAppFeature.java index d1eede89ef8..99972353359 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/InfFlowContractAppFeature.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/InfFlowContractAppFeature.java @@ -79,7 +79,7 @@ protected boolean sameApplication(RuleApp ruleCmp, TacletApp newApp, PosInOccurr if (!(cmp instanceof PosTacletApp)) { return false; } - final PosInOccurrence oldPio = ((PosTacletApp) cmp).posInOccurrence(); + final PosInOccurrence oldPio = cmp.posInOccurrence(); if (!comparePio(newApp, cmp, newPio, oldPio)) { return false; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/SmallerThanFeature.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/SmallerThanFeature.java index e4c52ac6f50..71620c444d6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/SmallerThanFeature.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/feature/SmallerThanFeature.java @@ -46,7 +46,7 @@ protected final boolean lessThan(ImmutableList list1, ImmutableList protected abstract static class Collector { - private ImmutableList terms = ImmutableSLList.nil(); + private ImmutableList terms = ImmutableSLList.nil(); protected void addTerm(Term mon) { terms = terms.prepend(mon); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/BasicMatching.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/BasicMatching.java index 50f88b6dd01..3477aedc8ea 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/BasicMatching.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/BasicMatching.java @@ -24,7 +24,7 @@ private BasicMatching() {} * @return all substitution found from this matching */ static ImmutableSet getSubstitutions(Term trigger, Term targetTerm) { - ImmutableSet allsubs = DefaultImmutableSet.nil(); + ImmutableSet allsubs = DefaultImmutableSet.nil(); if (targetTerm.freeVars().size() > 0 || targetTerm.op() instanceof Quantifier) return allsubs; final Substitution subst = match(trigger, targetTerm); @@ -46,7 +46,7 @@ static ImmutableSet getSubstitutions(Term trigger, Term targetTerm */ private static Substitution match(Term pattern, Term instance) { final ImmutableMap map = - matchRec(DefaultImmutableMap.nilMap(), pattern, instance); + matchRec(DefaultImmutableMap.nilMap(), pattern, instance); if (map == null) return null; return new Substitution(map); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ClausesGraph.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ClausesGraph.java index e7de2cd8605..86372197714 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ClausesGraph.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ClausesGraph.java @@ -127,7 +127,7 @@ private void buildInitialGraph() { * @return set of term that connect to formula. */ private ImmutableSet directConnections(Term formula) { - ImmutableSet res = DefaultImmutableSet.nil(); + ImmutableSet res = DefaultImmutableSet.nil(); for (Term clause1 : clauses) { final Term clause = clause1; if (directlyConnected(clause, formula)) @@ -179,7 +179,7 @@ private ImmutableSet existentialVars(Term formula) { return existentialVars(formula.sub(0)); if (op == Quantifier.EX) return existentialVars(formula.sub(0)).add(formula.varsBoundHere(0).last()); - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } /** @@ -198,7 +198,7 @@ private ImmutableSet intersectQV(ImmutableSet intersect(ImmutableSet set0, ImmutableSet set1) { - ImmutableSet res = DefaultImmutableSet.nil(); + ImmutableSet res = DefaultImmutableSet.nil(); if (set0 == null || set1 == null) return res; for (Term aSet0 : set0) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/EqualityConstraint.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/EqualityConstraint.java index ef1591882a3..74288e2372f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/EqualityConstraint.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/EqualityConstraint.java @@ -72,7 +72,7 @@ public static ImmutableSet metaVars(Term t) { return mvCache.get(t); } - ImmutableSet metaVars = DefaultImmutableSet.nil(); + ImmutableSet metaVars = DefaultImmutableSet.nil(); Operator op = t.op(); @@ -502,8 +502,8 @@ && compareBoundVariables((QuantifiableVariable) t0.op(), * modified. Constraint.TOP is always returned for ununifiable terms */ private Constraint unifyHelp(Term t1, Term t2, boolean modifyThis, TermServices services) { - return unifyHelp(t1, t2, ImmutableSLList.nil(), - ImmutableSLList.nil(), null, modifyThis, services); + return unifyHelp(t1, t2, ImmutableSLList.nil(), + ImmutableSLList.nil(), null, modifyThis, services); } @@ -691,8 +691,8 @@ private Constraint joinHelp(EqualityConstraint co, TermServices services) { * @return a boolean that is true iff. adding a mapping (mv,term) would cause a cycle */ private boolean hasCycle(Metavariable mv, Term term) { - ImmutableList body = ImmutableSLList.nil(); - ImmutableList fringe = ImmutableSLList.nil(); + ImmutableList body = ImmutableSLList.nil(); + ImmutableList fringe = ImmutableSLList.nil(); Term checkForCycle = term; while (true) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/Instantiation.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/Instantiation.java index ec758793cbf..620518dfe3c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/Instantiation.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/Instantiation.java @@ -35,7 +35,7 @@ class Instantiation { /** * Literals occurring in the sequent at hand. This is used for branch prediction */ - private ImmutableSet assumedLiterals = DefaultImmutableSet.nil(); + private ImmutableSet assumedLiterals = DefaultImmutableSet.nil(); /** HashMap from instance(Term) to cost Long */ private final Map instancesWithCosts = new LinkedHashMap(); @@ -71,7 +71,7 @@ static Instantiation create(Term qf, Sequent seq, Services services) { } private static ImmutableSet sequentToTerms(Sequent seq) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); for (final SequentFormula cf : seq) { res = res.prepend(cf.formula()); } @@ -97,7 +97,7 @@ private void addInstances(ImmutableSet terms, Services services) { private void addArbitraryInstance(Services services) { ImmutableMap varMap = - DefaultImmutableMap.nilMap(); + DefaultImmutableMap.nilMap(); for (QuantifiableVariable quantifiableVariable : triggersSet.getUniQuantifiedVariables()) { final QuantifiableVariable v = quantifiableVariable; @@ -182,7 +182,7 @@ private RuleAppCost computeCostHelp(Term inst) { /** get all instances from instancesCostCache subsCache */ ImmutableSet getSubstitution() { - ImmutableSet res = DefaultImmutableSet.nil(); + ImmutableSet res = DefaultImmutableSet.nil(); for (final Term inst : instancesWithCosts.keySet()) { res = res.add(inst); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/PredictCostProver.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/PredictCostProver.java index b9695a4cb07..ab7bbf8639f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/PredictCostProver.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/PredictCostProver.java @@ -64,7 +64,7 @@ private void initClauses(Term instance) { } private ImmutableSet> createClause(ImmutableSet set) { - final ImmutableSet> nil = DefaultImmutableSet.>nil(); + final ImmutableSet> nil = DefaultImmutableSet.nil(); ImmutableSet> res = nil.add(DefaultImmutableSet.nil()); for (Term t : set) { ImmutableSet> tmp = nil; @@ -243,7 +243,7 @@ private long firstRefine() { private class Clause implements Iterable { /** all literals contains in this clause */ - private ImmutableSet literals = DefaultImmutableSet.nil(); + private ImmutableSet literals = DefaultImmutableSet.nil(); public Clause(ImmutableSet lits) { literals = lits; @@ -302,7 +302,7 @@ public void firstRefine() { * that can't be removed by refining */ public ImmutableSet refine(Iterable assertLits) { - ImmutableSet res = DefaultImmutableSet.nil(); + ImmutableSet res = DefaultImmutableSet.nil(); for (final Term lit : this) { final Operator op = proveLiteral(lit, assertLits).op(); if (op == Junctor.TRUE) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ReplacerOfQuanVariablesWithMetavariables.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ReplacerOfQuanVariablesWithMetavariables.java index 594d11a5675..aba690306b2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ReplacerOfQuanVariablesWithMetavariables.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/ReplacerOfQuanVariablesWithMetavariables.java @@ -24,7 +24,7 @@ private ReplacerOfQuanVariablesWithMetavariables() {} public static Substitution createSubstitutionForVars(Term allTerm, TermServices services) { ImmutableMap res = - DefaultImmutableMap.nilMap(); + DefaultImmutableMap.nilMap(); Term t = allTerm; Operator op = t.op(); while (op instanceof Quantifier) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/SplittableQuantifiedFormulaFeature.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/SplittableQuantifiedFormulaFeature.java index 37982cf2a8b..c67f0215308 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/SplittableQuantifiedFormulaFeature.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/SplittableQuantifiedFormulaFeature.java @@ -40,7 +40,7 @@ else if (analyser.binOp == Junctor.OR) private static class Analyser { public ImmutableSet existentialVars = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); public Operator binOp; public Term left, right; diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggerUtils.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggerUtils.java index 064c8f65431..c72be617555 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggerUtils.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggerUtils.java @@ -45,7 +45,7 @@ public static ImmutableSet setByOperator(Term term, Operator op) { */ public static ImmutableSet intersect( ImmutableSet set0, ImmutableSet set1) { - ImmutableSet res = DefaultImmutableSet.nil(); + ImmutableSet res = DefaultImmutableSet.nil(); for (QuantifiableVariable aSet0 : set0) { final QuantifiableVariable el = aSet0; if (set1.contains(el)) diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggersSet.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggersSet.java index c9f851c20e5..587f52cff2c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggersSet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TriggersSet.java @@ -35,7 +35,7 @@ public class TriggersSet { /** Quantified formula of PCNF */ private final Term allTerm; /** all Triggers for allTerm */ - private ImmutableSet allTriggers = DefaultImmutableSet.nil(); + private ImmutableSet allTriggers = DefaultImmutableSet.nil(); /** * a HashMap from Term to Trigger which stores different * subterms of allTerm with its according trigger @@ -88,7 +88,7 @@ private ImmutableSet getAllUQS(Term allterm) { if (op == Quantifier.EX) { return getAllUQS(allterm.sub(0)); } - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } /** @@ -160,7 +160,7 @@ private class ClauseTrigger { * elements which are uni-trigges and will be used to construct several multi-triggers for * clause */ - private ImmutableSet elementsOfMultiTrigger = DefaultImmutableSet.nil(); + private ImmutableSet elementsOfMultiTrigger = DefaultImmutableSet.nil(); public ClauseTrigger(Term clause) { this.clause = clause; @@ -378,7 +378,7 @@ private Set> setMultiTriggers(Iterator ts) { */ private boolean addMultiTrigger(ImmutableSet trs) { ImmutableSet mulqvs = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); for (Trigger tr : trs) { mulqvs = mulqvs.union(tr.getTriggerTerm().freeVars()); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TwoSidedMatching.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TwoSidedMatching.java index d590f6b59b8..8f670065826 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TwoSidedMatching.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/TwoSidedMatching.java @@ -64,13 +64,13 @@ class TwoSidedMatching { ImmutableSet getSubstitutions(Services services) { if (triggerWithMVs == null || targetWithMVs == null) { // non ground subs not supported yet - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } return getAllSubstitutions(targetWithMVs, services); } private ImmutableSet getAllSubstitutions(Term target, Services services) { - ImmutableSet allsubs = DefaultImmutableSet.nil(); + ImmutableSet allsubs = DefaultImmutableSet.nil(); Substitution sub = match(triggerWithMVs, target, services); if (sub != null && (trigger.isElementOfMultitrigger() || sub.isTotalOn(trigger.getUniVariables()) @@ -93,7 +93,7 @@ private Substitution match(Term triggerTerm, Term targetTerm, Services services) final Constraint c = Constraint.BOTTOM.unify(targetTerm, triggerTerm, services); if (c.isSatisfiable()) { ImmutableMap sub = - DefaultImmutableMap.nilMap(); + DefaultImmutableMap.nilMap(); for (QuantifiableVariable quantifiableVariable : trigger.getUniVariables()) { QuantifiableVariable q = quantifiableVariable; Term mv = triggerSubstWithMVs.getSubstitutedTerm(q); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/UniTrigger.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/UniTrigger.java index 536a7bf6595..378e1e2ade9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/UniTrigger.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/UniTrigger.java @@ -39,7 +39,7 @@ class UniTrigger implements Trigger { public ImmutableSet getSubstitutionsFromTerms(ImmutableSet targetTerm, Services services) { - ImmutableSet allsubs = DefaultImmutableSet.nil(); + ImmutableSet allsubs = DefaultImmutableSet.nil(); for (Term aTargetTerm : targetTerm) allsubs = allsubs.union(getSubstitutionsFromTerm(aTargetTerm, services)); return allsubs; @@ -55,7 +55,7 @@ private ImmutableSet getSubstitutionsFromTerm(Term t, Services ser } private ImmutableSet getSubstitutionsFromTermHelp(Term t, Services services) { - ImmutableSet newSubs = DefaultImmutableSet.nil(); + ImmutableSet newSubs = DefaultImmutableSet.nil(); if (t.freeVars().size() > 0 || t.op() instanceof Quantifier) newSubs = Matching.twoSidedMatching(this, t, services); else if (!onlyUnify) @@ -128,8 +128,8 @@ private static boolean containsLoop(Substitution subst) { */ private static boolean containsLoop(ImmutableMap varMap, QuantifiableVariable var) { - ImmutableList body = ImmutableSLList.nil(); - ImmutableList fringe = ImmutableSLList.nil(); + ImmutableList body = ImmutableSLList.nil(); + ImmutableList fringe = ImmutableSLList.nil(); Term checkForCycle = varMap.get(var); if (checkForCycle.op() == var) diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/MultiplesModEquationsGenerator.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/MultiplesModEquationsGenerator.java index b25cab380c7..59953c6237b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/MultiplesModEquationsGenerator.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/MultiplesModEquationsGenerator.java @@ -78,7 +78,7 @@ private Iterator toIterator(Term quotient) { */ private ImmutableList computeMultiples(Monomial sourceM, Monomial targetM, List cofactorPolys, Services services) { - ImmutableList res = ImmutableSLList.nil(); + ImmutableList res = ImmutableSLList.nil(); final List cofactorMonos = new ArrayList(); cofactorMonos.add(new CofactorMonomial(targetM, Polynomial.ONE)); diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/TriggeredInstantiations.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/TriggeredInstantiations.java index 53e92f4cc07..7a26c9bd045 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/TriggeredInstantiations.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/termgenerator/TriggeredInstantiations.java @@ -46,7 +46,7 @@ public static TermGenerator create(boolean skipConditions) { private Sequent last = Sequent.EMPTY_SEQUENT; private Set lastCandidates = new HashSet(); - private ImmutableSet lastAxioms = DefaultImmutableSet.nil(); + private ImmutableSet lastAxioms = DefaultImmutableSet.nil(); private boolean checkConditions; @@ -71,7 +71,7 @@ public Iterator generate(RuleApp app, PosInOccurrence pos, Goal goal) { final Set terms; final Set axiomSet; - ImmutableSet axioms = DefaultImmutableSet.nil(); + ImmutableSet axioms = DefaultImmutableSet.nil(); final Sequent seq = goal.sequent(); @@ -166,7 +166,7 @@ private boolean isAvoidConditionProvable(Term cond, ImmutableSet axioms, Services services) { long cost = PredictCostProver.computerInstanceCost( - new Substitution(DefaultImmutableMap.nilMap()), cond, + new Substitution(DefaultImmutableMap.nilMap()), cond, axioms, services); return cost == -1; } @@ -207,7 +207,7 @@ private HashSet computeInstances(Services services, final Term comprehensi private ImmutableList instantiateConditions(Services services, TacletApp app, final Term middle) { ImmutableList conditions; - conditions = ImmutableSLList.nil(); + conditions = ImmutableSLList.nil(); for (Term singleAvoidCond : app.taclet().getTrigger().getAvoidConditions()) { conditions = conditions.append(instantiateTerm(singleAvoidCond, services, app.instantiations() diff --git a/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/EmptyEnvInput.java b/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/EmptyEnvInput.java index 61b60fefec9..aeb35b226e5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/EmptyEnvInput.java +++ b/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/EmptyEnvInput.java @@ -13,7 +13,7 @@ public class EmptyEnvInput extends AbstractEnvInput { public EmptyEnvInput(Profile profile) { - super("empty dummy environment", null, Collections.emptyList(), null, profile, null); + super("empty dummy environment", null, Collections.emptyList(), null, profile, null); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/TacletLoader.java b/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/TacletLoader.java index 094d437c4bb..e3299fa7d1d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/TacletLoader.java +++ b/key.core/src/main/java/de/uka/ilkd/key/taclettranslation/lemma/TacletLoader.java @@ -78,7 +78,7 @@ public TacletLoader(ProgressMonitor monitor, ProblemInitializerListener listener public void manageAvailableTaclets(InitConfig initConfig, Taclet tacletToProve) { ImmutableList sysTaclets = initConfig.getTaclets(); - ImmutableList newTaclets = ImmutableSLList.nil(); + ImmutableList newTaclets = ImmutableSLList.nil(); HashMap> map = initConfig.getTaclet2Builder(); boolean tacletfound = false; for (Taclet taclet : sysTaclets) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/util/HelperClassForTests.java b/key.core/src/main/java/de/uka/ilkd/key/util/HelperClassForTests.java index 5ec85ac3a8b..0a9d3106c73 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/util/HelperClassForTests.java +++ b/key.core/src/main/java/de/uka/ilkd/key/util/HelperClassForTests.java @@ -55,7 +55,7 @@ public class HelperClassForTests { @Override public RuleCollection getStandardRules() { return new RuleCollection(RuleSourceFactory.fromDefaultLocation(ldtFile), - ImmutableSLList.nil()); + ImmutableSLList.nil()); } }; diff --git a/key.core/src/main/java/de/uka/ilkd/key/util/InfFlowSpec.java b/key.core/src/main/java/de/uka/ilkd/key/util/InfFlowSpec.java index 7f8f5cfba46..b22cf7cebbc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/util/InfFlowSpec.java +++ b/key.core/src/main/java/de/uka/ilkd/key/util/InfFlowSpec.java @@ -42,8 +42,8 @@ public InfFlowSpec map(UnaryOperator op) { } private InfFlowSpec() { - this.preExpressions = ImmutableSLList.nil(); - this.postExpressions = ImmutableSLList.nil(); - this.newObjects = ImmutableSLList.nil(); + this.preExpressions = ImmutableSLList.nil(); + this.postExpressions = ImmutableSLList.nil(); + this.newObjects = ImmutableSLList.nil(); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/util/MiscTools.java b/key.core/src/main/java/de/uka/ilkd/key/util/MiscTools.java index 7ff2c557905..ed9139c6822 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/util/MiscTools.java +++ b/key.core/src/main/java/de/uka/ilkd/key/util/MiscTools.java @@ -98,10 +98,10 @@ public static Optional getSpecForTermWithLoopStmt(final Term final ProgramElement pe = loopTerm.javaBlock().program(); assert pe != null; assert pe instanceof StatementBlock; - assert ((StatementBlock) pe).getFirstElement() instanceof LoopStatement; + assert pe.getFirstElement() instanceof LoopStatement; final LoopStatement loop = // - (LoopStatement) ((StatementBlock) pe).getFirstElement(); + (LoopStatement) pe.getFirstElement(); return Optional.ofNullable(services.getSpecificationRepository().getLoopSpec(loop)); } @@ -579,13 +579,13 @@ private static final class ReadPVCollector extends JavaASTVisitor { /** * The list of resulting (i.e., read) program variables. */ - private ImmutableSet result = DefaultImmutableSet.nil(); + private ImmutableSet result = DefaultImmutableSet.nil(); /** * The declared program variables. */ private ImmutableSet declaredPVs = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); public ReadPVCollector(ProgramElement root, Services services) { super(root, services); @@ -619,13 +619,13 @@ private static class WrittenAndDeclaredPVCollector extends JavaASTVisitor { * The written program variables. */ private ImmutableSet writtenPVs = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); /** * The declared program variables. */ private ImmutableSet declaredPVs = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); public WrittenAndDeclaredPVCollector(ProgramElement root, Services services) { super(root, services); @@ -662,7 +662,7 @@ public ImmutableSet getDeclaredPVs() { } public static ImmutableList toTermList(Iterable list, TermBuilder tb) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (ProgramVariable pv : list) { if (pv != null) { Term t = tb.var(pv); @@ -691,7 +691,7 @@ public static String toString(InputStream is) throws IOException { public static ImmutableList filterOutDuplicates(ImmutableList localIns, ImmutableList localOuts) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (Term localIn : localIns) { if (!localOuts.contains(localIn)) { result = result.append(localIn); diff --git a/key.core/src/main/java/de/uka/ilkd/key/util/mergerule/MergeRuleUtils.java b/key.core/src/main/java/de/uka/ilkd/key/util/mergerule/MergeRuleUtils.java index 5483e1248f8..5bb058b7360 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/util/mergerule/MergeRuleUtils.java +++ b/key.core/src/main/java/de/uka/ilkd/key/util/mergerule/MergeRuleUtils.java @@ -637,7 +637,7 @@ public static LocationVariable getBranchUniqueLocVar(LocationVariable var, Node int newCounter = 0; String branchUniqueName = base; Iterable progVars = intrNode.getLocalProgVars(); - while (!isUniqueInGlobals(branchUniqueName.toString(), progVars) + while (!isUniqueInGlobals(branchUniqueName, progVars) || (lookupVarInNS(branchUniqueName, services) != null && !lookupVarInNS(branchUniqueName, services).sort().equals(var.sort()))) { newCounter += 1; @@ -854,7 +854,7 @@ public static boolean equalsModBranchUniqueRenaming(SourceElement se1, SourceEle } LocVarReplBranchUniqueMap replMap = - new LocVarReplBranchUniqueMap(node, DefaultImmutableSet.nil()); + new LocVarReplBranchUniqueMap(node, DefaultImmutableSet.nil()); ProgVarReplaceVisitor replVisitor1 = new ProgVarReplaceVisitor((ProgramElement) se1, replMap, services); diff --git a/key.core/src/test/java/de/uka/ilkd/key/logic/TestName.java b/key.core/src/test/java/de/uka/ilkd/key/logic/TestName.java index a9333afdb9a..7933d711f1f 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/logic/TestName.java +++ b/key.core/src/test/java/de/uka/ilkd/key/logic/TestName.java @@ -8,7 +8,7 @@ public class TestName { @Test public void testEquals() { Name n = new Name("test"); - Name m = new Name(new String("test")); + Name m = new Name("test"); assertEquals(n, m); } } diff --git a/key.core/src/test/java/de/uka/ilkd/key/rule/TacletForTests.java b/key.core/src/test/java/de/uka/ilkd/key/rule/TacletForTests.java index 89bd0e9639f..b9bf5ad381a 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/rule/TacletForTests.java +++ b/key.core/src/test/java/de/uka/ilkd/key/rule/TacletForTests.java @@ -56,7 +56,7 @@ private TacletForTests() { // library (HACK) public RuleCollection getStandardRules() { return new RuleCollection(RuleSourceFactory.fromDefaultLocation(ldtFile), - ImmutableSLList.nil()); + ImmutableSLList.nil()); } }; diff --git a/key.ui/src/main/java/de/uka/ilkd/key/core/Main.java b/key.ui/src/main/java/de/uka/ilkd/key/core/Main.java index 64cf55d3cd2..f22aff874cf 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/core/Main.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/core/Main.java @@ -559,7 +559,6 @@ private static void updateSplashScreen() { try { final java.awt.SplashScreen sp = java.awt.SplashScreen.getSplashScreen(); if (sp == null) { - return; // insert customization code here // see http://docs.oracle.com/javase/tutorial/uiswing/misc/splashscreen.html } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractExternalCompletion.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractExternalCompletion.java index 2e1c280b763..d92dfdcd28d 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractExternalCompletion.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractExternalCompletion.java @@ -53,7 +53,7 @@ public IBuiltInRuleApp complete(final IBuiltInRuleApp application, final Goal go if (configurator.wasSuccessful()) { final List heaps = HeapContext.getModHeaps(services, instantiation.isTransactional()); - result.update((StatementBlock) instantiation.statement, configurator.getContract(), + result.update(instantiation.statement, configurator.getContract(), heaps); } return result; diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractInternalCompletion.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractInternalCompletion.java index 0accb3c2d10..e988d06f5f9 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractInternalCompletion.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/BlockContractInternalCompletion.java @@ -53,7 +53,7 @@ public IBuiltInRuleApp complete(final IBuiltInRuleApp application, final Goal go if (configurator.wasSuccessful()) { final List heaps = HeapContext.getModHeaps(services, instantiation.isTransactional()); - result.update((StatementBlock) instantiation.statement, configurator.getContract(), + result.update(instantiation.statement, configurator.getContract(), heaps); } return result; diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/ContractSelectionPanel.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/ContractSelectionPanel.java index c6c80e790d8..e275202196c 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/ContractSelectionPanel.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/ContractSelectionPanel.java @@ -305,7 +305,7 @@ public static Contract computeContract(Services services, List selecti return selection.get(0); } else { ImmutableSet contracts = - DefaultImmutableSet.nil(); + DefaultImmutableSet.nil(); for (Contract contract : selection) { if (contract instanceof FunctionalOperationContract) { contracts = contracts.add((FunctionalOperationContract) contract); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/InfoTreeModel.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/InfoTreeModel.java index b9bd88b13a4..d444303e15f 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/InfoTreeModel.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/InfoTreeModel.java @@ -163,7 +163,7 @@ private int getChildCount(InfoTreeNode root) { */ private void insertAndGroup(InfoTreeNode ins, InfoTreeNode parent, Properties ruleExplanations) { - InfoTreeNode insNode = (InfoTreeNode) ins; + InfoTreeNode insNode = ins; if (parent.getChildCount() > 0) { InfoTreeNode lastNode = (InfoTreeNode) parent.getChildAt(parent.getChildCount() - 1); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/InspectorForDecisionPredicates.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/InspectorForDecisionPredicates.java index ae13ebe9b5e..dcf175335ea 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/InspectorForDecisionPredicates.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/InspectorForDecisionPredicates.java @@ -72,7 +72,7 @@ public String check(String toBeChecked) { public static Term translate(Services services, String toBeChecked) { try { - return new KeyIO(services).parseExpression((String) toBeChecked); + return new KeyIO(services).parseExpression(toBeChecked); } catch (Throwable e) { return null; } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofManagementDialog.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofManagementDialog.java index 0c28bd43f8f..c3ffc650fe1 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofManagementDialog.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofManagementDialog.java @@ -530,15 +530,15 @@ private void updateContractPanel() { pan.setGrayOutAuxiliaryContracts(Objects.equals( targetIcons.get(new Pair<>(entry.kjt, entry.target)), keyClosedIcon)); } else { - pan.setContracts(DefaultImmutableSet.nil(), "Contracts"); + pan.setContracts(DefaultImmutableSet.nil(), "Contracts"); } } else if (pan == contractPanelByProof) { if (proofList.getSelectedValue() != null) { - final Proof p = ((ProofWrapper) proofList.getSelectedValue()).proof; + final Proof p = proofList.getSelectedValue().proof; final ImmutableSet usedContracts = p.mgt().getUsedContracts(); pan.setContracts(usedContracts, "Contracts used in proof \"" + p.name() + "\""); } else { - pan.setContracts(DefaultImmutableSet.nil(), "Contracts"); + pan.setContracts(DefaultImmutableSet.nil(), "Contracts"); } } updateStartButton(); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java index 4b76dee0d60..fcbcbdcdfc4 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java @@ -73,10 +73,8 @@ public RecentFileMenu(final KeYMediator mediator) { Path proofPath = ProofSelectionDialog.chooseProofToLoad(file.toPath()); if (proofPath == null) { // canceled by user! - return; } else { mediator.getUI().loadProofFromBundle(file, proofPath.toFile()); - return; } } else { mediator.getUI().loadProblem(file); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/OpenMostRecentFileAction.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/OpenMostRecentFileAction.java index 32df0ecf088..2c778802050 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/OpenMostRecentFileAction.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/OpenMostRecentFileAction.java @@ -41,7 +41,6 @@ public void actionPerformed(ActionEvent e) { Path proofPath = ProofSelectionDialog.chooseProofToLoad(file.toPath()); if (proofPath == null) { // canceled by user - return; } else { mainWindow.loadProofFromBundle(file, proofPath.toFile()); } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/CurrentGoalViewMenu.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/CurrentGoalViewMenu.java index ba22d996cc5..53fdbeea306 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/CurrentGoalViewMenu.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/CurrentGoalViewMenu.java @@ -129,7 +129,7 @@ private static ImmutableList removeIntroduceAxiomTaclet( * @return list without RewriteTaclets */ public static ImmutableList removeRewrites(ImmutableList list) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); Iterator it = list.iterator(); while (it.hasNext()) { @@ -330,7 +330,7 @@ private void createFocussedAutoModeMenu(MenuControl control) { */ public static ImmutableList sort(ImmutableList finds, TacletAppComparator comp) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); List list = new ArrayList(finds.size()); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/DragNDropInstantiator.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/DragNDropInstantiator.java index 5f528dd95a3..6bc86aba4f7 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/DragNDropInstantiator.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/DragNDropInstantiator.java @@ -178,7 +178,7 @@ private ImmutableList getAllApplicableApps(final PosInSequent sour final Sequent sequent = seqView.getMediator().getSelectedGoal().sequent(); - ImmutableList applicableApps = ImmutableSLList.nil(); + ImmutableList applicableApps = ImmutableSLList.nil(); if (targetPos.isSequent()) { // collects all applicable taclets at the source position // which have an addrule section @@ -214,7 +214,7 @@ private ImmutableList getAllApplicableApps(final PosInSequent sour private ImmutableList getDirectionDependentApps(final PosInSequent sourcePos, final PosInSequent targetPos, final Services services, final Sequent sequent) { - ImmutableList applicableApps = ImmutableSLList.nil(); + ImmutableList applicableApps = ImmutableSLList.nil(); // all applicable taclets where the drag source has been interpreted // as // the find part and the drop position as the one of the @@ -280,10 +280,10 @@ private ImmutableList getApplicableTaclets(PosInSequent findPos, TacletFilter filter, Services services) { if (findPos == null || findPos.isSequent()) { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } - ImmutableList allTacletsAtFindPosition = ImmutableSLList.nil(); + ImmutableList allTacletsAtFindPosition = ImmutableSLList.nil(); KeYMediator r = seqView.getMediator(); // if in replaceWithMode only apps that contain at least one replacewith @@ -311,7 +311,7 @@ private ImmutableList getApplicableTaclets(PosInSequent findPos, private ImmutableList addPositionInformation(ImmutableList tacletApps, PosInOccurrence findPos, Services services) { - ImmutableList applicableApps = ImmutableSLList.nil(); + ImmutableList applicableApps = ImmutableSLList.nil(); for (TacletApp tacletApp : tacletApps) { TacletApp app = tacletApp; if (app instanceof NoPosTacletApp) { @@ -339,7 +339,7 @@ private ImmutableList addPositionInformation(ImmutableList completeIfInstantiations(ImmutableList apps, Sequent seq, PosInOccurrence ifPIO, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); final ImmutableList ifFmlInst; @@ -365,7 +365,7 @@ private ImmutableList completeIfInstantiations(ImmutableListnil(); + return ImmutableSLList.nil(); } else { // the right side is not checked in tacletapp // not sure where to incorporate the check... @@ -399,9 +399,9 @@ private ImmutableList completeIfInstantiations(ImmutableList completeInstantiations(ImmutableList apps, PosInOccurrence missingSVPIO, Services services) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); if (missingSVPIO == null) { - return ImmutableSLList.nil(); + return ImmutableSLList.nil(); } for (PosTacletApp app1 : apps) { diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/PosInSequentTransferable.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/PosInSequentTransferable.java index a6ca0cc1986..c29d8b272ac 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/PosInSequentTransferable.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/nodeviews/PosInSequentTransferable.java @@ -52,7 +52,7 @@ public PosInSequentTransferable(PosInSequent pis, Services serv) { this.pis = pis; if (!pis.isSequent()) { this.stringSelection = - ProofSaver.printTerm(pis.getPosInOccurrence().subTerm(), serv).toString(); + ProofSaver.printTerm(pis.getPosInOccurrence().subTerm(), serv); } } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDiffFrame.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDiffFrame.java index 9dff31689a1..47602e3beb8 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDiffFrame.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDiffFrame.java @@ -158,7 +158,6 @@ private void setSelectedNode() { to.setText(Integer.toString(node.serialNr())); } catch (IllegalArgumentException e) { JOptionPane.showMessageDialog(null, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); - return; } } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDifference.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDifference.java index 5ad43c5a703..e4df5789027 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDifference.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/ProofDifference.java @@ -99,8 +99,8 @@ static List findPairs(List left, List right) { * if(t.third>=THRESHOLD) { break; } */ if (!matchedLeft[t.first] && !matchedRight[t.second]) { - String l = left.get((int) t.first); - String r = right.get((int) t.second); + String l = left.get(t.first); + String r = right.get(t.second); pairs.add(new Matching(l, r, t.third)); matchedLeft[t.first] = true; matchedRight[t.second] = true; diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/diff_match_patch.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/diff_match_patch.java index b66cc7a76d2..52a6428d3dc 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/diff_match_patch.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/proofdiff/diff_match_patch.java @@ -1535,7 +1535,7 @@ public int match_main(String text, String pattern, int loc) { // Nothing to match. return -1; } else if (loc + pattern.length() <= text.length() - && text.substring(loc, loc + pattern.length()).equals(pattern)) { + && text.startsWith(pattern, loc)) { // Perfect match at the perfect spot! (Includes case of null pattern) return loc; } else { diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/prooftree/ProofTreeView.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/prooftree/ProofTreeView.java index d0de0f9e2ae..00504537293 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/prooftree/ProofTreeView.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/prooftree/ProofTreeView.java @@ -762,7 +762,7 @@ public void selectedProofChanged(KeYSelectionEvent e) { */ @Override public void autoModeStarted(ProofEvent e) { - modifiedSubtrees = ImmutableSLList.nil(); + modifiedSubtrees = ImmutableSLList.nil(); modifiedSubtreesCache = new LinkedHashSet(); if (delegateModel == null) { LOGGER.debug("delegateModel is null"); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/StandardUISettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/StandardUISettings.java index 7062ecaa503..4a986c188c9 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/StandardUISettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/StandardUISettings.java @@ -73,7 +73,7 @@ public StandardUISettings() { String[] sizes = Arrays.stream(Config.SIZES).boxed().map(it -> it + " pt").toArray(String[]::new); - spFontSizeTreeSequent = this.createSelection(sizes, emptyValidator()); + spFontSizeTreeSequent = this.createSelection(sizes, emptyValidator()); addTitledComponent("Tree and sequent font factor: ", spFontSizeTreeSequent, ""); @@ -184,7 +184,7 @@ public void applySettings(MainWindow window) throws InvalidSettingsInputExceptio vs.setConfirmExit(chkConfirmExit.isSelected()); gs.setAutoSave((Integer) spAutoSaveProof.getValue()); gs.setTacletFilter(chkMinimizeInteraction.isSelected()); - vs.setFontIndex((Integer) spFontSizeTreeSequent.getSelectedIndex()); + vs.setFontIndex(spFontSizeTreeSequent.getSelectedIndex()); FontSizeFacade.resizeFonts(vs.getUIFontSizeFactor()); Config.DEFAULT.setDefaultFonts(); Config.DEFAULT.fireConfigChange(); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/SolverListener.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/SolverListener.java index 4778d7e726e..0771f2173d2 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/SolverListener.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/SolverListener.java @@ -542,12 +542,11 @@ private String finalizePath(String path, SMTSolver solver, Goal goal) { public static String computeSolverTypeWarningMessage(SolverType type) { - StringBuffer message = new StringBuffer(); - message.append("You are using a version of " + type.getName() - + " which has not been tested for this version of KeY.\nIt can therefore be that" - + " errors occur that would not occur\nusing the following version or higher:\n"); - message.append(type.getMinimumSupportedVersion()); - return message.toString(); + String message = "You are using a version of " + type.getName() + + " which has not been tested for this version of KeY.\nIt can therefore be that" + + " errors occur that would not occur\nusing the following version or higher:\n" + + type.getMinimumSupportedVersion(); + return message; } private class ProgressDialogListenerImpl implements ProgressDialogListener { diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/SolverOptions.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/SolverOptions.java index a97b8da614b..2671299409a 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/SolverOptions.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/SolverOptions.java @@ -56,13 +56,12 @@ public SolverOptions(SolverType solverType) { } private static final String versionInfo(String info, String versionString) { - StringBuilder builder = new StringBuilder(); - builder.append(info); - builder.append(" "); - builder.append("("); - builder.append(versionString); - builder.append(")"); - return builder.toString(); + String builder = info + + " " + + "(" + + versionString + + ")"; + return builder; } protected JButton createDefaultButton() { @@ -74,9 +73,7 @@ protected JButton createDefaultButton() { } private String createSupportedVersionText() { - StringBuilder result = new StringBuilder("The following minimal version is supported: "); - result.append(solverType.getMinimumSupportedVersion()); - return result.toString(); + return "The following minimal version is supported: " + solverType.getMinimumSupportedVersion(); } private String getSolverSupportText() { diff --git a/key.util/src/main/java/org/key_project/util/Filenames.java b/key.util/src/main/java/org/key_project/util/Filenames.java index 93fff3eecdc..796deca2e6b 100644 --- a/key.util/src/main/java/org/key_project/util/Filenames.java +++ b/key.util/src/main/java/org/key_project/util/Filenames.java @@ -38,7 +38,7 @@ else if (filename.indexOf("\\") != -1) while (i < filename.length()) { int j = filename.indexOf(sep, i); if (j == -1) { // no slash anymore - final String s = filename.substring(i, filename.length()); + final String s = filename.substring(i); if (!s.equals(".")) res.add(s); break; diff --git a/key.util/src/main/java/org/key_project/util/Streams.java b/key.util/src/main/java/org/key_project/util/Streams.java index 458c8c7e4e0..6cc8b817209 100644 --- a/key.util/src/main/java/org/key_project/util/Streams.java +++ b/key.util/src/main/java/org/key_project/util/Streams.java @@ -17,7 +17,7 @@ public static String toString(InputStream is) throws IOException { while ((count = is.read(buf)) >= 0) { baos.write(buf, 0, count); } - return new String(baos.toByteArray()); + return baos.toString(); } } diff --git a/key.util/src/main/java/org/key_project/util/Strings.java b/key.util/src/main/java/org/key_project/util/Strings.java index e91165fb94d..8791a5065c0 100644 --- a/key.util/src/main/java/org/key_project/util/Strings.java +++ b/key.util/src/main/java/org/key_project/util/Strings.java @@ -42,9 +42,9 @@ public static boolean isJMLComment(String comment) { try { return (comment.startsWith("/*@") || comment.startsWith("//@") || comment.startsWith("/*+KeY@") || comment.startsWith("//+KeY@") - || (comment.startsWith("/*-") && !comment.substring(3, 6).equals("KeY") + || (comment.startsWith("/*-") && !comment.startsWith("KeY", 3) && comment.contains("@")) - || (comment.startsWith("//-") && !comment.substring(3, 6).equals("KeY") + || (comment.startsWith("//-") && !comment.startsWith("KeY", 3) && comment.contains("@"))); } catch (IndexOutOfBoundsException e) { return false; diff --git a/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableMap.java b/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableMap.java index 6de91aa5381..7be580d6c09 100644 --- a/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableMap.java +++ b/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableMap.java @@ -50,7 +50,7 @@ protected DefaultImmutableMap(ImmutableMapEntry entry) { if (entry == null) throw new RuntimeException("'null' is not allowed as entry"); this.entry = entry; - this.parent = DefaultImmutableMap.nilMap(); + this.parent = DefaultImmutableMap.nilMap(); this.size = 1; } @@ -197,7 +197,7 @@ public ImmutableMap removeAll(T value) { } return counter < stack.length - ? createMap(stack, counter, DefaultImmutableMap.nilMap()) + ? createMap(stack, counter, DefaultImmutableMap.nilMap()) : this; } diff --git a/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableSet.java b/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableSet.java index a9679a9f311..9bd466fb704 100644 --- a/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableSet.java +++ b/key.util/src/main/java/org/key_project/util/collection/DefaultImmutableSet.java @@ -37,7 +37,7 @@ public static final DefaultImmutableSet nil() { } protected DefaultImmutableSet() { - elementList = ImmutableSLList.nil(); + elementList = ImmutableSLList.nil(); } /** @@ -148,7 +148,7 @@ public ImmutableSet intersect(ImmutableSet set) { return (ImmutableSet) set; } - ImmutableList intersectElements = ImmutableSLList.nil(); + ImmutableList intersectElements = ImmutableSLList.nil(); for (T el : set) { if (contains(el)) { intersectElements = intersectElements.prepend(el); @@ -156,7 +156,7 @@ public ImmutableSet intersect(ImmutableSet set) { } if (intersectElements.isEmpty()) { - return DefaultImmutableSet.nil(); + return DefaultImmutableSet.nil(); } else { return new DefaultImmutableSet(intersectElements); } @@ -221,7 +221,7 @@ public boolean isEmpty() { @Override public ImmutableSet remove(T element) { final ImmutableList list = elementList.removeFirst(element); - return list.isEmpty() ? DefaultImmutableSet.nil() : new DefaultImmutableSet(list); + return list.isEmpty() ? DefaultImmutableSet.nil() : new DefaultImmutableSet(list); } /** diff --git a/key.util/src/main/java/org/key_project/util/collection/ImmutableArray.java b/key.util/src/main/java/org/key_project/util/collection/ImmutableArray.java index e7b860146f8..abc839af6bf 100644 --- a/key.util/src/main/java/org/key_project/util/collection/ImmutableArray.java +++ b/key.util/src/main/java/org/key_project/util/collection/ImmutableArray.java @@ -193,7 +193,7 @@ public void remove() { * @return This element converted to an {@link ImmutableList}. */ public ImmutableList toImmutableList() { - ImmutableList ret = ImmutableSLList.nil(); + ImmutableList ret = ImmutableSLList.nil(); Iterator it = iterator(); while (it.hasNext()) { ret = ret.prepend(it.next()); diff --git a/key.util/src/main/java/org/key_project/util/collection/ImmutableLeftistHeap.java b/key.util/src/main/java/org/key_project/util/collection/ImmutableLeftistHeap.java index a463d588d25..50c7cecbee6 100644 --- a/key.util/src/main/java/org/key_project/util/collection/ImmutableLeftistHeap.java +++ b/key.util/src/main/java/org/key_project/util/collection/ImmutableLeftistHeap.java @@ -60,8 +60,8 @@ public Node(S element) { this.rightHeight = 1; this.size = 1; this.data = element; - this.left = ImmutableLeftistHeap.nilHeap(); - this.right = ImmutableLeftistHeap.nilHeap(); + this.left = ImmutableLeftistHeap.nilHeap(); + this.right = ImmutableLeftistHeap.nilHeap(); } /** @@ -72,7 +72,7 @@ public Node(S element, ImmutableLeftistHeap a) { this.size = 1 + a.size(); this.data = element; this.left = a; - this.right = ImmutableLeftistHeap.nilHeap(); + this.right = ImmutableLeftistHeap.nilHeap(); } /** diff --git a/key.util/src/main/java/org/key_project/util/collection/ImmutableList.java b/key.util/src/main/java/org/key_project/util/collection/ImmutableList.java index 37261b8623d..ef5b5927091 100644 --- a/key.util/src/main/java/org/key_project/util/collection/ImmutableList.java +++ b/key.util/src/main/java/org/key_project/util/collection/ImmutableList.java @@ -19,10 +19,10 @@ public interface ImmutableList extends Iterable, java.io.Serializable { * @return a Collector that accumulates the input elements into a new ImmutableList. */ public static Collector, ImmutableList> collector() { - return Collector.of(LinkedList::new, (list, el) -> list.add(el), (list1, list2) -> { + return Collector.of(LinkedList::new, (list, el) -> list.add(el), (list1, list2) -> { list1.addAll(list2); return list1; - }, ImmutableList::fromList); + }, ImmutableList::fromList); } /** diff --git a/key.util/src/main/java/org/key_project/util/collection/ImmutableSet.java b/key.util/src/main/java/org/key_project/util/collection/ImmutableSet.java index 388e716d7b7..2c790298018 100644 --- a/key.util/src/main/java/org/key_project/util/collection/ImmutableSet.java +++ b/key.util/src/main/java/org/key_project/util/collection/ImmutableSet.java @@ -22,10 +22,10 @@ public interface ImmutableSet extends Iterable, java.io.Serializable { * @return a Collector that accumulates the input elements into a new ImmutableSet. */ public static Collector, ImmutableSet> collector() { - return Collector.of(HashSet::new, (set, el) -> set.add(el), (set1, set2) -> { + return Collector.of(HashSet::new, (set, el) -> set.add(el), (set1, set2) -> { set1.addAll(set2); return set1; - }, ImmutableSet::fromSet, Characteristics.UNORDERED); + }, ImmutableSet::fromSet, Characteristics.UNORDERED); } /** diff --git a/key.util/src/main/java/org/key_project/util/collection/Immutables.java b/key.util/src/main/java/org/key_project/util/collection/Immutables.java index bbe82171020..f3709d06f82 100644 --- a/key.util/src/main/java/org/key_project/util/collection/Immutables.java +++ b/key.util/src/main/java/org/key_project/util/collection/Immutables.java @@ -145,7 +145,7 @@ public static ImmutableSet createSetFrom(Iterable iterable) { * @returns the view onto the iterable as an immutable list */ public static ImmutableList createListFrom(Iterable iterable) { - ImmutableList result = ImmutableSLList.nil(); + ImmutableList result = ImmutableSLList.nil(); for (T t : iterable) { result = result.prepend(t); } diff --git a/key.util/src/test/java/org/key_project/util/testcase/java/CollectionUtilTest.java b/key.util/src/test/java/org/key_project/util/testcase/java/CollectionUtilTest.java index 0cc8f23e738..704b9fff1f9 100644 --- a/key.util/src/test/java/org/key_project/util/testcase/java/CollectionUtilTest.java +++ b/key.util/src/test/java/org/key_project/util/testcase/java/CollectionUtilTest.java @@ -466,7 +466,7 @@ public void testAddAll_Iterable() { List collection = new LinkedList<>(); CollectionUtil.addAll(null, Arrays.asList("A")); assertEquals(0, collection.size()); - CollectionUtil.addAll(collection, (Iterable) null); + CollectionUtil.addAll(collection, null); assertEquals(0, collection.size()); CollectionUtil.addAll(collection, Arrays.asList("A")); assertEquals(1, collection.size()); diff --git a/recoder/src/main/java/recoder/io/DefaultSourceFileRepository.java b/recoder/src/main/java/recoder/io/DefaultSourceFileRepository.java index 356f82094a9..5212e1c1b1c 100644 --- a/recoder/src/main/java/recoder/io/DefaultSourceFileRepository.java +++ b/recoder/src/main/java/recoder/io/DefaultSourceFileRepository.java @@ -254,7 +254,7 @@ public List getCompilationUnitsFromFiles(String[] filenames) listeners.fireProgressEvent(0, filenames.length, "Importing Source Files"); for (int i = 0; i < filenames.length; i += 1) { listeners.fireProgressEvent(i, - new StringBuffer("Parsing ").append(filenames[i]).toString()); + "Parsing " + filenames[i]); CompilationUnit cu = getCompilationUnitFromFile(filenames[i]); if (cu != null) { res.add(cu); diff --git a/recoder/src/main/java/recoder/java/SourceElement.java b/recoder/src/main/java/recoder/java/SourceElement.java index 5c95d2757f4..860909ff138 100644 --- a/recoder/src/main/java/recoder/java/SourceElement.java +++ b/recoder/src/main/java/recoder/java/SourceElement.java @@ -301,9 +301,7 @@ public int compareTo(Position p) { public String toString() { if (this != UNDEFINED) { - StringBuffer buf = new StringBuffer(); - buf.append(line).append('/').append(column - 1); - return buf.toString(); + return String.valueOf(line) + '/' + (column - 1); } else { return "??/??"; } diff --git a/recoder/src/main/java/recoder/parser/ASCII_UCodeESC_CharStream.java b/recoder/src/main/java/recoder/parser/ASCII_UCodeESC_CharStream.java index 2410814fc07..ef8c0d948c8 100644 --- a/recoder/src/main/java/recoder/parser/ASCII_UCodeESC_CharStream.java +++ b/recoder/src/main/java/recoder/parser/ASCII_UCodeESC_CharStream.java @@ -150,7 +150,6 @@ private final void FillBuff() throws java.io.IOException { throw new java.io.IOException(); } else maxNextCharInd += i; - return; } catch (java.io.IOException e) { if (bufpos != 0) { --bufpos; diff --git a/recoder/src/main/java/recoder/parser/JavaCCParser.java b/recoder/src/main/java/recoder/parser/JavaCCParser.java index 1280e462ae0..d2d848d0920 100644 --- a/recoder/src/main/java/recoder/parser/JavaCCParser.java +++ b/recoder/src/main/java/recoder/parser/JavaCCParser.java @@ -539,7 +539,7 @@ static final public AnnotationDeclaration AnnotationTypeDeclaration() throws Par label_6: while (true) { if (jj_2_6(2)) { } else { - break label_6; + break; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case STRICTFP: @@ -711,7 +711,7 @@ static final public EnumDeclaration EnumDeclaration() throws ParseException { label_9: while (true) { if (jj_2_13(2)) { } else { - break label_9; + break; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case STRICTFP: @@ -782,7 +782,7 @@ static final public EnumDeclaration EnumDeclaration() throws ParseException { label_10: while (true) { if (jj_2_14(2)) { } else { - break label_10; + break; } jj_consume_token(COMMA); constant = EnumConstant(); @@ -1846,7 +1846,7 @@ static final public ArrayInitializer ArrayInitializer() throws ParseException { label_36: while (true) { if (jj_2_27(2)) { } else { - break label_36; + break; } jj_consume_token(COMMA); init = VariableInitializer(); @@ -2694,7 +2694,7 @@ static final public UncollatedReferenceQualifier Name() throws ParseException { label_48: while (true) { if (jj_2_32(2)) { } else { - break label_48; + break; } jj_consume_token(DOT); setPrefixInfo(result); @@ -2730,7 +2730,7 @@ static final public UncollatedReferenceQualifier TypedName() throws ParseExcepti label_49: while (true) { if (jj_2_34(2)) { } else { - break label_49; + break; } jj_consume_token(DOT); setPrefixInfo(result); @@ -3297,7 +3297,7 @@ static final public Expression ShiftExpression() throws ParseException { label_59: while (true) { if (jj_2_36(1)) { } else { - break label_59; + break; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LSHIFT: @@ -3797,7 +3797,7 @@ static final public Expression PrimaryExpression() throws ParseException { label_63: while (true) { if (jj_2_43(2)) { } else { - break label_63; + break; } suffix = PrimarySuffix(); switch (suffix.type) { @@ -4219,7 +4219,7 @@ static final public ASTList ArgumentList() throws ParseException { label_64: while (true) { if (jj_2_49(2147483647)) { } else { - break label_64; + break; } jj_consume_token(COMMA); expr = Expression(); @@ -4328,13 +4328,13 @@ static final public NewArray ArrayDimsAndInits(NewArray result) throws ParseExce dimensions++; if (jj_2_51(2)) { } else { - break label_65; + break; } } label_66: while (true) { if (jj_2_52(2)) { } else { - break label_66; + break; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); @@ -5722,7 +5722,7 @@ static final public Expression ElementValue() throws ParseException { label_78: while (true) { if (jj_2_62(2)) { } else { - break label_78; + break; } jj_consume_token(COMMA); tmp = ElementValue(); diff --git a/recoder/src/main/java/recoder/parser/JavaCharStream.java b/recoder/src/main/java/recoder/parser/JavaCharStream.java index 2775798cfd4..48d4869df99 100644 --- a/recoder/src/main/java/recoder/parser/JavaCharStream.java +++ b/recoder/src/main/java/recoder/parser/JavaCharStream.java @@ -187,7 +187,6 @@ static protected void FillBuff() throws java.io.IOException { throw new java.io.IOException(); } else maxNextCharInd += i; - return; } catch (java.io.IOException e) { if (bufpos != 0) { --bufpos; diff --git a/recoder/src/main/java/recoder/service/DefaultCrossReferenceSourceInfo.java b/recoder/src/main/java/recoder/service/DefaultCrossReferenceSourceInfo.java index ad4c7fb679e..696912400e1 100644 --- a/recoder/src/main/java/recoder/service/DefaultCrossReferenceSourceInfo.java +++ b/recoder/src/main/java/recoder/service/DefaultCrossReferenceSourceInfo.java @@ -381,7 +381,6 @@ private void deregisterReference(Reference ref) { Set set = element2references.get(pme); if (set == null) { // ThisReference - return; } else { set.remove(ref); } From 9ea37a8e2ed9ae92c8b17e7d7ca211a30e569310 Mon Sep 17 00:00:00 2001 From: Julian Wiesler Date: Sun, 12 Mar 2023 14:15:04 +0100 Subject: [PATCH 03/35] Code style issues * brackets for single statement blocks * final fields * default modifiers (for enums, interface functions) * C Style Arrays --- .../analyst/IProofReferencesAnalyst.java | 2 +- .../reference/DefaultProofReference.java | 8 +- .../reference/IProofReference.java | 22 +- ...torKeepUpdatesForBreakpointconditions.java | 2 +- .../strategy/IBreakpointStopCondition.java | 6 +- .../ExecutionNodePreorderIterator.java | 2 +- .../SymbolicExecutionTreeBuilder.java | 6 +- .../SymbolicLayoutReader.java | 38 +- .../TruthValueTracingUtil.java | 2 +- .../model/IExecutionAuxiliaryContract.java | 6 +- .../model/IExecutionBaseMethodReturn.java | 10 +- .../model/IExecutionBlockStartNode.java | 4 +- .../model/IExecutionBranchCondition.java | 14 +- .../model/IExecutionConstraint.java | 2 +- .../model/IExecutionElement.java | 22 +- .../model/IExecutionJoin.java | 4 +- .../model/IExecutionLink.java | 4 +- .../model/IExecutionLoopCondition.java | 4 +- .../model/IExecutionLoopInvariant.java | 6 +- .../model/IExecutionMethodCall.java | 12 +- .../model/IExecutionMethodReturn.java | 8 +- .../model/IExecutionMethodReturnValue.java | 10 +- .../model/IExecutionNode.java | 48 +- .../model/IExecutionOperationContract.java | 26 +- .../model/IExecutionStart.java | 4 +- .../model/IExecutionTermination.java | 14 +- .../model/IExecutionValue.java | 20 +- .../model/IExecutionVariable.java | 16 +- .../model/ITreeSettings.java | 10 +- .../object_model/IModelSettings.java | 6 +- .../object_model/ISymbolicAssociation.java | 18 +- .../ISymbolicAssociationValueContainer.java | 8 +- .../object_model/ISymbolicElement.java | 2 +- .../ISymbolicEquivalenceClass.java | 10 +- .../object_model/ISymbolicLayout.java | 6 +- .../object_model/ISymbolicObject.java | 8 +- .../object_model/ISymbolicState.java | 2 +- .../object_model/ISymbolicValue.java | 24 +- .../po/ProgramMethodPO.java | 4 +- .../po/ProgramMethodSubsetPO.java | 4 +- .../AbstractCallStackBasedStopCondition.java | 6 +- .../strategy/CompoundStopCondition.java | 2 +- .../SymbolicExecutionGoalChooser.java | 2 +- .../AbstractConditionalBreakpoint.java | 9 +- .../breakpoint/ExceptionBreakpoint.java | 4 +- .../strategy/breakpoint/FieldWatchpoint.java | 2 +- .../strategy/breakpoint/IBreakpoint.java | 6 +- .../strategy/breakpoint/LineBreakpoint.java | 2 +- .../SymbolicExecutionExceptionBreakpoint.java | 6 +- .../symbolic_execution/util/DefaultEntry.java | 2 +- .../util/EqualsHashCodeResetter.java | 2 +- .../util/SideProofStore.java | 2 +- .../util/SymbolicExecutionEnvironment.java | 2 +- .../util/SymbolicExecutionSideProofUtil.java | 4 +- .../util/SymbolicExecutionUtil.java | 16 +- .../util/event/ISideProofStoreListener.java | 4 +- .../key/macros/SemanticsBlastingMacro.java | 2 +- .../uka/ilkd/key/smt/testgen/StopRequest.java | 2 +- .../key/smt/testgen/TestGenerationLog.java | 8 +- .../uka/ilkd/key/testgen/ModelGenerator.java | 2 +- .../key/testgen/ReflectionClassCreator.java | 7 +- .../ilkd/key/testgen/TestCaseGenerator.java | 6 +- .../testgen/oracle/ModifiesSetTranslator.java | 4 +- .../key/testgen/oracle/OracleBinTerm.java | 6 +- .../key/testgen/oracle/OracleConstant.java | 2 +- .../oracle/OracleInvariantTranslator.java | 2 +- .../key/testgen/oracle/OracleLocation.java | 4 +- .../key/testgen/oracle/OracleLocationSet.java | 2 +- .../key/testgen/oracle/OracleMethodCall.java | 6 +- .../ilkd/key/testgen/oracle/OracleType.java | 2 +- .../key/testgen/oracle/OracleUnaryTerm.java | 8 +- .../key/testgen/oracle/OracleVariable.java | 25 +- .../ilkd/key/util/rifl/RIFLTransformer.java | 8 +- .../ilkd/key/util/rifl/SecurityLattice.java | 31 +- .../key/util/rifl/SpecificationContainer.java | 14 +- .../key/util/rifl/SpecificationEntity.java | 8 +- .../key/util/rifl/SpecificationInjector.java | 11 +- .../java/de/uka/ilkd/key/api/Matcher.java | 3 +- .../de/uka/ilkd/key/api/ProofMacroApi.java | 5 +- .../uka/ilkd/key/api/ProofManagementApi.java | 5 +- .../ilkd/key/api/ProofScriptCommandApi.java | 2 +- .../java/de/uka/ilkd/key/api/ScriptApi.java | 15 +- .../de/uka/ilkd/key/api/ScriptResults.java | 2 +- .../uka/ilkd/key/api/VariableAssignments.java | 6 +- .../axiom_abstraction/PartialComparator.java | 4 +- .../AbstractionPredicate.java | 5 +- .../key/control/AbstractProofControl.java | 3 +- .../ilkd/key/control/CompositePTListener.java | 2 +- .../ilkd/key/control/InteractionListener.java | 2 +- .../de/uka/ilkd/key/control/ProofControl.java | 28 +- .../key/control/RuleCompletionHandler.java | 4 +- .../key/control/UserInterfaceControl.java | 4 +- .../TermLabelVisibilityManagerListener.java | 6 +- .../macros/StartSideProofMacro.java | 2 +- .../po/InfFlowCompositePO.java | 2 +- .../key/informationflow/po/InfFlowPO.java | 14 +- .../po/InfFlowProofSymbols.java | 3 +- .../po/snippet/BasicLoopExecutionSnippet.java | 6 +- .../po/snippet/BasicPOSnippetFactory.java | 6 +- .../po/snippet/BasicSnippetData.java | 23 +- .../InfFlowInputOutputRelationSnippet.java | 13 +- .../po/snippet/InfFlowPOSnippetFactory.java | 6 +- .../po/snippet/ReplaceAndRegisterMethod.java | 3 +- .../TwoStateMethodPredicateSnippet.java | 3 +- .../AbstractInfFlowTacletBuilder.java | 3 +- .../CcatchBreakLabelParameterDeclaration.java | 3 +- ...atchContinueLabelParameterDeclaration.java | 3 +- .../java/de/uka/ilkd/key/java/Comment.java | 6 +- .../de/uka/ilkd/key/java/CompilationUnit.java | 12 +- .../java/de/uka/ilkd/key/java/Context.java | 4 +- .../ilkd/key/java/ContextStatementBlock.java | 9 +- .../java/de/uka/ilkd/key/java/Dimension.java | 2 +- .../java/de/uka/ilkd/key/java/Import.java | 6 +- .../java/de/uka/ilkd/key/java/JavaInfo.java | 43 +- .../key/java/JavaReduxFileCollection.java | 10 +- .../uka/ilkd/key/java/KeYJavaASTFactory.java | 3 +- .../uka/ilkd/key/java/KeYProgModelInfo.java | 28 +- .../uka/ilkd/key/java/KeYRecoderMapping.java | 4 +- .../ilkd/key/java/PackageSpecification.java | 6 +- .../java/ParentIsInterfaceDeclaration.java | 2 +- .../de/uka/ilkd/key/java/Recoder2KeY.java | 18 +- .../ilkd/key/java/Recoder2KeYConverter.java | 36 +- .../key/java/Recoder2KeYTypeConverter.java | 5 +- .../key/java/SchemaRecoder2KeYConverter.java | 8 +- .../java/de/uka/ilkd/key/java/Services.java | 9 +- .../java/de/uka/ilkd/key/java/SourceData.java | 3 +- .../de/uka/ilkd/key/java/StatementBlock.java | 8 +- .../de/uka/ilkd/key/java/TypeConverter.java | 122 +- .../key/java/abstraction/KeYJavaType.java | 9 +- .../ilkd/key/java/abstraction/Package.java | 2 +- .../key/java/abstraction/PrimitiveType.java | 53 +- .../java/declaration/ArrayDeclaration.java | 18 +- .../java/declaration/ClassDeclaration.java | 24 +- .../java/declaration/ClassInitializer.java | 9 +- .../declaration/EnumClassDeclaration.java | 18 +- .../java/declaration/FieldDeclaration.java | 12 +- .../declaration/InheritanceSpecification.java | 3 +- .../declaration/InterfaceDeclaration.java | 18 +- .../declaration/LocalVariableDeclaration.java | 12 +- .../java/declaration/MethodDeclaration.java | 33 +- .../declaration/ParameterDeclaration.java | 15 +- .../uka/ilkd/key/java/declaration/Throws.java | 3 +- .../key/java/declaration/TypeDeclaration.java | 3 +- .../declaration/VariableSpecification.java | 9 +- .../java/declaration/modifier/Private.java | 12 +- .../java/declaration/modifier/Protected.java | 12 +- .../key/java/declaration/modifier/Public.java | 12 +- .../ilkd/key/java/expression/Assignment.java | 5 +- .../java/expression/operator/Conditional.java | 24 +- .../operator/DLEmbeddedExpression.java | 3 +- .../expression/operator/ExactInstanceof.java | 9 +- .../java/expression/operator/Instanceof.java | 9 +- .../key/java/expression/operator/New.java | 21 +- .../java/expression/operator/NewArray.java | 24 +- .../java/expression/operator/TypeCast.java | 9 +- .../java/recoderext/CatchAllStatement.java | 12 +- .../uka/ilkd/key/java/recoderext/Ccatch.java | 18 +- .../CcatchBreakLabelParameterDeclaration.java | 3 +- ...atchContinueLabelParameterDeclaration.java | 3 +- .../ClassFileDeclarationBuilder.java | 103 +- .../ClassFileDeclarationManager.java | 8 +- .../ConstructorNormalformBuilder.java | 19 +- .../java/recoderext/CreateObjectBuilder.java | 5 +- .../java/recoderext/EnumClassDeclaration.java | 24 +- .../de/uka/ilkd/key/java/recoderext/Exec.java | 21 +- .../key/java/recoderext/ExecutionContext.java | 27 +- .../key/java/recoderext/JMLTransformer.java | 9 +- .../recoderext/KeYCrossReferenceNameInfo.java | 6 +- ...KeYCrossReferenceSourceFileRepository.java | 3 +- .../key/java/recoderext/LoopScopeBlock.java | 12 +- .../java/recoderext/MethodBodyStatement.java | 33 +- .../java/recoderext/MethodCallStatement.java | 18 +- .../key/java/recoderext/NewArrayWrapper.java | 2 +- .../ilkd/key/java/recoderext/NewWrapper.java | 2 +- .../recoderext/ProofJavaProgramFactory.java | 2 +- .../java/recoderext/RKeYMetaConstruct.java | 18 +- .../RKeYMetaConstructExpression.java | 9 +- .../recoderext/RKeYMetaConstructType.java | 9 +- .../java/recoderext/RMethodBodyStatement.java | 30 +- .../java/recoderext/RMethodCallStatement.java | 20 +- .../recoderext/RecoderModelTransformer.java | 4 +- .../recoderext/SchemaJavaProgramFactory.java | 5 +- .../java/recoderext/TransactionStatement.java | 2 +- .../key/java/recoderext/URLDataLocation.java | 2 +- .../java/recoderext/adt/MethodSignature.java | 7 +- .../expression/literal/RealLiteral.java | 12 +- .../java/reference/ArrayLengthReference.java | 3 +- .../key/java/reference/ArrayReference.java | 18 +- .../key/java/reference/ExecutionContext.java | 20 +- .../key/java/reference/FieldReference.java | 12 +- .../key/java/reference/IExecutionContext.java | 6 +- .../java/reference/MetaClassReference.java | 3 +- .../key/java/reference/MethodReference.java | 24 +- .../key/java/reference/PackageReference.java | 14 +- .../reference/SchematicFieldReference.java | 12 +- .../key/java/reference/SuperReference.java | 6 +- .../key/java/reference/ThisReference.java | 6 +- .../key/java/reference/TypeReferenceImp.java | 12 +- .../uka/ilkd/key/java/statement/Assert.java | 4 +- .../de/uka/ilkd/key/java/statement/Case.java | 9 +- .../de/uka/ilkd/key/java/statement/Catch.java | 12 +- .../key/java/statement/CatchAllStatement.java | 10 +- .../uka/ilkd/key/java/statement/Ccatch.java | 18 +- .../uka/ilkd/key/java/statement/Default.java | 3 +- .../de/uka/ilkd/key/java/statement/Else.java | 3 +- .../de/uka/ilkd/key/java/statement/Exec.java | 9 +- .../statement/ExpressionJumpStatement.java | 3 +- .../uka/ilkd/key/java/statement/Finally.java | 6 +- .../de/uka/ilkd/key/java/statement/Guard.java | 3 +- .../de/uka/ilkd/key/java/statement/If.java | 12 +- .../ilkd/key/java/statement/JmlAssert.java | 2 +- .../java/statement/LabelJumpStatement.java | 3 +- .../key/java/statement/LabeledStatement.java | 12 +- .../key/java/statement/LoopScopeBlock.java | 12 +- .../key/java/statement/LoopStatement.java | 24 +- .../java/statement/MergePointStatement.java | 6 +- .../java/statement/MethodBodyStatement.java | 9 +- .../ilkd/key/java/statement/MethodFrame.java | 18 +- .../uka/ilkd/key/java/statement/Switch.java | 9 +- .../key/java/statement/SynchronizedBlock.java | 12 +- .../de/uka/ilkd/key/java/statement/Then.java | 3 +- .../java/statement/TransactionStatement.java | 2 +- .../de/uka/ilkd/key/java/statement/Try.java | 9 +- .../key/java/visitor/CreatingASTVisitor.java | 2 +- .../DeclarationProgramVariableCollector.java | 2 +- .../key/java/visitor/JavaASTCollector.java | 2 +- .../ilkd/key/java/visitor/LabelCollector.java | 2 +- .../UndeclaredProgramVariableCollector.java | 2 +- .../java/de/uka/ilkd/key/ldt/CharListLDT.java | 3 +- .../de/uka/ilkd/key/ldt/FloatingPointLDT.java | 52 +- .../java/de/uka/ilkd/key/ldt/FreeLDT.java | 2 +- .../main/java/de/uka/ilkd/key/ldt/LDT.java | 9 +- .../ilkd/key/logic/BoundVariableTools.java | 24 +- .../java/de/uka/ilkd/key/logic/Choice.java | 6 +- .../de/uka/ilkd/key/logic/ChoiceExpr.java | 24 +- .../uka/ilkd/key/logic/LexPathOrdering.java | 154 +- .../uka/ilkd/key/logic/MethodStackInfo.java | 3 +- .../java/de/uka/ilkd/key/logic/Namespace.java | 6 +- .../de/uka/ilkd/key/logic/NamespaceSet.java | 3 +- .../de/uka/ilkd/key/logic/OpCollector.java | 2 +- .../uka/ilkd/key/logic/PosInOccurrence.java | 9 +- .../de/uka/ilkd/key/logic/PosInProgram.java | 3 +- .../java/de/uka/ilkd/key/logic/PosInTerm.java | 9 +- .../de/uka/ilkd/key/logic/RenamingTable.java | 6 +- .../ilkd/key/logic/SingleRenamingTable.java | 3 +- .../main/java/de/uka/ilkd/key/logic/Term.java | 42 +- .../de/uka/ilkd/key/logic/TermBuilder.java | 31 +- .../de/uka/ilkd/key/logic/TermFactory.java | 8 +- .../java/de/uka/ilkd/key/logic/TermImpl.java | 6 +- .../de/uka/ilkd/key/logic/TermServices.java | 8 +- .../de/uka/ilkd/key/logic/VariableNamer.java | 3 +- .../java/de/uka/ilkd/key/logic/Visitor.java | 8 +- .../label/BlockContractValidityTermLabel.java | 2 +- .../key/logic/label/FormulaTermLabel.java | 2 +- .../ilkd/key/logic/label/OriginTermLabel.java | 8 +- .../label/SymbolicExecutionTermLabel.java | 2 +- .../key/logic/label/TermLabelFactory.java | 2 +- .../key/logic/op/AbstractSortedOperator.java | 3 +- .../ilkd/key/logic/op/IObserverFunction.java | 16 +- .../uka/ilkd/key/logic/op/IProgramMethod.java | 46 +- .../key/logic/op/SortDependingFunction.java | 6 +- .../uka/ilkd/key/logic/op/SortedOperator.java | 2 +- .../de/uka/ilkd/key/logic/op/SubstOp.java | 3 +- .../de/uka/ilkd/key/logic/op/Transformer.java | 3 +- .../de/uka/ilkd/key/logic/sort/ArraySort.java | 9 +- .../uka/ilkd/key/logic/sort/GenericSort.java | 12 +- .../ilkd/key/logic/sort/ProgramSVSort.java | 3 +- .../java/de/uka/ilkd/key/logic/sort/Sort.java | 14 +- .../de/uka/ilkd/key/logic/sort/SortImpl.java | 3 +- .../uka/ilkd/key/logic/util/TermHelper.java | 3 +- .../AbstractPropositionalExpansionMacro.java | 3 +- .../macros/FinishSymbolicExecutionMacro.java | 3 +- ...SymbolicExecutionUntilMergePointMacro.java | 4 +- .../key/macros/HeapSimplificationMacro.java | 138 +- .../macros/IntegerSimplificationMacro.java | 48 +- .../ilkd/key/macros/OneStepProofMacro.java | 2 +- .../de/uka/ilkd/key/macros/ProofMacro.java | 22 +- .../ilkd/key/macros/ProofMacroListener.java | 4 +- .../macros/TranscendentalFloatSMTMacro.java | 2 +- .../key/macros/scripts/AbstractCommand.java | 3 +- .../ilkd/key/macros/scripts/AutoCommand.java | 14 +- .../ilkd/key/macros/scripts/EngineState.java | 4 +- .../ilkd/key/macros/scripts/LeaveCommand.java | 2 +- .../ilkd/key/macros/scripts/MacroCommand.java | 2 +- .../key/macros/scripts/RewriteCommand.java | 4 +- .../key/macros/scripts/ScriptCommand.java | 3 +- .../ilkd/key/macros/scripts/meta/Type.java | 2 +- .../macros/scripts/meta/ValueInjector.java | 2 +- .../uka/ilkd/key/nparser/DebugKeyLexer.java | 6 +- .../java/de/uka/ilkd/key/nparser/KeyAst.java | 3 +- .../java/de/uka/ilkd/key/nparser/KeyIO.java | 25 +- .../key/nparser/builder/AbstractBuilder.java | 27 +- .../key/nparser/builder/BuilderHelpers.java | 3 +- .../key/nparser/builder/DefaultBuilder.java | 7 +- .../nparser/builder/ExpressionBuilder.java | 135 +- .../builder/FindProblemInformation.java | 10 +- .../key/nparser/builder/IncludeFinder.java | 3 +- .../key/nparser/builder/ProblemFinder.java | 12 +- .../key/nparser/builder/TacletPBuilder.java | 39 +- .../varexp/AbstractTacletBuilderCommand.java | 2 + .../varexp/TacletBuilderManipulators.java | 21 +- .../ilkd/key/parser/DefaultTermParser.java | 3 +- .../de/uka/ilkd/key/parser/IdDeclaration.java | 4 +- .../de/uka/ilkd/key/parser/ParserConfig.java | 4 +- .../parser/UnfittingReplacewithException.java | 4 +- .../java/de/uka/ilkd/key/pp/AbbrevMap.java | 17 +- .../de/uka/ilkd/key/pp/CharListNotation.java | 9 +- .../java/de/uka/ilkd/key/pp/Notation.java | 3 +- .../java/de/uka/ilkd/key/pp/PosInSequent.java | 5 +- .../de/uka/ilkd/key/pp/PositionTable.java | 6 +- .../pp/ShowSelectedSequentPrintFilter.java | 6 +- .../de/uka/ilkd/key/pp/VisibleTermLabels.java | 4 +- .../java/de/uka/ilkd/key/proof/Counter.java | 2 +- .../uka/ilkd/key/proof/FormulaTagManager.java | 12 +- .../main/java/de/uka/ilkd/key/proof/Goal.java | 5 +- .../ilkd/key/proof/InstantiationProposer.java | 2 +- .../proof/MissingInstantiationException.java | 2 +- .../ilkd/key/proof/MissingSortException.java | 2 +- .../key/proof/MultiThreadedTacletIndex.java | 13 +- .../main/java/de/uka/ilkd/key/proof/Node.java | 3 +- .../java/de/uka/ilkd/key/proof/NodeInfo.java | 2 +- .../de/uka/ilkd/key/proof/OpReplacer.java | 4 +- .../proof/PrefixTermTacletAppIndexCache.java | 3 +- .../PrefixTermTacletAppIndexCacheImpl.java | 6 +- .../uka/ilkd/key/proof/ProgVarReplacer.java | 2 +- .../java/de/uka/ilkd/key/proof/Proof.java | 9 +- .../de/uka/ilkd/key/proof/ProofAggregate.java | 7 +- .../de/uka/ilkd/key/proof/ProofTreeEvent.java | 2 +- .../de/uka/ilkd/key/proof/ProofVisitor.java | 2 +- .../de/uka/ilkd/key/proof/ReplacementMap.java | 10 +- .../de/uka/ilkd/key/proof/RuleAppIndex.java | 28 +- .../key/proof/SVInstantiationException.java | 2 +- .../ilkd/key/proof/SVRigidnessException.java | 2 +- .../key/proof/SemisequentTacletAppIndex.java | 11 +- .../ilkd/key/proof/SortMismatchException.java | 4 +- .../de/uka/ilkd/key/proof/Statistics.java | 2 +- .../de/uka/ilkd/key/proof/TacletAppIndex.java | 30 +- .../de/uka/ilkd/key/proof/TacletIndex.java | 8 +- .../key/proof/TermTacletAppIndexCacheSet.java | 32 +- .../ilkd/key/proof/VariableNameProposer.java | 3 +- .../proof/delayedcut/ApplicationCheck.java | 4 +- .../proof/delayedcut/DelayedCutListener.java | 8 +- .../proof/event/ProofDisposedListener.java | 4 +- .../key/proof/init/AbstractOperationPO.java | 4 +- .../uka/ilkd/key/proof/init/AbstractPO.java | 3 +- .../uka/ilkd/key/proof/init/ContractPO.java | 4 +- .../proof/init/DefaultProfileResolver.java | 4 +- .../key/proof/init/DependencyContractPO.java | 5 +- .../proof/init/FunctionalBlockContractPO.java | 2 +- .../proof/init/FunctionalLoopContractPO.java | 2 +- .../init/FunctionalOperationContractPO.java | 2 +- .../ilkd/key/proof/init/IPersistablePO.java | 18 +- .../uka/ilkd/key/proof/init/POExtension.java | 4 +- .../key/proof/init/ProblemInitializer.java | 15 +- .../key/proof/init/WellDefinednessPO.java | 3 +- .../key/proof/io/AbstractProblemLoader.java | 9 +- .../de/uka/ilkd/key/proof/io/AutoSaver.java | 15 +- .../key/proof/io/CountingBufferedReader.java | 14 +- .../uka/ilkd/key/proof/io/FileRuleSource.java | 2 +- .../ilkd/key/proof/io/IProofFileParser.java | 6 +- ...termediatePresentationProofFileParser.java | 8 +- .../proof/io/IntermediateProofReplayer.java | 20 +- .../de/uka/ilkd/key/proof/io/KeYFile.java | 6 +- .../de/uka/ilkd/key/proof/io/LDTInput.java | 2 +- .../key/proof/io/ProblemLoaderException.java | 10 +- .../uka/ilkd/key/proof/io/UrlRuleSource.java | 4 +- .../io/consistency/AbstractFileRepo.java | 29 +- .../key/proof/io/consistency/FileRepo.java | 18 +- .../proof/io/event/ProofSaverListener.java | 2 +- .../io/intermediate/MergeAppIntermediate.java | 4 +- .../ilkd/key/proof/join/JoinProcessor.java | 6 +- .../key/proof/join/PredicateEstimator.java | 6 +- .../proof/mgt/ComplexRuleJustification.java | 2 +- .../mgt/ComplexRuleJustificationBySpec.java | 2 +- .../key/proof/mgt/ProofCorrectnessMgt.java | 2 +- .../proof/mgt/ProofEnvironmentListener.java | 4 +- .../key/proof/mgt/RuleJustificationInfo.java | 2 +- .../proof/proofevent/NodeChangeJournal.java | 6 +- .../key/proof/proofevent/NodeReplacement.java | 33 +- .../key/proof/rulefilter/SetRuleFilter.java | 2 +- .../key/proof/rulefilter/TacletFilter.java | 3 +- .../de/uka/ilkd/key/prover/GoalChooser.java | 8 +- .../de/uka/ilkd/key/prover/StopCondition.java | 10 +- .../uka/ilkd/key/prover/TaskStartedInfo.java | 10 +- .../ilkd/key/prover/impl/ApplyStrategy.java | 2 +- .../key/prover/impl/DefaultGoalChooser.java | 55 +- .../prover/impl/DepthFirstGoalChooser.java | 3 +- .../impl/SingleRuleApplicationInfo.java | 4 +- .../key/rule/AbstractBlockContractRule.java | 6 +- .../ilkd/key/rule/BoundUniquenessChecker.java | 3 +- .../de/uka/ilkd/key/rule/ContractRuleApp.java | 3 +- .../ilkd/key/rule/IfFormulaInstDirect.java | 2 +- .../de/uka/ilkd/key/rule/IfMatchResult.java | 4 +- .../LightweightSyntacticalReplaceVisitor.java | 5 +- .../key/rule/LoopInvariantBuiltInRuleApp.java | 22 +- .../de/uka/ilkd/key/rule/MatchConditions.java | 5 +- .../de/uka/ilkd/key/rule/NewDependingOn.java | 4 +- .../de/uka/ilkd/key/rule/NoPosTacletApp.java | 17 +- .../java/de/uka/ilkd/key/rule/NotFreeIn.java | 4 +- .../uka/ilkd/key/rule/OneStepSimplifier.java | 2 +- .../de/uka/ilkd/key/rule/PosTacletApp.java | 10 +- .../de/uka/ilkd/key/rule/RewriteTaclet.java | 5 +- .../java/de/uka/ilkd/key/rule/RuleKey.java | 9 +- .../java/de/uka/ilkd/key/rule/RuleSet.java | 2 +- .../rule/SVNameCorrespondenceCollector.java | 6 +- .../key/rule/SyntacticalReplaceVisitor.java | 5 +- .../java/de/uka/ilkd/key/rule/Taclet.java | 27 +- .../java/de/uka/ilkd/key/rule/TacletApp.java | 27 +- .../de/uka/ilkd/key/rule/TacletApplPart.java | 10 +- .../de/uka/ilkd/key/rule/TacletMatcher.java | 14 +- .../de/uka/ilkd/key/rule/TacletPrefix.java | 4 +- .../rule/UninstantiatedNoPosTacletApp.java | 3 +- .../key/rule/UseDependencyContractApp.java | 4 +- .../uka/ilkd/key/rule/WhileInvariantRule.java | 10 +- .../ArrayComponentTypeCondition.java | 3 +- .../rule/conditions/ArrayTypeCondition.java | 3 +- .../SimplifyIfThenElseUpdateCondition.java | 2 +- .../conditions/TypeComparisonCondition.java | 2 +- .../ilkd/key/rule/executor/RuleExecutor.java | 2 +- .../rule/executor/javadl/TacletExecutor.java | 11 +- .../ContextStatementBlockInstantiation.java | 20 +- .../key/rule/inst/GenericSortCondition.java | 16 +- .../rule/inst/GenericSortInstantiations.java | 89 +- .../ilkd/key/rule/inst/ProgramSVEntry.java | 4 +- .../ilkd/key/rule/inst/SVInstantiations.java | 15 +- .../key/rule/inst/TacletInstantiations.java | 4 +- .../key/rule/label/ChildTermLabelPolicy.java | 4 +- .../key/rule/label/OriginTermLabelPolicy.java | 2 +- .../ilkd/key/rule/label/RuleSpecificTask.java | 2 +- .../ilkd/key/rule/label/TermLabelMerger.java | 2 +- .../ilkd/key/rule/label/TermLabelPolicy.java | 2 +- .../key/rule/label/TermLabelRefactoring.java | 8 +- .../ilkd/key/rule/label/TermLabelUpdate.java | 2 +- .../match/legacy/LegacyTacletMatcher.java | 8 +- .../ilkd/key/rule/match/vm/TermNavigator.java | 6 +- .../key/rule/match/vm/VMTacletMatcher.java | 3 +- .../BindVariablesInstruction.java | 2 +- .../vm/instructions/MatchInstruction.java | 2 +- .../MatchOperatorInstruction.java | 2 +- .../ilkd/key/rule/merge/MergeProcedure.java | 8 +- .../de/uka/ilkd/key/rule/merge/MergeRule.java | 6 +- .../rule/metaconstruct/BreakToBeReplaced.java | 2 +- .../rule/metaconstruct/EnumConstantValue.java | 3 +- .../key/rule/metaconstruct/ForToWhile.java | 6 +- .../ForToWhileTransformation.java | 7 +- .../key/rule/metaconstruct/InitArray.java | 10 +- .../key/rule/metaconstruct/MethodCall.java | 2 +- .../metaconstruct/ProgramTransformer.java | 4 +- .../rule/metaconstruct/ReplaceWhileLoop.java | 13 +- .../WhileInvariantTransformation.java | 22 +- .../WhileInvariantTransformer.java | 23 +- .../WhileLoopTransformation.java | 4 +- .../key/rule/metaconstruct/arith/MetaDiv.java | 14 +- .../rule/metaconstruct/arith/MetaEqual.java | 5 +- .../key/rule/metaconstruct/arith/MetaGeq.java | 5 +- .../rule/metaconstruct/arith/MetaGreater.java | 5 +- .../key/rule/metaconstruct/arith/MetaLeq.java | 5 +- .../rule/metaconstruct/arith/MetaLess.java | 5 +- .../rule/metaconstruct/arith/Monomial.java | 47 +- .../RewriteTacletGoalTemplate.java | 2 +- .../rule/tacletbuilder/SuccTacletBuilder.java | 3 +- .../key/rule/tacletbuilder/TacletBuilder.java | 7 +- .../rule/tacletbuilder/TacletGenerator.java | 6 +- .../tacletbuilder/TacletGoalTemplate.java | 15 +- .../tacletbuilder/TacletPrefixBuilder.java | 5 +- .../settings/AbstractPropertiesSettings.java | 8 +- .../uka/ilkd/key/settings/ChoiceSettings.java | 2 +- .../ilkd/key/settings/GeneralSettings.java | 5 +- .../key/settings/LemmaGeneratorSettings.java | 2 +- .../settings/ProofDependentSMTSettings.java | 2 +- .../settings/ProofIndependentSMTSettings.java | 2 +- .../settings/ProofIndependentSettings.java | 2 +- .../uka/ilkd/key/settings/ProofSettings.java | 2 +- .../uka/ilkd/key/settings/ViewSettings.java | 58 +- .../ilkd/key/smt/AbstractSMTTranslator.java | 40 +- .../de/uka/ilkd/key/smt/ContextualBlock.java | 6 +- .../de/uka/ilkd/key/smt/ModelExtractor.java | 3 +- .../de/uka/ilkd/key/smt/OverflowChecker.java | 3 +- .../ilkd/key/smt/ProblemTypeInformation.java | 3 +- .../de/uka/ilkd/key/smt/SMTObjTranslator.java | 3 +- .../java/de/uka/ilkd/key/smt/SMTProblem.java | 2 +- .../de/uka/ilkd/key/smt/SMTSolverResult.java | 2 +- .../de/uka/ilkd/key/smt/SMTTranslator.java | 2 +- .../de/uka/ilkd/key/smt/SolverException.java | 2 +- .../ilkd/key/smt/SolverLauncherListener.java | 4 +- .../ilkd/key/smt/SolverTypeCollection.java | 2 +- .../de/uka/ilkd/key/smt/lang/SMTFile.java | 15 +- .../de/uka/ilkd/key/smt/lang/SMTFunction.java | 18 +- .../uka/ilkd/key/smt/lang/SMTFunctionDef.java | 4 +- .../de/uka/ilkd/key/smt/lang/SMTSort.java | 6 +- .../de/uka/ilkd/key/smt/lang/SMTTerm.java | 126 +- .../uka/ilkd/key/smt/lang/SMTTermBinOp.java | 15 +- .../de/uka/ilkd/key/smt/lang/SMTTermCall.java | 36 +- .../de/uka/ilkd/key/smt/lang/SMTTermITE.java | 6 +- .../uka/ilkd/key/smt/lang/SMTTermMultOp.java | 55 +- .../uka/ilkd/key/smt/lang/SMTTermNumber.java | 33 +- .../uka/ilkd/key/smt/lang/SMTTermQuant.java | 69 +- .../uka/ilkd/key/smt/lang/SMTTermUnaryOp.java | 14 +- .../ilkd/key/smt/lang/SMTTermVariable.java | 9 +- .../de/uka/ilkd/key/smt/lang/SMTTerms.java | 6 +- .../de/uka/ilkd/key/smt/model/Sequence.java | 3 +- .../de/uka/ilkd/key/smt/newsmt2/SExpr.java | 2 +- .../key/smt/newsmt2/SMTHandlerServices.java | 2 +- .../key/smt/newsmt2/SMTTacletTranslator.java | 4 +- .../uka/ilkd/key/smt/newsmt2/VerbatimSMT.java | 2 +- .../solvertypes/SolverPropertiesLoader.java | 4 +- .../AbstractAuxiliaryContractImpl.java | 2 +- .../ilkd/key/speclang/AuxiliaryContract.java | 116 +- .../uka/ilkd/key/speclang/BlockContract.java | 10 +- .../uka/ilkd/key/speclang/ClassInvariant.java | 12 +- .../de/uka/ilkd/key/speclang/Contract.java | 68 +- .../uka/ilkd/key/speclang/ContractAxiom.java | 12 +- .../ilkd/key/speclang/DependencyContract.java | 2 +- .../speclang/FunctionalOperationContract.java | 48 +- .../FunctionalOperationContractImpl.java | 2 +- .../key/speclang/InformationFlowContract.java | 34 +- .../ilkd/key/speclang/InitiallyClause.java | 8 +- .../uka/ilkd/key/speclang/LoopContract.java | 34 +- .../ilkd/key/speclang/LoopContractImpl.java | 2 +- .../ilkd/key/speclang/LoopSpecification.java | 70 +- .../key/speclang/ModelMethodExecution.java | 12 +- .../ilkd/key/speclang/OperationContract.java | 16 +- .../ilkd/key/speclang/PartialInvAxiom.java | 9 +- .../uka/ilkd/key/speclang/SpecExtractor.java | 22 +- .../key/speclang/SpecificationElement.java | 11 +- .../key/speclang/WellDefinednessCheck.java | 7 +- .../key/speclang/jml/JMLInfoExtractor.java | 3 +- .../key/speclang/jml/JMLSpecExtractor.java | 12 +- .../speclang/jml/pretranslation/Behavior.java | 2 +- .../TextualJMLAssertStatement.java | 12 +- .../pretranslation/TextualJMLClassAxiom.java | 2 +- .../pretranslation/TextualJMLConstruct.java | 2 +- .../jml/pretranslation/TextualJMLDepends.java | 3 +- .../pretranslation/TextualJMLLoopSpec.java | 8 +- .../TextualJMLMergePointDecl.java | 6 +- .../pretranslation/TextualJMLMethodDecl.java | 6 +- .../pretranslation/TextualJMLSpecCase.java | 9 +- .../jml/translation/JMLSpecFactory.java | 24 +- .../ilkd/key/speclang/njml/DebugJmlLexer.java | 3 +- .../uka/ilkd/key/speclang/njml/JmlFacade.java | 3 +- .../de/uka/ilkd/key/speclang/njml/JmlIO.java | 10 +- .../key/speclang/njml/JmlMarkerDecision.java | 3 +- .../key/speclang/njml/JmlTermFactory.java | 14 +- .../njml/LabeledParserRuleContext.java | 6 +- .../key/speclang/njml/TextualTranslator.java | 7 +- .../ilkd/key/speclang/njml/Translator.java | 152 +- .../translation/SLMethodResolver.java | 3 +- .../translation/SLResolverManager.java | 2 +- .../translation/SLTranslationException.java | 6 +- .../key/strategy/AbstractFeatureStrategy.java | 19 +- .../FocussedRuleApplicationManager.java | 19 +- .../uka/ilkd/key/strategy/IfInstantiator.java | 12 +- .../ilkd/key/strategy/JavaCardDLStrategy.java | 326 ++-- .../ilkd/key/strategy/NumberRuleAppCost.java | 9 +- .../ilkd/key/strategy/RuleAppContainer.java | 6 +- .../key/strategy/SimpleFilteredStrategy.java | 14 +- .../ilkd/key/strategy/StrategyFactory.java | 4 +- .../ilkd/key/strategy/TacletAppContainer.java | 34 +- .../uka/ilkd/key/strategy/TopRuleAppCost.java | 3 +- .../strategy/feature/AbstractBetaFeature.java | 82 +- .../AbstractMonomialSmallerThanFeature.java | 18 +- .../AbstractNonDuplicateAppFeature.java | 27 +- .../feature/AllowedCutPositionFeature.java | 3 +- .../feature/AtomsSmallerThanFeature.java | 12 +- .../feature/BinaryTacletAppFeature.java | 3 +- .../strategy/feature/CheckApplyEqFeature.java | 13 +- .../strategy/feature/ConditionalFeature.java | 5 +- .../feature/DirectlyBelowFeature.java | 9 +- .../feature/EqNonDuplicateAppFeature.java | 3 +- .../strategy/feature/FindRightishFeature.java | 3 +- .../feature/FormulaAddedByRuleFeature.java | 3 +- .../feature/IfThenElseMalusFeature.java | 9 +- .../feature/LeftmostNegAtomFeature.java | 14 +- .../feature/MonomialsSmallerThanFeature.java | 39 +- .../feature/NonDuplicateAppFeature.java | 3 +- .../feature/NotBelowBinderFeature.java | 3 +- .../feature/NotBelowQuantifierFeature.java | 3 +- .../feature/NotInScopeOfModalityFeature.java | 6 +- .../OnlyInScopeOfQuantifiersFeature.java | 3 +- .../feature/PolynomialValuesCmpFeature.java | 12 +- .../feature/RuleSetDispatchFeature.java | 8 +- .../feature/SVNeedsInstantiation.java | 2 +- .../key/strategy/feature/ScaleFeature.java | 24 +- .../SeqContainsExecutableCodeFeature.java | 8 +- .../key/strategy/feature/ShannonFeature.java | 5 +- .../strategy/feature/SmallerThanFeature.java | 6 +- .../ilkd/key/strategy/feature/SumFeature.java | 4 +- .../TacletRequiringInstantiationFeature.java | 3 +- .../feature/ThrownExceptionFeature.java | 3 +- .../strategy/feature/TopLevelFindFeature.java | 3 +- .../findprefix/AntecSuccPrefixChecker.java | 4 +- .../strategy/feature/findprefix/Checker.java | 2 +- .../FindPrefixRestrictionFeature.java | 2 +- .../instantiator/BackTrackingManager.java | 6 +- .../feature/instantiator/ForEachCP.java | 5 +- .../feature/instantiator/OneOfCP.java | 2 +- .../instantiator/SVInstantiationCP.java | 6 +- .../quantifierHeuristics/BasicMatching.java | 27 +- .../quantifierHeuristics/ClausesGraph.java | 28 +- .../ClausesSmallerThanFeature.java | 6 +- .../quantifierHeuristics/Constraint.java | 4 +- .../EliminableQuantifierTF.java | 3 +- .../EqualityConstraint.java | 140 +- .../quantifierHeuristics/Instantiation.java | 21 +- .../LiteralsSmallerThanFeature.java | 68 +- .../quantifierHeuristics/Metavariable.java | 15 +- .../QuanEliminationAnalyser.java | 55 +- .../SplittableQuantifiedFormulaFeature.java | 8 +- .../quantifierHeuristics/Substitution.java | 15 +- .../quantifierHeuristics/Trigger.java | 4 +- .../quantifierHeuristics/TriggerUtils.java | 9 +- .../quantifierHeuristics/UniTrigger.java | 29 +- .../DividePolynomialsProjection.java | 5 +- .../SVInstantiationProjection.java | 3 +- .../termfeature/BinarySumTermFeature.java | 3 +- .../ContainsExecutableCodeTermFeature.java | 15 +- .../termfeature/RecSubTermFeature.java | 7 +- .../termfeature/ShannonTermFeature.java | 5 +- .../strategy/termfeature/SubTermFeature.java | 6 +- .../MultiplesModEquationsGenerator.java | 18 +- .../termgenerator/RootsGenerator.java | 18 +- .../termgenerator/SubtermGenerator.java | 6 +- .../termgenerator/SuperTermGenerator.java | 3 +- .../TriggeredInstantiations.java | 2 +- .../DefaultTacletTranslator.java | 17 +- .../taclettranslation/SkeletonGenerator.java | 13 +- .../assumptions/AssumptionGenerator.java | 6 +- .../DefaultTacletSetTranslation.java | 18 +- .../assumptions/GenericTranslator.java | 10 +- .../assumptions/SupportedTaclets.java | 4 +- .../assumptions/TacletConditions.java | 3 +- .../assumptions/TacletSetTranslation.java | 6 +- .../assumptions/TranslationListener.java | 8 +- .../lemma/AutomaticProver.java | 10 +- .../lemma/DefaultLemmaGenerator.java | 5 +- .../lemma/LemmaGenerator.java | 6 +- .../lemma/TacletSoundnessPOLoader.java | 3 +- .../lemma/UserDefinedSymbols.java | 2 +- .../java/de/uka/ilkd/key/util/Assert.java | 6 +- .../main/java/de/uka/ilkd/key/util/Debug.java | 3 +- .../java/de/uka/ilkd/key/util/DebugMBean.java | 8 +- .../key/util/DirectoryFileCollection.java | 20 +- .../ilkd/key/util/EnhancedStringBuffer.java | 6 +- .../de/uka/ilkd/key/util/FileCollection.java | 18 +- .../de/uka/ilkd/key/util/KeYConstants.java | 6 +- .../ilkd/key/util/KeYRecoderExcHandler.java | 5 +- .../key/util/LexicographicComparator.java | 18 +- .../main/java/de/uka/ilkd/key/util/Pair.java | 3 +- .../de/uka/ilkd/key/util/ProgressMonitor.java | 4 +- .../de/uka/ilkd/key/util/ProofStarter.java | 2 +- .../uka/ilkd/key/util/ProofUserManager.java | 7 +- .../java/de/uka/ilkd/key/util/Quadruple.java | 12 +- .../de/uka/ilkd/key/util/ReferenceLister.java | 11 +- .../uka/ilkd/key/util/ZipFileCollection.java | 22 +- .../key/util/mergerule/MergeRuleUtils.java | 8 +- .../key/util/parsing/BuildingException.java | 3 +- .../key/util/parsing/SyntaxErrorReporter.java | 3 +- .../ilkd/key/util/properties/Properties.java | 24 +- .../service/KeYCrossReferenceSourceInfo.java | 9 +- .../de/uka/ilkd/key/java/TestRecoder2KeY.java | 3 +- ...stDeclarationProgramVariableCollector.java | 6 +- .../ilkd/key/nparser/NamespaceBuilder.java | 4 +- .../ilkd/key/nparser/TestTacletEquality.java | 12 +- .../uka/ilkd/key/parser/TestDeclParser.java | 3 +- .../uka/ilkd/key/proof/TestTacletIndex.java | 3 +- .../key/proof/TestTermTacletAppIndex.java | 3 +- .../ilkd/key/proof/runallproofs/Function.java | 2 +- .../proof/runallproofs/GenerateUnitTests.java | 3 +- .../key/proof/runallproofs/ProveTest.java | 3 +- .../runallproofs/RunAllProofsInfFlow.java | 2 +- .../runallproofs/RunAllProofsTestUnit.java | 2 +- .../proofcollection/ForkedTestFileRunner.java | 3 +- .../proofcollection/TestProperty.java | 2 +- .../de/uka/ilkd/key/rule/TacletForTests.java | 12 +- .../de/uka/ilkd/key/rule/TestApplyTaclet.java | 9 +- .../inst/TestGenericSortInstantiations.java | 3 +- .../njml/ClasslevelTranslatorTest.java | 6 +- .../njml/ExpressionTranslatorTest.java | 3 +- .../njml/MethodlevelTranslatorTest.java | 3 +- .../speclang/njml/NJmlTranslatorTests.java | 4 +- .../de/uka/ilkd/key/util/DesignTests.java | 6 +- .../de/uka/ilkd/key/util/TestMiscTools.java | 12 +- .../AbstractGenericRemover.java | 10 +- .../util/removegenerics/GenericRemover.java | 3 +- .../GenericResolutionTransformation.java | 6 +- .../ilkd/key/util/removegenerics/Main.java | 6 +- .../util/removegenerics/ResolveGenerics.java | 13 +- .../ResolveMemberReference.java | 14 +- .../ResolveMethodDeclaration.java | 5 +- .../ResolveTypeDeclaration.java | 37 +- .../removegenerics/ResolveTypeReference.java | 4 +- .../SingleLineCommentRepairer.java | 3 +- .../monitor/GenericRemoverMonitor.java | 4 +- .../removegenerics/ResolveGenericClass.java | 16 +- .../uka/ilkd/key/core/InterruptListener.java | 2 +- .../de/uka/ilkd/key/core/KeYMediator.java | 13 +- .../uka/ilkd/key/core/KeYSelectionEvent.java | 2 +- .../main/java/de/uka/ilkd/key/core/Log.java | 2 +- .../uka/ilkd/key/gui/ApplyTacletDialog.java | 3 +- .../java/de/uka/ilkd/key/gui/ClassTree.java | 3 +- .../de/uka/ilkd/key/gui/ExampleChooser.java | 9 +- .../java/de/uka/ilkd/key/gui/GoalList.java | 44 +- .../java/de/uka/ilkd/key/gui/InfoView.java | 3 +- .../InteractiveRuleApplicationCompletion.java | 4 +- .../ilkd/key/gui/InvariantConfigurator.java | 6 +- .../ilkd/key/gui/KeyboardTacletExtension.java | 19 +- .../java/de/uka/ilkd/key/gui/LogView.java | 3 +- .../ilkd/key/gui/MainWindowTabbedPane.java | 5 +- .../de/uka/ilkd/key/gui/MaxRuleAppSlider.java | 3 +- .../uka/ilkd/key/gui/NodeInfoVisualizer.java | 8 +- .../de/uka/ilkd/key/gui/ProofMacroWorker.java | 2 +- .../ilkd/key/gui/ProofManagementDialog.java | 5 +- .../java/de/uka/ilkd/key/gui/SearchBar.java | 6 +- .../de/uka/ilkd/key/gui/TableRowResizer.java | 2 +- .../ilkd/key/gui/TacletIfSelectionDialog.java | 2 +- .../key/gui/TacletMatchCompletionDialog.java | 24 +- .../java/de/uka/ilkd/key/gui/TaskTree.java | 22 +- .../gui/actions/CopyToClipboardAction.java | 6 +- .../ilkd/key/gui/actions/LicenseAction.java | 4 +- .../key/gui/actions/SendFeedbackAction.java | 2 +- .../key/gui/actions/SettingsTreeModel.java | 4 +- .../key/gui/actions/ShowProofStatistics.java | 2 +- .../key/gui/actions/SystemInfoAction.java | 6 +- .../ilkd/key/gui/colors/ColorSettings.java | 9 +- .../key/gui/colors/ColorSettingsProvider.java | 3 +- .../ilkd/key/gui/configuration/Config.java | 2 +- .../gui/configuration/ConfigChangeEvent.java | 2 +- .../ilkd/key/gui/docking/DockingLayout.java | 5 +- .../gui/extension/api/ContextMenuKind.java | 2 +- .../api/KeyboardShortcutAdapter.java | 21 +- .../key/gui/extension/impl/Extension.java | 6 +- .../gui/extension/impl/ExtensionSettings.java | 3 +- .../key/gui/extension/impl/HeatmapExt.java | 4 +- .../key/gui/fonticons/FontAwesomeBrands.java | 3 +- .../key/gui/fonticons/FontAwesomeRegular.java | 3 +- .../key/gui/fonticons/FontAwesomeSolid.java | 3 +- .../ilkd/key/gui/fonticons/IconFactory.java | 22 +- .../gui/fonticons/MaterialDesignRegular.java | 5 +- .../uka/ilkd/key/gui/fonticons/ShowIcons.java | 24 +- .../uka/ilkd/key/gui/fonticons/Typicons.java | 3 +- .../de/uka/ilkd/key/gui/help/HelpFacade.java | 5 +- .../de/uka/ilkd/key/gui/help/HelpInfo.java | 2 +- .../gui/keyshortcuts/KeyStrokeSettings.java | 11 +- .../gui/keyshortcuts/ShortcutSettings.java | 6 +- .../key/gui/lemmatagenerator/ItemChooser.java | 2 +- .../LemmaSelectionDialog.java | 4 +- .../MergePartnerSelectionDialog.java | 2 +- .../AbstractionPredicatesChoiceDialog.java | 8 +- .../ObservableArrayList.java | 4 +- .../gui/nodeviews/CurrentGoalViewMenu.java | 2 +- .../nodeviews/DefaultBuiltInRuleMenuItem.java | 2 +- .../gui/nodeviews/DragNDropInstantiator.java | 2 +- .../nodeviews/InsertHiddenTacletMenuItem.java | 3 +- .../InsertSystemInvariantTacletMenuItem.java | 3 +- .../InsertionTacletBrowserMenuItem.java | 6 +- .../nodeviews/PosInSequentTransferable.java | 4 +- .../nodeviews/SequentHideWarningBorder.java | 4 +- .../nodeviews/SequentViewInputListener.java | 4 +- .../gui/nodeviews/SequentViewSearchBar.java | 9 +- .../key/gui/nodeviews/TacletMenuItem.java | 2 +- .../gui/notification/NotificationManager.java | 4 +- .../gui/notification/NotificationTask.java | 3 +- .../events/ProofClosedNotificationEvent.java | 2 +- .../gui/originlabels/OriginTermLabelsExt.java | 2 +- .../gui/originlabels/ShowOriginAction.java | 2 +- .../key/gui/proofdiff/ProofDiffFrame.java | 3 +- .../key/gui/proofdiff/ProofDifference.java | 12 +- .../gui/proofdiff/ProofDifferenceView.java | 21 +- .../key/gui/proofdiff/diff_match_patch.java | 42 +- .../gui/prooftree/GUIAbstractTreeNode.java | 16 +- .../ilkd/key/gui/prooftree/GUIBranchNode.java | 17 +- .../key/gui/prooftree/GUIProofTreeModel.java | 33 +- .../key/gui/prooftree/GUIProofTreeNode.java | 3 +- .../key/gui/prooftree/ProofTreeSearchBar.java | 24 +- .../gui/settings/DefaultSettingsProvider.java | 2 +- .../ilkd/key/gui/settings/FontSizeFacade.java | 7 +- .../InvalidSettingsInputException.java | 4 +- .../ilkd/key/gui/settings/SettingsDialog.java | 6 +- .../key/gui/settings/SettingsManager.java | 2 +- .../uka/ilkd/key/gui/settings/SettingsUi.java | 6 +- .../key/gui/settings/SimpleSettingsPanel.java | 4 +- .../gui/settings/TacletOptionsSettings.java | 3 +- .../java/de/uka/ilkd/key/gui/smt/CETree.java | 13 +- .../key/gui/smt/DropdownSelectionButton.java | 2 +- .../uka/ilkd/key/gui/smt/ProgressDialog.java | 17 +- .../uka/ilkd/key/gui/smt/ProgressModel.java | 6 +- .../de/uka/ilkd/key/gui/smt/SMTMenuItem.java | 2 +- .../uka/ilkd/key/gui/smt/SolverListener.java | 24 +- .../gui/smt/TacletTranslationSelection.java | 18 +- .../gui/smt/settings/SMTSettingsProvider.java | 2 +- .../key/gui/smt/settings/SolverOptions.java | 11 +- .../ilkd/key/gui/sourceview/JavaDocument.java | 4 +- .../key/gui/sourceview/TextLineNumber.java | 2 +- .../utilities/BracketMatchingTextArea.java | 22 +- .../ilkd/key/gui/utilities/WrapLayout.java | 3 +- .../de/uka/ilkd/key/proof/mgt/BasicTask.java | 2 +- .../de/uka/ilkd/key/proof/mgt/EnvNode.java | 2 +- .../key/proof/mgt/ProofAggregateTask.java | 6 +- .../uka/ilkd/key/proof/mgt/TaskTreeModel.java | 2 +- .../uka/ilkd/key/proof/mgt/TaskTreeNode.java | 2 +- .../de/uka/ilkd/key/util/PreferenceSaver.java | 4 +- .../de/uka/ilkd/key/util/ThreadUtilities.java | 4 +- .../de/uka/ilkd/key/util/XMLResources.java | 2 +- .../java/org/key_project/util/ExtList.java | 3 +- .../java/org/key_project/util/Filenames.java | 37 +- .../java/org/key_project/util/RandomName.java | 8 +- .../java/org/key_project/util/bean/Bean.java | 2 +- .../java/org/key_project/util/bean/IBean.java | 20 +- .../util/collection/DefaultImmutableMap.java | 12 +- .../util/collection/DefaultImmutableSet.java | 6 +- .../util/collection/ImmutableArray.java | 3 +- .../util/collection/ImmutableLeftistHeap.java | 12 +- .../util/collection/ImmutableList.java | 14 +- .../util/collection/ImmutableSLList.java | 30 +- .../util/collection/ImmutableSet.java | 8 +- .../util/collection/KeYCollections.java | 17 +- .../util/helper/FindResources.java | 6 +- .../helper/HelperClassForUtilityTests.java | 3 +- .../org/key_project/util/java/IFilter.java | 2 +- .../util/java/IFilterWithException.java | 2 +- .../org/key_project/util/java/IOUtil.java | 14 +- .../java/thread/IRunnableWithException.java | 2 +- .../util/java/thread/IRunnableWithResult.java | 4 +- .../org/key_project/util/lookup/Lookup.java | 31 +- .../util/reflection/IClassLoader.java | 4 +- .../org/key_project/util/model/ClassA.java | 6 +- .../org/key_project/util/model/ClassB.java | 4 +- .../collection/TestLeftistHeapOfInteger.java | 18 +- .../util/testcase/java/IOUtilTest.java | 2 +- .../exploration/ExplorationNodeData.java | 9 +- .../exploration/ProofExplorationService.java | 5 +- .../actions/AddFormulaToAntecedentAction.java | 3 +- .../actions/AddFormulaToSuccedentAction.java | 3 +- .../actions/DeleteFormulaAction.java | 6 +- .../actions/EditFormulaAction.java | 3 +- .../actions/ExplorationAction.java | 3 +- .../exploration/ui/ExplorationStepsList.java | 6 +- .../abstraction/ImplicitEnumMethod.java | 3 +- .../recoder/abstraction/IntersectionType.java | 9 +- .../abstraction/ParameterizedType.java | 6 +- .../recoder/abstraction/TypeParameter.java | 24 +- .../recoder/bytecode/AnnotationUseInfo.java | 3 +- .../java/recoder/bytecode/ByteCodeParser.java | 143 +- .../java/recoder/bytecode/MethodInfo.java | 9 +- .../recoder/bytecode/TypeArgumentInfo.java | 11 +- .../main/java/recoder/convenience/Format.java | 4 +- .../main/java/recoder/convenience/Naming.java | 8 +- .../recoder/convenience/TaggedComment.java | 27 +- .../io/DefaultClassFileRepository.java | 3 +- .../java/recoder/io/DefaultProjectFileIO.java | 7 +- .../io/DefaultSourceFileRepository.java | 8 +- .../java/recoder/java/CompilationUnit.java | 12 +- .../src/main/java/recoder/java/Import.java | 18 +- .../java/recoder/java/JavaProgramFactory.java | 39 +- .../recoder/java/PackageSpecification.java | 12 +- .../main/java/recoder/java/PrettyPrinter.java | 31 +- .../main/java/recoder/java/SourceVisitor.java | 3 +- .../src/main/java/recoder/java/TagInfo.java | 27 +- .../AnnotationElementValuePair.java | 39 +- .../AnnotationPropertyDeclaration.java | 15 +- .../AnnotationUseSpecification.java | 33 +- .../java/declaration/ClassDeclaration.java | 42 +- .../java/declaration/ClassInitializer.java | 9 +- .../declaration/EnumConstantDeclaration.java | 24 +- .../EnumConstantSpecification.java | 9 +- .../java/declaration/EnumDeclaration.java | 60 +- .../java/declaration/FieldDeclaration.java | 12 +- .../declaration/InheritanceSpecification.java | 3 +- .../declaration/InterfaceDeclaration.java | 30 +- .../java/declaration/JavaDeclaration.java | 12 +- .../declaration/LocalVariableDeclaration.java | 12 +- .../java/declaration/MethodDeclaration.java | 54 +- .../declaration/ParameterDeclaration.java | 15 +- .../java/recoder/java/declaration/Throws.java | 3 +- .../declaration/TypeArgumentDeclaration.java | 27 +- .../java/declaration/TypeDeclaration.java | 3 +- .../declaration/TypeParameterDeclaration.java | 30 +- .../declaration/VariableSpecification.java | 12 +- .../ElementValueArrayInitializer.java | 12 +- .../java/expression/operator/Instanceof.java | 9 +- .../recoder/java/expression/operator/New.java | 21 +- .../java/expression/operator/NewArray.java | 24 +- .../java/expression/operator/TypeCast.java | 9 +- .../AnnotationPropertyReference.java | 9 +- .../java/reference/ArrayLengthReference.java | 3 +- .../java/reference/ArrayReference.java | 18 +- .../reference/EnumConstructorReference.java | 42 +- .../java/reference/FieldReference.java | 12 +- .../java/reference/MetaClassReference.java | 3 +- .../java/reference/MethodReference.java | 30 +- .../java/reference/PackageReference.java | 12 +- .../java/reference/SuperReference.java | 3 +- .../recoder/java/reference/ThisReference.java | 3 +- .../recoder/java/reference/TypeReference.java | 18 +- .../UncollatedReferenceQualifier.java | 21 +- .../java/reference/VariableReference.java | 3 +- .../java/recoder/java/statement/Assert.java | 18 +- .../java/recoder/java/statement/Case.java | 12 +- .../java/recoder/java/statement/Catch.java | 12 +- .../java/recoder/java/statement/Default.java | 6 +- .../java/recoder/java/statement/Else.java | 3 +- .../recoder/java/statement/EnhancedFor.java | 6 +- .../statement/ExpressionJumpStatement.java | 3 +- .../java/recoder/java/statement/Finally.java | 6 +- .../main/java/recoder/java/statement/If.java | 24 +- .../java/statement/LabelJumpStatement.java | 3 +- .../java/statement/LabeledStatement.java | 12 +- .../recoder/java/statement/LoopStatement.java | 24 +- .../java/recoder/java/statement/Switch.java | 12 +- .../java/statement/SynchronizedBlock.java | 12 +- .../java/recoder/java/statement/Then.java | 3 +- .../main/java/recoder/java/statement/Try.java | 9 +- .../src/main/java/recoder/kit/PackageKit.java | 3 +- .../src/main/java/recoder/kit/TypeKit.java | 15 +- .../src/main/java/recoder/kit/UnitKit.java | 15 +- .../recoder/kit/pattern/FactoryMethod.java | 6 +- .../java/recoder/kit/pattern/Property.java | 30 +- .../java5to4/EnhancedFor2For.java | 3 +- .../java5to4/MakeConditionalCompatible.java | 3 +- .../java5to4/RemoveAnnotations.java | 11 +- .../java5to4/RemoveCoVariantReturnTypes.java | 28 +- .../java5to4/RemoveStaticImports.java | 27 +- .../transformation/java5to4/ReplaceEnums.java | 20 +- .../java5to4/ResolveBoxing.java | 28 +- .../java5to4/ResolveGenerics.java | 119 +- .../java5to4/ResolveVarArgs.java | 9 +- .../parser/ASCII_UCodeESC_CharStream.java | 58 +- .../java/recoder/parser/JavaCCParser.java | 1451 +++++++++++------ .../parser/JavaCCParserTokenManager.java | 617 ++++--- .../java/recoder/parser/JavaCharStream.java | 67 +- .../java/recoder/parser/ParseException.java | 3 +- .../java/recoder/service/ChangeHistory.java | 18 +- .../recoder/service/DefaultByteCodeInfo.java | 14 +- .../service/DefaultConstantEvaluator.java | 30 +- .../DefaultCrossReferenceSourceInfo.java | 3 +- .../service/DefaultImplicitElementInfo.java | 9 +- .../java/recoder/service/DefaultNameInfo.java | 51 +- .../service/DefaultProgramModelInfo.java | 176 +- .../recoder/service/DefaultSourceInfo.java | 197 ++- .../main/java/recoder/util/AbstractIndex.java | 4 +- .../src/main/java/recoder/util/FileUtils.java | 5 +- recoder/src/main/java/recoder/util/Index.java | 3 +- .../src/main/java/recoder/util/Sorting.java | 6 +- .../main/java/recoder/util/StringUtils.java | 51 +- .../testsuite/basic/BasicTestsSuite.java | 6 +- .../basic/analysis/ModelRebuildTest.java | 3 +- .../analysis/ReferenceCompletenessTest.java | 13 +- .../testsuite/java5test/Java5Test.java | 21 +- 948 files changed, 8331 insertions(+), 5230 deletions(-) diff --git a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/IProofReferencesAnalyst.java b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/IProofReferencesAnalyst.java index 14ce4da5d5c..8500c5ef637 100644 --- a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/IProofReferencesAnalyst.java +++ b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/analyst/IProofReferencesAnalyst.java @@ -31,5 +31,5 @@ public interface IProofReferencesAnalyst { * @return The found {@link IProofReference} or {@code null}/empty set if the applied rule is * not supported. */ - public LinkedHashSet> computeReferences(Node node, Services services); + LinkedHashSet> computeReferences(Node node, Services services); } diff --git a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/DefaultProofReference.java b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/DefaultProofReference.java index 5361d7f0db7..13f68f0e4f5 100644 --- a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/DefaultProofReference.java +++ b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/DefaultProofReference.java @@ -16,22 +16,22 @@ public class DefaultProofReference implements IProofReference { /** * The reference kind as human readable {@link String}. */ - private String kind; + private final String kind; /** * The source {@link Proof}. */ - private Proof source; + private final Proof source; /** * The target source member. */ - private T target; + private final T target; /** * The {@link Node} in which the reference was found. */ - private LinkedHashSet nodes = new LinkedHashSet(); + private final LinkedHashSet nodes = new LinkedHashSet(); /** * Constructor diff --git a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/IProofReference.java b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/IProofReference.java index ef3db36b77f..3ab16fc1103 100644 --- a/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/IProofReference.java +++ b/key.core.proof_references/src/main/java/de/uka/ilkd/key/proof_references/reference/IProofReference.java @@ -32,7 +32,7 @@ public interface IProofReference { * ({@link #getTarget()}). *

*/ - public static final String CALL_METHOD = "Call Method"; + String CALL_METHOD = "Call Method"; /** *

@@ -43,7 +43,7 @@ public interface IProofReference { * ({@link #getTarget()}). *

*/ - public static final String INLINE_METHOD = "Inline Method"; + String INLINE_METHOD = "Inline Method"; /** *

@@ -54,7 +54,7 @@ public interface IProofReference { * References of this kind should provide a {@link Contract} as target ({@link #getTarget()}). *

*/ - public static final String USE_CONTRACT = "Use Contract"; + String USE_CONTRACT = "Use Contract"; /** *

@@ -65,7 +65,7 @@ public interface IProofReference { * ({@link #getTarget()}). *

*/ - public static final String ACCESS = "Access"; + String ACCESS = "Access"; /** *

@@ -76,7 +76,7 @@ public interface IProofReference { * ({@link #getTarget()}). *

*/ - public static final String USE_INVARIANT = "Use Invariant"; + String USE_INVARIANT = "Use Invariant"; /** *

@@ -87,40 +87,40 @@ public interface IProofReference { * ({@link #getTarget()}). *

*/ - public static final String USE_AXIOM = "Use Axiom"; + String USE_AXIOM = "Use Axiom"; /** * Returns the reference kind which is a human readable {@link String}. * * @return The reference kind as human readable {@link String}. */ - public String getKind(); + String getKind(); /** * Returns the {@link Node}s in which the reference was found. * * @return The {@link Node}s in which the reference was found. */ - public LinkedHashSet getNodes(); + LinkedHashSet getNodes(); /** * Adds the given {@link Node}s to the own {@link Node}s. * * @param nodes The {@link Node}s to add. */ - public void addNodes(Collection nodes); + void addNodes(Collection nodes); /** * Returns the target source member. * * @return The target source member. */ - public T getTarget(); + T getTarget(); /** * Returns the source {@link Proof}. * * @return The source {@link Proof}. */ - public Proof getSource(); + Proof getSource(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/proof/TermProgramVariableCollectorKeepUpdatesForBreakpointconditions.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/proof/TermProgramVariableCollectorKeepUpdatesForBreakpointconditions.java index c4e4e7fbdc9..a1c26bf8fd6 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/proof/TermProgramVariableCollectorKeepUpdatesForBreakpointconditions.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/proof/TermProgramVariableCollectorKeepUpdatesForBreakpointconditions.java @@ -11,7 +11,7 @@ public class TermProgramVariableCollectorKeepUpdatesForBreakpointconditions extends TermProgramVariableCollector { - private IBreakpointStopCondition breakpointStopCondition; + private final IBreakpointStopCondition breakpointStopCondition; public TermProgramVariableCollectorKeepUpdatesForBreakpointconditions(Services services, IBreakpointStopCondition breakpointStopCondition) { diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/strategy/IBreakpointStopCondition.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/strategy/IBreakpointStopCondition.java index 211f46c21c8..1f42be9b973 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/strategy/IBreakpointStopCondition.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/strategy/IBreakpointStopCondition.java @@ -17,19 +17,19 @@ public interface IBreakpointStopCondition extends StopCondition { * * @param breakpoint The {@link IBreakpoint} to add. */ - public void addBreakpoint(IBreakpoint breakpoint); + void addBreakpoint(IBreakpoint breakpoint); /** * Removes an {@link IBreakpoint}. * * @param breakpoint The {@link IBreakpoint} to remove. */ - public void removeBreakpoint(IBreakpoint breakpoint); + void removeBreakpoint(IBreakpoint breakpoint); /** * Returns all available {@link IBreakpoint}s. * * @return The available {@link IBreakpoint}s. */ - public Set getBreakpoints(); + Set getBreakpoints(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodePreorderIterator.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodePreorderIterator.java index 697cbd123d7..f1ac260b8c4 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodePreorderIterator.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/ExecutionNodePreorderIterator.java @@ -24,7 +24,7 @@ public class ExecutionNodePreorderIterator { * The element at that the iteration has started used as end condition to make sure that only * over the subtree of the element is iterated. */ - private IExecutionNode start; + private final IExecutionNode start; /** * The next element or {@code null} if no more elements exists. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java index 74a14eca00f..ec52c328351 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java @@ -178,7 +178,7 @@ public class SymbolicExecutionTreeBuilder { * In case a {@link Node} is represented by multiple {@link AbstractExecutionNode}s, this map * maps the {@link Node} to all its representations. */ - private Map>> multipleExecutionNodes = + private final Map>> multipleExecutionNodes = new LinkedHashMap>>(); /** @@ -728,14 +728,14 @@ private class AnalyzerProofVisitor implements ProofVisitor { * Maps the {@link Node} in KeY's proof tree to the {@link IExecutionNode} of the symbolic * execution tree where the {@link Node}s children should be added to. */ - private Map> addToMapping = + private final Map> addToMapping = new LinkedHashMap>(); /** * This utility {@link Map} helps to find a {@link List} in {@link #branchConditionsStack} * for the given parent node to that elements in the {@link List} should be added. */ - private Map, List> parentToBranchConditionMapping = + private final Map, List> parentToBranchConditionMapping = new LinkedHashMap, List>(); /** diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java index fac28546b65..52c48ca5813 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutReader.java @@ -100,18 +100,18 @@ private class SEDSAXHandler extends DefaultHandler { /** * The hierarchy in building phase. */ - private Deque parentStack = new LinkedList(); + private final Deque parentStack = new LinkedList(); /** * Maps each unique object ID to the instantiated {@link ISymbolicObject}. */ - private Map objectIdMapping = + private final Map objectIdMapping = new LinkedHashMap(); /** * Maps a {@link KeYlessAssociation} to its target object ID. */ - private Map associationTargetMapping = + private final Map associationTargetMapping = new LinkedHashMap(); /** @@ -574,7 +574,7 @@ public static class KeYlessState extends AbstractKeYlessAssociationValueContaine /** * The name. */ - private String name; + private final String name; /** * Constructor. @@ -624,12 +624,12 @@ public static class KeYlessObject extends AbstractKeYlessAssociationValueContain /** * The name. */ - private String nameString; + private final String nameString; /** * The type. */ - private String typeString; + private final String typeString; /** * Constructor. @@ -712,37 +712,37 @@ public static class KeYlessValue extends AbstractKeYlessElement implements ISymb /** * The program variable. */ - private String programVariableString; + private final String programVariableString; /** * The value. */ - private String valueString; + private final String valueString; /** * The type. */ - private String typeString; + private final String typeString; /** * The name. */ - private String name; + private final String name; /** * The is array index flag. */ - private boolean isArrayIndex; + private final boolean isArrayIndex; /** * The array index. */ - private String arrayIndexString; + private final String arrayIndexString; /** * The optional condition under which this value is valid. */ - private String conditionString; + private final String conditionString; /** * Constructor. @@ -884,7 +884,7 @@ public static class KeYlessAssociation extends AbstractKeYlessElement /** * The program variable. */ - private String programVariableString; + private final String programVariableString; /** * The target. @@ -894,22 +894,22 @@ public static class KeYlessAssociation extends AbstractKeYlessElement /** * The name. */ - private String name; + private final String name; /** * The is array index flag. */ - private boolean isArrayIndex; + private final boolean isArrayIndex; /** * The array index. */ - private String arrayIndexString; + private final String arrayIndexString; /** * The optional condition under which this association is valid. */ - private String conditionString; + private final String conditionString; /** * Constructor. @@ -1053,7 +1053,7 @@ public static class KeYlessEquivalenceClass extends AbstractKeYlessElement /** * The representative term. */ - private String representativeString; + private final String representativeString; /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java index 226c6de7eec..f9fa7b4e81e 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java @@ -1269,7 +1269,7 @@ public TruthValue evaluate(FormulaTermLabel termLabel) { * * @author Martin Hentschel */ - public static enum TruthValue { + public enum TruthValue { /** * True. */ diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionAuxiliaryContract.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionAuxiliaryContract.java index 83b0f7e144a..c7ff68b7487 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionAuxiliaryContract.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionAuxiliaryContract.java @@ -26,19 +26,19 @@ public interface IExecutionAuxiliaryContract extends IExecutionNode extends IEx * * @return The call of the now returned method. */ - public IExecutionMethodCall getMethodCall(); + IExecutionMethodCall getMethodCall(); /** * Returns a human readable signature which describes this element. @@ -24,7 +24,7 @@ public interface IExecutionBaseMethodReturn extends IEx * @return The human readable signature which describes this element. * @throws ProofInputException Occurred Exception. */ - public String getSignature() throws ProofInputException; + String getSignature() throws ProofInputException; /** * Returns the condition under which this method return is reached from the calling @@ -33,7 +33,7 @@ public interface IExecutionBaseMethodReturn extends IEx * @return The method return condition to reach this node from its {@link IExecutionMethodCall} * as {@link Term}. */ - public Term getMethodReturnCondition() throws ProofInputException; + Term getMethodReturnCondition() throws ProofInputException; /** * Returns the human readable condition under which this method return is reached from the @@ -42,12 +42,12 @@ public interface IExecutionBaseMethodReturn extends IEx * @return The human readable method return condition to reach this node from its * {@link IExecutionMethodCall}. */ - public String getFormatedMethodReturnCondition() throws ProofInputException; + String getFormatedMethodReturnCondition() throws ProofInputException; /** * Returns the variable value pairs of the state when the method has been called. * * @return The variable value pairs. */ - public IExecutionVariable[] getCallStateVariables() throws ProofInputException; + IExecutionVariable[] getCallStateVariables() throws ProofInputException; } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBlockStartNode.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBlockStartNode.java index 1471aea0c4f..ff7ec95d0fb 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBlockStartNode.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBlockStartNode.java @@ -16,12 +16,12 @@ public interface IExecutionBlockStartNode extends IExec * @return {@code false} block is definitively not opened, {@code true} block is or might be * opened. */ - public boolean isBlockOpened(); + boolean isBlockOpened(); /** * Returns the up to now discovered {@link IExecutionNode}s. * * @return The up to now discovered {@link IExecutionNode}s. */ - public ImmutableList> getBlockCompletions(); + ImmutableList> getBlockCompletions(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBranchCondition.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBranchCondition.java index b9b28d49e3a..4443618a709 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBranchCondition.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionBranchCondition.java @@ -26,7 +26,7 @@ public interface IExecutionBranchCondition extends IExecutionNode * * @return The additional branch label if available or {@code null} if not available. */ - public String getAdditionalBranchLabel(); + String getAdditionalBranchLabel(); /** * Checks if the value of {@link #getBranchCondition()} is already computed. @@ -34,7 +34,7 @@ public interface IExecutionBranchCondition extends IExecutionNode * @return {@code true} value of {@link #getBranchCondition()} is already computed, * {@code false} value of {@link #getBranchCondition()} needs to be computed. */ - public boolean isBranchConditionComputed(); + boolean isBranchConditionComputed(); /** *

@@ -47,21 +47,21 @@ public interface IExecutionBranchCondition extends IExecutionNode * * @return The branch condition as {@link Term}. */ - public Term getBranchCondition() throws ProofInputException; + Term getBranchCondition() throws ProofInputException; /** * Returns the human readable branch condition as string. * * @return The human readable branch condition. */ - public String getFormatedBranchCondition() throws ProofInputException; + String getFormatedBranchCondition() throws ProofInputException; /** * Checks if this branch condition is a merged one. * * @return {@code true} is merged branch condition, {@code false} is normal branch condition. */ - public boolean isMergedBranchCondition(); + boolean isMergedBranchCondition(); /** *

@@ -74,12 +74,12 @@ public interface IExecutionBranchCondition extends IExecutionNode * * @return The merged proof nodes. */ - public Node[] getMergedProofNodes(); + Node[] getMergedProofNodes(); /** * Returns the branch condition {@link Term}s. * * @return The branch condition {@link Term}s. */ - public Term[] getMergedBranchCondtions() throws ProofInputException; + Term[] getMergedBranchCondtions() throws ProofInputException; } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionConstraint.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionConstraint.java index 6b14c0b06bc..5b92c85f3a6 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionConstraint.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionConstraint.java @@ -23,5 +23,5 @@ public interface IExecutionConstraint extends IExecutionElement { * * @return The {@link Term} representing the constraint. */ - public Term getTerm(); + Term getTerm(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionElement.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionElement.java index 771c1abf416..1783a98f906 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionElement.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionElement.java @@ -20,28 +20,28 @@ public interface IExecutionElement { * * @return The {@link ITreeSettings} to use. */ - public ITreeSettings getSettings(); + ITreeSettings getSettings(); /** * Returns the {@link Services} used by {@link #getProof()}. * * @return The {@link Services} used by {@link #getProof()}. */ - public Services getServices(); + Services getServices(); /** * Returns the {@link InitConfig} used by {@link #getProof()}. * * @return The {@link InitConfig} used by {@link #getProof()}. */ - public InitConfig getInitConfig(); + InitConfig getInitConfig(); /** * Returns the {@link Proof} from which the symbolic execution tree was extracted. * * @return The {@link Proof} from which the symbolic execution tree was extracted. */ - public Proof getProof(); + Proof getProof(); /** * Returns the {@link Node} in KeY's proof tree which is represented by this execution tree @@ -50,28 +50,28 @@ public interface IExecutionElement { * @return The {@link Node} in KeY's proof tree which is represented by this execution tree * node. */ - public Node getProofNode(); + Node getProofNode(); /** * Returns the applied {@link RuleApp}. * * @return The applied {@link RuleApp}. */ - public RuleApp getAppliedRuleApp(); + RuleApp getAppliedRuleApp(); /** * Returns the {@link PosInOccurrence} of the modality of interest including updates. * * @return The {@link PosInOccurrence} of the modality of interest including updates. */ - public PosInOccurrence getModalityPIO(); + PosInOccurrence getModalityPIO(); /** * Returns the {@link NodeInfo} of {@link #getProofNode()}. * * @return The {@link NodeInfo} of {@link #getProofNode()}. */ - public NodeInfo getProofNodeInfo(); + NodeInfo getProofNodeInfo(); /** * Returns a human readable name which describes this element. @@ -79,19 +79,19 @@ public interface IExecutionElement { * @return The human readable name which describes this element. * @throws ProofInputException Occurred Exception. */ - public String getName() throws ProofInputException; + String getName() throws ProofInputException; /** * Returns a human readable element type name. * * @return The human readable element type. */ - public String getElementType(); + String getElementType(); /** * Checks if the proof is disposed. * * @return {@code true} proof is disposed, {@code false} proof is not disposed and still valid. */ - public boolean isDisposed(); + boolean isDisposed(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionJoin.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionJoin.java index c9ec1cbd89d..a98e26b3bdc 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionJoin.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionJoin.java @@ -23,12 +23,12 @@ public interface IExecutionJoin extends IExecutionNode { * * @return {@code true} is verified, {@code false} is not verified. */ - public boolean isWeakeningVerified(); + boolean isWeakeningVerified(); /** * Checks if the weakening verification is supported. * * @return {@code true} supported, {@code false} not supported. */ - public boolean isWeakeningVerificationSupported(); + boolean isWeakeningVerificationSupported(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLink.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLink.java index cea7c36801c..0b02c1e50f0 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLink.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLink.java @@ -11,12 +11,12 @@ public interface IExecutionLink { * * @return The source. */ - public IExecutionNode getSource(); + IExecutionNode getSource(); /** * Returns the target. * * @return The target. */ - public IExecutionNode getTarget(); + IExecutionNode getTarget(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLoopCondition.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLoopCondition.java index 3584fbcf785..eaa8fdd3d88 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLoopCondition.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionLoopCondition.java @@ -25,12 +25,12 @@ public interface IExecutionLoopCondition extends IExecutionBlockStartNode { * * @return The used {@link LoopSpecification}. */ - public LoopSpecification getLoopInvariant(); + LoopSpecification getLoopInvariant(); /** * Returns the loop statement which is simulated by its loop invariant. * * @return The loop statement which is simulated by its loop invariant. */ - public While getLoopStatement(); + While getLoopStatement(); /** * Checks if the loop invariant is initially valid. * * @return {@code true} initially valid, {@code false} initially invalid. */ - public boolean isInitiallyValid(); + boolean isInitiallyValid(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodCall.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodCall.java index 947a7336ffd..5620738ab9f 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodCall.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodCall.java @@ -27,14 +27,14 @@ public interface IExecutionMethodCall extends IExecutionNode> getMethodReturns(); + ImmutableList> getMethodReturns(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodReturn.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodReturn.java index 99f62c5095a..d731d521498 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodReturn.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionMethodReturn.java @@ -25,7 +25,7 @@ public interface IExecutionMethodReturn extends IExecutionBaseMethodReturn extends IExecutionEleme * Prefix that is used in {@link IExecutionNode}s which represents an internal state in KeY * which is not part of the source code. */ - public static final String INTERNAL_NODE_NAME_START = "<"; + String INTERNAL_NODE_NAME_START = "<"; /** * Suffix that is used in {@link IExecutionNode}s which represents an internal state in KeY * which is not part of the source code. */ - public static final String INTERNAL_NODE_NAME_END = ">"; + String INTERNAL_NODE_NAME_END = ">"; /** * Returns the parent {@link IExecutionNode} or {@code null} if the current node is the root. * * @return The parent {@link IExecutionNode} or {@code null} on root. */ - public IExecutionNode getParent(); + IExecutionNode getParent(); /** * Returns the available children. * * @return The available children. */ - public IExecutionNode[] getChildren(); + IExecutionNode[] getChildren(); /** * Checks if this node has changed the path condition of the parent. @@ -65,49 +65,49 @@ public interface IExecutionNode extends IExecutionEleme * @return {@code true} has different path condition compared to its parent, {@code false} has * same path condition as parent. */ - public boolean isPathConditionChanged(); + boolean isPathConditionChanged(); /** * Returns the path condition to reach this node as {@link Term}. * * @return The path condition to reach this node as {@link Term}. */ - public Term getPathCondition() throws ProofInputException; + Term getPathCondition() throws ProofInputException; /** * Returns the human readable path condition to reach this node as string. * * @return The human readable path condition as string. */ - public String getFormatedPathCondition() throws ProofInputException; + String getFormatedPathCondition() throws ProofInputException; /** * Returns the method call stack. * * @return The method call stack. */ - public IExecutionNode[] getCallStack(); + IExecutionNode[] getCallStack(); /** * Returns all available {@link IExecutionConstraint}s. * * @return The available {@link IExecutionConstraint}s. */ - public IExecutionConstraint[] getConstraints(); + IExecutionConstraint[] getConstraints(); /** * Returns the active statement which is executed in the code. * * @return The active statement which is executed in the code. */ - public S getActiveStatement(); + S getActiveStatement(); /** * Returns the {@link PositionInfo} of {@link #getActiveStatement()}. * * @return The {@link PositionInfo} of {@link #getActiveStatement()}. */ - public PositionInfo getActivePositionInfo(); + PositionInfo getActivePositionInfo(); /** * Returns the variable value pairs of the current state. @@ -115,7 +115,7 @@ public interface IExecutionNode extends IExecutionEleme * @return The variable value pairs. * @throws ProofInputException Occurred Exception. */ - public IExecutionVariable[] getVariables() throws ProofInputException; + IExecutionVariable[] getVariables() throws ProofInputException; /** * Returns the variable value pairs of the current state under the given condition. @@ -123,7 +123,7 @@ public interface IExecutionNode extends IExecutionEleme * @param condition A {@link Term} specifying some additional constraints to consider. * @return The variable value pairs. */ - public IExecutionVariable[] getVariables(Term condition) throws ProofInputException; + IExecutionVariable[] getVariables(Term condition) throws ProofInputException; /** * Returns the number of memory layouts. @@ -131,7 +131,7 @@ public interface IExecutionNode extends IExecutionEleme * @return The number of memory layouts. * @throws ProofInputException Occurred Exception. */ - public int getLayoutsCount() throws ProofInputException; + int getLayoutsCount() throws ProofInputException; /** * Returns the equivalence classes of the memory layout with the given index. @@ -140,7 +140,7 @@ public interface IExecutionNode extends IExecutionEleme * @return The equivalence classes of the memory layout at the given index. * @throws ProofInputException Occurred Exception. */ - public ImmutableList getLayoutsEquivalenceClasses(int layoutIndex) + ImmutableList getLayoutsEquivalenceClasses(int layoutIndex) throws ProofInputException; /** @@ -150,7 +150,7 @@ public ImmutableList getLayoutsEquivalenceClasses(int * @return The initial memory layout at the given index. * @throws ProofInputException Occurred Exception. */ - public ISymbolicLayout getInitialLayout(int layoutIndex) throws ProofInputException; + ISymbolicLayout getInitialLayout(int layoutIndex) throws ProofInputException; /** * Returns the current memory layout which shows the memory structure before the current node in @@ -160,14 +160,14 @@ public ImmutableList getLayoutsEquivalenceClasses(int * @return The current memory layout at the given index. * @throws ProofInputException Occurred Exception. */ - public ISymbolicLayout getCurrentLayout(int layoutIndex) throws ProofInputException; + ISymbolicLayout getCurrentLayout(int layoutIndex) throws ProofInputException; /** * Returns all code blocks completed by this {@link IExecutionBlockStartNode}. * * @return All code blocks completed by this {@link IExecutionBlockStartNode}. */ - public ImmutableList> getCompletedBlocks(); + ImmutableList> getCompletedBlocks(); /** * Returns the condition under which this node completes the code block of the given @@ -178,7 +178,7 @@ public ImmutableList getLayoutsEquivalenceClasses(int * @return The condition under which this node completes the code block of the given * {@link IExecutionBlockStartNode}. */ - public Term getBlockCompletionCondition(IExecutionBlockStartNode completedNode) + Term getBlockCompletionCondition(IExecutionBlockStartNode completedNode) throws ProofInputException; /** @@ -190,7 +190,7 @@ public Term getBlockCompletionCondition(IExecutionBlockStartNode completedNod * @return The human readable condition under which this node completes the code block of the * given {@link IExecutionBlockStartNode}. */ - public String getFormatedBlockCompletionCondition(IExecutionBlockStartNode completedNode) + String getFormatedBlockCompletionCondition(IExecutionBlockStartNode completedNode) throws ProofInputException; /** @@ -199,14 +199,14 @@ public String getFormatedBlockCompletionCondition(IExecutionBlockStartNode co * @param target The target {@link IExecutionNode}. * @return The found {@link IExecutionLink} or {@code null} if such a link is not available. */ - public IExecutionLink getOutgoingLink(IExecutionNode target); + IExecutionLink getOutgoingLink(IExecutionNode target); /** * Returns all available outgoing links. * * @return The available outgoing links. */ - public ImmutableList getOutgoingLinks(); + ImmutableList getOutgoingLinks(); /** * Returns the incoming {@link IExecutionLink}. @@ -214,12 +214,12 @@ public String getFormatedBlockCompletionCondition(IExecutionBlockStartNode co * @param source The source {@link IExecutionNode}. * @return The found {@link IExecutionLink} or {@code null} if such a link is not available. */ - public IExecutionLink getIncomingLink(IExecutionNode source); + IExecutionLink getIncomingLink(IExecutionNode source); /** * Returns all available incoming links. * * @return The available incoming links. */ - public ImmutableList getIncomingLinks(); + ImmutableList getIncomingLinks(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionOperationContract.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionOperationContract.java index 6b2b3bea678..6a1c894dd24 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionOperationContract.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionOperationContract.java @@ -29,21 +29,21 @@ public interface IExecutionOperationContract extends IExecutionNode getContractParams() throws ProofInputException; + ImmutableList getContractParams() throws ProofInputException; /** * Returns the human readable result {@link Term} in which the result of the applied @@ -104,7 +104,7 @@ public interface IExecutionOperationContract extends IExecutionNode { /** * The default name of an {@link IExecutionStart}. */ - public static final String DEFAULT_START_NODE_NAME = + String DEFAULT_START_NODE_NAME = INTERNAL_NODE_NAME_START + "start" + INTERNAL_NODE_NAME_END; /** @@ -31,5 +31,5 @@ public interface IExecutionStart extends IExecutionNode { * * @return The up to now discovered {@link IExecutionTermination}s. */ - public ImmutableList getTerminations(); + ImmutableList getTerminations(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionTermination.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionTermination.java index d9a19c0ed97..ccba6f8c34c 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionTermination.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionTermination.java @@ -27,13 +27,13 @@ public interface IExecutionTermination extends IExecutionNode { /** * The default name of a termination node with {@link TerminationKind#NORMAL}. */ - public static final String NORMAL_TERMINATION_NODE_NAME = + String NORMAL_TERMINATION_NODE_NAME = INTERNAL_NODE_NAME_START + "end" + INTERNAL_NODE_NAME_END; /** * The default name of a termination node with {@link TerminationKind#LOOP_BODY}. */ - public static final String LOOP_BODY_TERMINATION_NODE_NAME = + String LOOP_BODY_TERMINATION_NODE_NAME = INTERNAL_NODE_NAME_START + "loop body end" + INTERNAL_NODE_NAME_END; /** @@ -42,21 +42,21 @@ public interface IExecutionTermination extends IExecutionNode { * * @return The {@link IProgramVariable} which is used to caught global exceptions. */ - public IProgramVariable getExceptionVariable(); + IProgramVariable getExceptionVariable(); /** * Returns the {@link Sort} of the caught exception. * * @return The {@link Sort} of the caught exception. */ - public Sort getExceptionSort(); + Sort getExceptionSort(); /** * Returns the {@link TerminationKind}. * * @return The {@link TerminationKind}. */ - public TerminationKind getTerminationKind(); + TerminationKind getTerminationKind(); /** * Checks if this branch would be closed without the uninterpreted predicate and thus be treated @@ -64,14 +64,14 @@ public interface IExecutionTermination extends IExecutionNode { * * @return {@code true} verified/closed, {@code false} not verified/still open */ - public boolean isBranchVerified(); + boolean isBranchVerified(); /** * Defines the possible termination kinds. * * @author Martin Hentschel */ - public static enum TerminationKind { + enum TerminationKind { /** * Normal termination without any exceptions. */ diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionValue.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionValue.java index 975ddbbf1bb..b02135785ef 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionValue.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionValue.java @@ -25,7 +25,7 @@ public interface IExecutionValue extends IExecutionElement { * @return The condition. * @throws ProofInputException Occurred Exception. */ - public Term getCondition() throws ProofInputException; + Term getCondition() throws ProofInputException; /** * Returns the condition under which the variable ({@link #getVariable()}) has this value as @@ -34,7 +34,7 @@ public interface IExecutionValue extends IExecutionElement { * @return The condition as human readable {@link String}. * @throws ProofInputException Occurred Exception. */ - public String getConditionString() throws ProofInputException; + String getConditionString() throws ProofInputException; /** *

@@ -67,21 +67,21 @@ public interface IExecutionValue extends IExecutionElement { * * @return {@code true} value is unknown, {@code false} value is known. */ - public boolean isValueUnknown() throws ProofInputException; + boolean isValueUnknown() throws ProofInputException; /** * Returns the value of the variable. * * @return The value of the variable. */ - public Term getValue() throws ProofInputException; + Term getValue() throws ProofInputException; /** * Returns the value of the variable as human readable string representation. * * @return The value of the variable as human readable string representation. */ - public String getValueString() throws ProofInputException; + String getValueString() throws ProofInputException; /** *

@@ -97,28 +97,28 @@ public interface IExecutionValue extends IExecutionElement { * parent {@link IExecutionValue}. * @throws ProofInputException Occurred Exception. */ - public boolean isValueAnObject() throws ProofInputException; + boolean isValueAnObject() throws ProofInputException; /** * Returns the type of the variable as human readable string. * * @return The type of the variable as human readable string. */ - public String getTypeString() throws ProofInputException; + String getTypeString() throws ProofInputException; /** * Returns the parent {@link IExecutionVariable}. * * @return The parent {@link IExecutionVariable}. */ - public IExecutionVariable getVariable(); + IExecutionVariable getVariable(); /** * Returns contained child variables which forms complex data types. * * @return The contained child variables. */ - public IExecutionVariable[] getChildVariables() throws ProofInputException; + IExecutionVariable[] getChildVariables() throws ProofInputException; /** * Returns all available {@link IExecutionConstraint}s. @@ -126,5 +126,5 @@ public interface IExecutionValue extends IExecutionElement { * @return The available {@link IExecutionConstraint}s. * @throws ProofInputException Occurred Exception. */ - public IExecutionConstraint[] getConstraints() throws ProofInputException; + IExecutionConstraint[] getConstraints() throws ProofInputException; } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionVariable.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionVariable.java index 5e3c4e5d366..7d0fb32bca7 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionVariable.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/IExecutionVariable.java @@ -28,14 +28,14 @@ public interface IExecutionVariable extends IExecutionElement { * * @return The {@link IProgramVariable} which contains the represented value. */ - public IProgramVariable getProgramVariable(); + IProgramVariable getProgramVariable(); /** * Returns the index in the parent array if an array cell value is represented. * * @return The index in the parent array or {@code null} if no array cell value is represented. */ - public Term getArrayIndex(); + Term getArrayIndex(); /** * Returns the human readable index in the parent array if an array cell value is represented. @@ -43,35 +43,35 @@ public interface IExecutionVariable extends IExecutionElement { * @return The human readable index in the parent array or {@code null} if no array cell value * is represented. */ - public String getArrayIndexString(); + String getArrayIndexString(); /** * Checks if the current value is part of a parent array. * * @return {@code true} is array cell value, {@code false} is a "normal" value. */ - public boolean isArrayIndex(); + boolean isArrayIndex(); /** * Returns the optional additional condition considered during value computation. * * @return The optional additional condition considered during value computation. */ - public Term getAdditionalCondition(); + Term getAdditionalCondition(); /** * Returns the parent {@link IExecutionValue} if available. * * @return The parent {@link IExecutionValue} if available and {@code null} otherwise. */ - public IExecutionValue getParentValue(); + IExecutionValue getParentValue(); /** * Returns the possible values of this {@link IExecutionVariable}. * * @return The possible values of this {@link IExecutionVariable}. */ - public IExecutionValue[] getValues() throws ProofInputException; + IExecutionValue[] getValues() throws ProofInputException; /** * Creates recursive a term which can be used to determine the value of @@ -79,5 +79,5 @@ public interface IExecutionVariable extends IExecutionElement { * * @return The created term. */ - public Term createSelectTerm(); + Term createSelectTerm(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/ITreeSettings.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/ITreeSettings.java index f8a4d91965a..c91d9a64656 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/ITreeSettings.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/ITreeSettings.java @@ -13,21 +13,21 @@ public interface ITreeSettings { * contains another branch condition or {@code false} allow that branch conditions * contains branch conditions. */ - public boolean isMergeBranchConditions(); + boolean isMergeBranchConditions(); /** * Checks if unicode characters are used. * * @return {@code true} use unicode characters, {@code false} do not use unicode characters. */ - public boolean isUseUnicode(); + boolean isUseUnicode(); /** * Checks if pretty printing is used or not. * * @return {@code true} use pretty printing, {@code false} do not use pretty printing. */ - public boolean isUsePrettyPrinting(); + boolean isUsePrettyPrinting(); /** * Checks how variables are computed. @@ -36,12 +36,12 @@ public interface ITreeSettings { * {@link IExecutionVariable}s are computed according to the type structure of the * visible memory. */ - public boolean isVariablesAreOnlyComputedFromUpdates(); + boolean isVariablesAreOnlyComputedFromUpdates(); /** * Checks if conditions should be simplified or not. * * @return {@code true} simplify conditions, {@code false} do not simplify conditions. */ - public boolean isSimplifyConditions(); + boolean isSimplifyConditions(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/IModelSettings.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/IModelSettings.java index 7f56af4aa77..5c76f4e2f29 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/IModelSettings.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/IModelSettings.java @@ -11,19 +11,19 @@ public interface IModelSettings { * * @return {@code true} use unicode characters, {@code false} do not use unicode characters. */ - public boolean isUseUnicode(); + boolean isUseUnicode(); /** * Checks if pretty printing is used or not. * * @return {@code true} use pretty printing, {@code false} do not use pretty printing. */ - public boolean isUsePrettyPrinting(); + boolean isUsePrettyPrinting(); /** * Checks if conditions should be simplified or not. * * @return {@code true} simplify conditions, {@code false} do not simplify conditions. */ - public boolean isSimplifyConditions(); + boolean isSimplifyConditions(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociation.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociation.java index 6e73d08efde..ac59f70f7d9 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociation.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociation.java @@ -22,49 +22,49 @@ public interface ISymbolicAssociation extends ISymbolicElement { * * @return A human readable name. */ - public String getName(); + String getName(); /** * Checks if an array index or a program variable is represented. * * @return {@code true} array index, {@code false} program variable. */ - public boolean isArrayIndex(); + boolean isArrayIndex(); /** * Returns the represented array index or {@code null} if a program variable is represented.. * * @return The represented array index or {@code null} if a program variable is represented.. */ - public Term getArrayIndex(); + Term getArrayIndex(); /** * Returns the human readable array index or {@code null} if a program variable is represented.. * * @return The human readable array index or {@code null} if a program variable is represented.. */ - public String getArrayIndexString(); + String getArrayIndexString(); /** * Returns the represented {@link IProgramVariable}. * * @return The represented {@link IProgramVariable}. */ - public IProgramVariable getProgramVariable(); + IProgramVariable getProgramVariable(); /** * Returns the represented {@link IProgramVariable} as human readable {@link String}. * * @return The represented {@link IProgramVariable} as human readable {@link String}. */ - public String getProgramVariableString(); + String getProgramVariableString(); /** * Returns the target {@link ISymbolicObject}. * * @return The target {@link ISymbolicObject}. */ - public ISymbolicObject getTarget(); + ISymbolicObject getTarget(); /** *

@@ -77,7 +77,7 @@ public interface ISymbolicAssociation extends ISymbolicElement { * * @return The optional condition under which this association is valid. */ - public Term getCondition(); + Term getCondition(); /** *

@@ -92,5 +92,5 @@ public interface ISymbolicAssociation extends ISymbolicElement { * @return The optional condition under which this association is valid as human readable * {@link String}. */ - public String getConditionString(); + String getConditionString(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociationValueContainer.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociationValueContainer.java index 77ccab91349..3d9480969d9 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociationValueContainer.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicAssociationValueContainer.java @@ -27,7 +27,7 @@ public interface ISymbolicAssociationValueContainer extends ISymbolicElement { * * @return The contained associations. */ - public ImmutableList getAssociations(); + ImmutableList getAssociations(); /** * Returns the {@link ISymbolicAssociation} with the given {@link IProgramVariable}. @@ -40,7 +40,7 @@ public interface ISymbolicAssociationValueContainer extends ISymbolicElement { * @return The found {@link ISymbolicAssociation} or {@code null} if no * {@link ISymbolicAssociation} is available with the given {@link IProgramVariable}. */ - public ISymbolicAssociation getAssociation(IProgramVariable programVariable, + ISymbolicAssociation getAssociation(IProgramVariable programVariable, boolean isArrayIndex, Term arrayIndex, Term condition); /** @@ -48,7 +48,7 @@ public ISymbolicAssociation getAssociation(IProgramVariable programVariable, * * @return The contained values. */ - public ImmutableList getValues(); + ImmutableList getValues(); /** * Returns the {@link ISymbolicValue} with the given {@link IProgramVariable}. @@ -61,6 +61,6 @@ public ISymbolicAssociation getAssociation(IProgramVariable programVariable, * @return The found {@link ISymbolicValue} or {@code null} if no {@link ISymbolicValue} is * available with the given {@link IProgramVariable}. */ - public ISymbolicValue getValue(IProgramVariable programVariable, boolean isArrayIndex, + ISymbolicValue getValue(IProgramVariable programVariable, boolean isArrayIndex, Term arrayIndex, Term condition); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicElement.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicElement.java index 5a109e922fa..ef53e0a70c9 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicElement.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicElement.java @@ -11,5 +11,5 @@ public interface ISymbolicElement { * * @return The {@link IModelSettings} to use. */ - public IModelSettings getSettings(); + IModelSettings getSettings(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicEquivalenceClass.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicEquivalenceClass.java index 1bfa4c4da94..84b5bf72c82 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicEquivalenceClass.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicEquivalenceClass.java @@ -16,7 +16,7 @@ public interface ISymbolicEquivalenceClass extends ISymbolicElement { * * @return The terms which represents the same {@link ISymbolicObject}. */ - public ImmutableList getTerms(); + ImmutableList getTerms(); /** * Checks if a {@link Term} is contained. @@ -24,7 +24,7 @@ public interface ISymbolicEquivalenceClass extends ISymbolicElement { * @param term The {@link Term} to check. * @return {@code true} {@link Term} is contained, {@code false} {@link Term} is not contained. */ - public boolean containsTerm(Term term); + boolean containsTerm(Term term); /** * Returns the terms which represents the same {@link ISymbolicObject} as human readable @@ -33,19 +33,19 @@ public interface ISymbolicEquivalenceClass extends ISymbolicElement { * @return The terms which represents the same {@link ISymbolicObject} as human readable * {@link String}. */ - public ImmutableList getTermStrings(); + ImmutableList getTermStrings(); /** * Returns the most representative term. * * @return The most representative term. */ - public Term getRepresentative(); + Term getRepresentative(); /** * Returns the most representative term as human readable {@link String}. * * @return The most representative term as human readable {@link String}. */ - public String getRepresentativeString(); + String getRepresentativeString(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicLayout.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicLayout.java index 7853dfb36f6..5bef08b3cd5 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicLayout.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicLayout.java @@ -33,19 +33,19 @@ public interface ISymbolicLayout extends ISymbolicElement { * * @return The equivalence classes. */ - public ImmutableList getEquivalenceClasses(); + ImmutableList getEquivalenceClasses(); /** * Returns the symbolic state. * * @return the symbolic state. */ - public ISymbolicState getState(); + ISymbolicState getState(); /** * Returns all available symbolic objects. * * @return The available symbolic objects. */ - public ImmutableList getObjects(); + ImmutableList getObjects(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicObject.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicObject.java index d5069eaa130..8bd34e162bc 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicObject.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicObject.java @@ -21,26 +21,26 @@ public interface ISymbolicObject extends ISymbolicAssociationValueContainer { * * @return The name of this object. */ - public Term getName(); + Term getName(); /** * Returns the name of this object as human readable {@link String}. * * @return The name of this object as human readable {@link String}. */ - public String getNameString(); + String getNameString(); /** * Returns the type of this object. * * @return The type of this object. */ - public Sort getType(); + Sort getType(); /** * Returns the type of this object as human readable string. * * @return The type of this object as human readable string. */ - public String getTypeString(); + String getTypeString(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicState.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicState.java index add10a8e17a..8783da68416 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicState.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicState.java @@ -19,5 +19,5 @@ public interface ISymbolicState extends ISymbolicAssociationValueContainer { * * @return The name of this state. */ - public String getName(); + String getName(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicValue.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicValue.java index da437893fb3..4a4779e31e8 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicValue.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/object_model/ISymbolicValue.java @@ -23,28 +23,28 @@ public interface ISymbolicValue extends ISymbolicElement { * * @return A human readable name. */ - public String getName(); + String getName(); /** * Checks if an array index or a program variable is represented. * * @return {@code true} array index, {@code false} program variable. */ - public boolean isArrayIndex(); + boolean isArrayIndex(); /** * Returns the represented array index or {@code null} if a program variable is represented.. * * @return The represented array index or {@code null} if a program variable is represented.. */ - public Term getArrayIndex(); + Term getArrayIndex(); /** * Returns the human readable array index or {@code null} if a program variable is represented.. * * @return The human readable array index or {@code null} if a program variable is represented.. */ - public String getArrayIndexString(); + String getArrayIndexString(); /** * Returns the represented {@link IProgramVariable} or {@code null} if an array index is @@ -53,7 +53,7 @@ public interface ISymbolicValue extends ISymbolicElement { * @return The represented {@link IProgramVariable} or {@code null} if an array index is * represented. */ - public IProgramVariable getProgramVariable(); + IProgramVariable getProgramVariable(); /** * Returns the represented {@link IProgramVariable} as human readable {@link String} or @@ -62,35 +62,35 @@ public interface ISymbolicValue extends ISymbolicElement { * @return The represented {@link IProgramVariable} as human readable {@link String} or * {@code null} if an array index is represented. */ - public String getProgramVariableString(); + String getProgramVariableString(); /** * Returns the value of the represented variable. * * @return The value of the represented variable. */ - public Term getValue(); + Term getValue(); /** * Returns the value of the represented variable as human readable {@link String}. * * @return The value of the represented variable as human readable {@link String}. */ - public String getValueString(); + String getValueString(); /** * Returns the type of the value. * * @return The type of the value. */ - public Sort getType(); + Sort getType(); /** * Returns the type of the value as human readable string. * * @return The type of the value as human readable string. */ - public String getTypeString(); + String getTypeString(); /** *

@@ -103,7 +103,7 @@ public interface ISymbolicValue extends ISymbolicElement { * * @return The optional condition under which this value is valid. */ - public Term getCondition(); + Term getCondition(); /** *

@@ -118,5 +118,5 @@ public interface ISymbolicValue extends ISymbolicElement { * @return The optional condition under which this value is valid as human readable * {@link String}. */ - public String getConditionString(); + String getConditionString(); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodPO.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodPO.java index 85fe1e50d45..8135251831d 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodPO.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodPO.java @@ -58,12 +58,12 @@ public class ProgramMethodPO extends AbstractOperationPO { /** * The {@link IProgramMethod} to execute code parts from. */ - private IProgramMethod pm; + private final IProgramMethod pm; /** * The precondition in JML syntax. */ - private String precondition; + private final String precondition; /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodSubsetPO.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodSubsetPO.java index 5e07b9dfc74..f82ba2ceb94 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodSubsetPO.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/po/ProgramMethodSubsetPO.java @@ -71,12 +71,12 @@ public class ProgramMethodSubsetPO extends ProgramMethodPO { /** * The start position. */ - private Position startPosition; + private final Position startPosition; /** * The end position. */ - private Position endPosition; + private final Position endPosition; /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/AbstractCallStackBasedStopCondition.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/AbstractCallStackBasedStopCondition.java index 5206b8c2c81..9c89659bbfc 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/AbstractCallStackBasedStopCondition.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/AbstractCallStackBasedStopCondition.java @@ -25,7 +25,7 @@ public abstract class AbstractCallStackBasedStopCondition implements StopConditi /** * Maps a {@link Goal} to the initial call stack size at which the auto mode was started. */ - private Map startingCallStackSizePerGoal = + private final Map startingCallStackSizePerGoal = new LinkedHashMap(); /** @@ -164,12 +164,12 @@ private static class NodeStartEntry { /** * The initial {@link Node} of a {@link Goal} on that the auto mode was started. */ - private Node node; + private final Node node; /** * The call stack size of {@link #node}. */ - private int nodeCallStackSize; + private final int nodeCallStackSize; /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/CompoundStopCondition.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/CompoundStopCondition.java index 77ad9917bd2..22682eb8f9c 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/CompoundStopCondition.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/CompoundStopCondition.java @@ -22,7 +22,7 @@ public class CompoundStopCondition implements StopCondition { /** * The child {@link StopCondition}s to use. */ - private List children = new LinkedList(); + private final List children = new LinkedList(); /** * The last {@link StopCondition} treated in diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/SymbolicExecutionGoalChooser.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/SymbolicExecutionGoalChooser.java index 40cc456dfb2..89f5025cab3 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/SymbolicExecutionGoalChooser.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/SymbolicExecutionGoalChooser.java @@ -50,7 +50,7 @@ public class SymbolicExecutionGoalChooser extends DepthFirstGoalChooser { * {@link Set} is empty which indicates that on all {@link Goal}s a symbolic execution tree node * was created. Then the process starts again. */ - private Set goalsToPrefer = new LinkedHashSet(); + private final Set goalsToPrefer = new LinkedHashSet(); /** * The optional custom stop condition used in the current proof. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/AbstractConditionalBreakpoint.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/AbstractConditionalBreakpoint.java index 8b38c10c71f..738f06bbe2c 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/AbstractConditionalBreakpoint.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/AbstractConditionalBreakpoint.java @@ -62,12 +62,12 @@ public abstract class AbstractConditionalBreakpoint extends AbstractHitCountBrea /** * The KeYJavaType of the container of the element associated with the breakpoint. */ - private KeYJavaType containerType; + private final KeYJavaType containerType; /** * A list of variables KeY has to hold to evaluate the condition */ - private Set toKeep; + private final Set toKeep; /** * A {@link Map} mapping from relevant variables for the condition to their runtime equivalent @@ -78,7 +78,7 @@ public abstract class AbstractConditionalBreakpoint extends AbstractHitCountBrea /** * The list of parameter variables of the method that contains the associated breakpoint */ - private Set paramVars; + private final Set paramVars; /** * A {@link ProgramVariable} representing the instance the class KeY is working on @@ -317,9 +317,10 @@ private Term computeTermForCondition(String condition) { info.getAllFields((TypeDeclaration) kjtloc.getJavaType()); for (Field field : fields) { if ((kjtloc.equals(containerType) || !field.isPrivate()) - && !((LocationVariable) field.getProgramVariable()).isImplicit()) + && !((LocationVariable) field.getProgramVariable()).isImplicit()) { globalVars = globalVars.append((ProgramVariable) field.getProgramVariable()); + } } } } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/ExceptionBreakpoint.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/ExceptionBreakpoint.java index 1f0d3969dcc..e6691d15d64 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/ExceptionBreakpoint.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/ExceptionBreakpoint.java @@ -25,12 +25,12 @@ public class ExceptionBreakpoint extends AbstractHitCountBreakpoint { /** * The exception to watch for */ - private String exceptionName; + private final String exceptionName; /** * a list of nodes of the Symbolic Execution Tree whose children represent exceptions */ - private Set exceptionParentNodes; + private final Set exceptionParentNodes; /** * a flag whether to watch for an uncaught exception diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/FieldWatchpoint.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/FieldWatchpoint.java index 81b6e3aabe5..726c54b1763 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/FieldWatchpoint.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/FieldWatchpoint.java @@ -24,7 +24,7 @@ public class FieldWatchpoint extends AbstractHitCountBreakpoint { private boolean isModification; - private String fullFieldName; + private final String fullFieldName; /** * Creates a new {@link FieldWatchpoint}. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/IBreakpoint.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/IBreakpoint.java index 0601fc5fd0f..fd01498a5a4 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/IBreakpoint.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/IBreakpoint.java @@ -19,7 +19,7 @@ public interface IBreakpoint { * * @return true if Breakpoint is enabled */ - public boolean isEnabled(); + boolean isEnabled(); /** * This method is called from @@ -36,7 +36,7 @@ public interface IBreakpoint { * @param countApplied The number of already applied rules. * @param goal The current {@link Goal} on which the next rule will be applied. */ - public void updateState(int maxApplications, long timeout, Proof proof, long startTime, + void updateState(int maxApplications, long timeout, Proof proof, long startTime, int countApplied, Goal goal); /** @@ -49,6 +49,6 @@ public void updateState(int maxApplications, long timeout, Proof proof, long sta * @param node the current node * @return true if execution should hold */ - public boolean isBreakpointHit(SourceElement activeStatement, RuleApp ruleApp, Proof proof, + boolean isBreakpointHit(SourceElement activeStatement, RuleApp ruleApp, Proof proof, Node node); } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/LineBreakpoint.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/LineBreakpoint.java index aa8729067dc..91022978bee 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/LineBreakpoint.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/LineBreakpoint.java @@ -26,7 +26,7 @@ public class LineBreakpoint extends AbstractConditionalBreakpoint { /** * The line of the Breakpoint in the respective class. */ - private int lineNumber; + private final int lineNumber; /** * The start of the method containing the associated Breakpoint diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/SymbolicExecutionExceptionBreakpoint.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/SymbolicExecutionExceptionBreakpoint.java index f8c0db68a13..24448d70bcd 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/SymbolicExecutionExceptionBreakpoint.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/strategy/breakpoint/SymbolicExecutionExceptionBreakpoint.java @@ -27,17 +27,17 @@ public class SymbolicExecutionExceptionBreakpoint extends AbstractHitCountBreakp /** * The exception to watch for */ - private String exceptionName; + private final String exceptionName; /** * a Set of Nodes that represent exceptions */ - private Set exceptionNodes; + private final Set exceptionNodes; /** * a list of nodes of the Symbolic Execution Tree whose children represent exceptions */ - private Set exceptionParentNodes; + private final Set exceptionParentNodes; /** * a flag whether to watch for an uncaught exception diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/DefaultEntry.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/DefaultEntry.java index c8a30068714..7a57f85dd03 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/DefaultEntry.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/DefaultEntry.java @@ -3,7 +3,7 @@ import java.util.Map.Entry; public class DefaultEntry implements Entry { - private K key; + private final K key; private V value; diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/EqualsHashCodeResetter.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/EqualsHashCodeResetter.java index b42975458c8..f58552cce80 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/EqualsHashCodeResetter.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/EqualsHashCodeResetter.java @@ -27,7 +27,7 @@ public class EqualsHashCodeResetter { * The wrapped elements on that {@link #equals(Object)} and {@link #hashCode()} is reset to * default Java implementation. */ - private T wrappedElement; + private final T wrappedElement; /** * Constructor diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SideProofStore.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SideProofStore.java index aded4cc69ef..38b3cd5a2ba 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SideProofStore.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SideProofStore.java @@ -59,7 +59,7 @@ public final class SideProofStore { /** * The {@link PropertyChangeSupport}. */ - private PropertyChangeSupport pcs = new PropertyChangeSupport(this); + private final PropertyChangeSupport pcs = new PropertyChangeSupport(this); /** * Forbid other instances. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionEnvironment.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionEnvironment.java index 20ecf6acaf3..074fb532dfc 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionEnvironment.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionEnvironment.java @@ -22,7 +22,7 @@ public class SymbolicExecutionEnvironment /** * The {@link SymbolicExecutionTreeBuilder} for execution tree extraction. */ - private SymbolicExecutionTreeBuilder builder; + private final SymbolicExecutionTreeBuilder builder; /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionSideProofUtil.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionSideProofUtil.java index 497ca99f45f..cf560f140e4 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionSideProofUtil.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionSideProofUtil.java @@ -494,12 +494,12 @@ protected static class ContainsIrrelevantThingsVisitor extends DefaultVisitor { /** * The {@link Services} to use. */ - private Services services; + private final Services services; /** * The relevant things. */ - private Set relevantThings; + private final Set relevantThings; /** * The result. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java index c44127ef67e..1be4e0a588e 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java @@ -566,12 +566,12 @@ public static class SiteProofVariableValueInput { /** * The sequent to prove. */ - private Sequent sequentToProve; + private final Sequent sequentToProve; /** * The {@link Operator} which is the predicate that contains the value interested in. */ - private Operator operator; + private final Operator operator; /** * Constructor. @@ -1472,14 +1472,14 @@ private static final class FindModalityWithSymbolicExecutionLabelId extends Defa /** * {@code true} search maximal ID, {@code false} search minimal ID. */ - private boolean maximum; + private final boolean maximum; /** * The current {@link PosInTerm}. */ private PosInTerm currentPosInTerm = null; - private Deque indexStack = new LinkedList(); + private final Deque indexStack = new LinkedList(); /** * Constructor. @@ -2132,22 +2132,22 @@ public static class ContractPostOrExcPostExceptionVariableResult { /** * The working {@link Term}. */ - private Term workingTerm; + private final Term workingTerm; /** * The updates. */ - private Pair, Term> updatesAndTerm; + private final Pair, Term> updatesAndTerm; /** * The exception definition. */ - private Term exceptionDefinition; + private final Term exceptionDefinition; /** * The equality which contains the equality. */ - private Term exceptionEquality; + private final Term exceptionEquality; /** * Constructor. diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/event/ISideProofStoreListener.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/event/ISideProofStoreListener.java index 3a046a77e29..30cbe1f62b3 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/event/ISideProofStoreListener.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/event/ISideProofStoreListener.java @@ -16,12 +16,12 @@ public interface ISideProofStoreListener extends EventListener { * * @param e The {@link SideProofStoreEvent}. */ - public void entriesAdded(SideProofStoreEvent e); + void entriesAdded(SideProofStoreEvent e); /** * When existing {@link Entry}s were removed. * * @param e The {@link SideProofStoreEvent}. */ - public void entriesRemoved(SideProofStoreEvent e); + void entriesRemoved(SideProofStoreEvent e); } diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/macros/SemanticsBlastingMacro.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/macros/SemanticsBlastingMacro.java index 19da998c9c1..e3ee896efe1 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/macros/SemanticsBlastingMacro.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/macros/SemanticsBlastingMacro.java @@ -159,7 +159,7 @@ public boolean filter(Rule rule) { } private class EqualityRuleFilter implements RuleFilter { - private HashSet allowedRulesNames; + private final HashSet allowedRulesNames; { allowedRulesNames = new HashSet(); allowedRulesNames.add("equalityToElementOf"); diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/StopRequest.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/StopRequest.java index 26911dd7adb..b0e375fa59b 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/StopRequest.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/StopRequest.java @@ -1,5 +1,5 @@ package de.uka.ilkd.key.smt.testgen; public interface StopRequest { - public boolean shouldStop(); + boolean shouldStop(); } diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/TestGenerationLog.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/TestGenerationLog.java index e542619d683..fead1db521e 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/TestGenerationLog.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/smt/testgen/TestGenerationLog.java @@ -1,11 +1,11 @@ package de.uka.ilkd.key.smt.testgen; public interface TestGenerationLog { - public void writeln(String string); + void writeln(String string); - public void write(String string); + void write(String string); - public void writeException(Throwable t); + void writeException(Throwable t); - public void testGenerationCompleted(); + void testGenerationCompleted(); } diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ModelGenerator.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ModelGenerator.java index 4c2cbe8e2c5..66105939c45 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ModelGenerator.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ModelGenerator.java @@ -35,7 +35,7 @@ public class ModelGenerator implements SolverLauncherListener { private final Services services; - private Goal goal; + private final Goal goal; private int count; diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ReflectionClassCreator.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ReflectionClassCreator.java index 9504d13dad7..d3e6b6a3393 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ReflectionClassCreator.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/ReflectionClassCreator.java @@ -356,12 +356,13 @@ private StringBuilder declareSetter(final String sort, final boolean prim) { } private String primToWrapClass(String sort) { - if (sort.equals("int")) + if (sort.equals("int")) { return "Integer"; - else if (sort.equals("char")) + } else if (sort.equals("char")) { return "Character"; - else + } else { return Character.toUpperCase(sort.charAt(0)) + sort.substring(1); + } } private StringBuilder declareGetter(final String sort, final String def, final boolean prim) { diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java index ad18a76bc5b..cd0829dddab 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java @@ -472,8 +472,9 @@ public String generateJUnitTestSuite(Collection problemSolvers) throw exportCodeUnderTest(); createDummyClasses(); try { - if (useRFL) + if (useRFL) { writeRFLFile(); + } } catch (Exception ex) { logger.writeln("Error: The file RFL" + JAVA_FILE_EXTENSION_WITH_DOT + " is either not generated or it has an error."); @@ -763,8 +764,9 @@ public String generateTestCase(Model m, Map typeInfMap) { right = "RFL.new" + ReflectionClassCreator.cleanTypeName(type) + "()"; rflCreator.addSort(type); LOGGER.debug("Adding sort (create Object): {}", type); - } else + } else { right = "new " + type + "()"; + } } String objName = createObjectName(o); diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/ModifiesSetTranslator.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/ModifiesSetTranslator.java index 0a6bf6e0c5d..75b8eb26162 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/ModifiesSetTranslator.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/ModifiesSetTranslator.java @@ -6,8 +6,8 @@ public class ModifiesSetTranslator { - private Services services; - private OracleGenerator gen; + private final Services services; + private final OracleGenerator gen; public boolean isSingleTon(Term t) { diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleBinTerm.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleBinTerm.java index 1e208839023..044459276e3 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleBinTerm.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleBinTerm.java @@ -2,11 +2,11 @@ public class OracleBinTerm implements OracleTerm { - private String op; + private final String op; - private OracleTerm left; + private final OracleTerm left; - private OracleTerm right; + private final OracleTerm right; public OracleBinTerm(String op, OracleTerm left, OracleTerm right) { super(); diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleConstant.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleConstant.java index c319891f5dc..9699a482b16 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleConstant.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleConstant.java @@ -4,7 +4,7 @@ public class OracleConstant implements OracleTerm { - private String value; + private final String value; private Sort sort; diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleInvariantTranslator.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleInvariantTranslator.java index 8cd84aa8e9c..b1b5625ad05 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleInvariantTranslator.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleInvariantTranslator.java @@ -18,7 +18,7 @@ public class OracleInvariantTranslator { - private Services services; + private final Services services; public OracleInvariantTranslator(Services services) { this.services = services; diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocation.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocation.java index 2138a9c5996..6c000382a2c 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocation.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocation.java @@ -4,9 +4,9 @@ public class OracleLocation { public static String ALL_FIELDS = ""; - private String object; + private final String object; - private String field; + private final String field; public OracleLocation(String object, String field) { this.object = object; diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocationSet.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocationSet.java index 3fa99aba6d9..1f420fba1ec 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocationSet.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleLocationSet.java @@ -5,7 +5,7 @@ public class OracleLocationSet { - private Set locs; + private final Set locs; public static final EmptyOracleLocationSet EMPTY = new EmptyOracleLocationSet(); diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleMethodCall.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleMethodCall.java index 6add6fc34da..b261b76c18d 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleMethodCall.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleMethodCall.java @@ -4,9 +4,9 @@ public class OracleMethodCall implements OracleTerm { - private OracleMethod method; - private List args; - private OracleTerm caller; + private final OracleMethod method; + private final List args; + private final OracleTerm caller; public OracleMethodCall(OracleMethod method, List args) { super(); diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleType.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleType.java index 92cc72adf01..aea510bd8fa 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleType.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleType.java @@ -4,7 +4,7 @@ public class OracleType implements OracleTerm { - private Sort s; + private final Sort s; public OracleType(Sort s) { super(); diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleUnaryTerm.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleUnaryTerm.java index c71bcd51bb8..58e53b3b316 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleUnaryTerm.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleUnaryTerm.java @@ -9,11 +9,11 @@ public class OracleUnaryTerm implements OracleTerm { public enum Op { Neg, Minus - }; + } public static String OP_NEG = "!"; public static String OP_MINUS = "-"; - private static Map op2String; + private static final Map op2String; static { op2String = new HashMap(); @@ -22,8 +22,8 @@ public enum Op { } - private OracleTerm sub; - private Op op; + private final OracleTerm sub; + private final Op op; public OracleUnaryTerm(OracleTerm sub, Op op) { this.sub = sub; diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleVariable.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleVariable.java index b802e11be44..a7cbed48514 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleVariable.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/oracle/OracleVariable.java @@ -4,9 +4,9 @@ public class OracleVariable implements OracleTerm { - private String name; + private final String name; - private Sort sort; + private final Sort sort; public OracleVariable(String name, Sort sort) { this.name = name; @@ -24,23 +24,30 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } OracleVariable other = (OracleVariable) obj; if (name == null) { - if (other.name != null) + if (other.name != null) { return false; - } else if (!name.equals(other.name)) + } + } else if (!name.equals(other.name)) { return false; + } if (sort == null) { - if (other.sort != null) + if (other.sort != null) { return false; - } else if (!sort.equals(other.sort)) + } + } else if (!sort.equals(other.sort)) { return false; + } return true; } diff --git a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/RIFLTransformer.java b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/RIFLTransformer.java index c0d33182acb..4840e3069f1 100644 --- a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/RIFLTransformer.java +++ b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/RIFLTransformer.java @@ -73,8 +73,9 @@ public static void main(String[] args) { */ public static boolean transform(File riflFilename, File javaSource, File savePath, KeYRecoderExcHandler kexh) { - if (riflFilename == null || javaSource == null || savePath == null || kexh == null) + if (riflFilename == null || javaSource == null || savePath == null || kexh == null) { throw new IllegalArgumentException("A parameter is null"); + } RIFLTransformer rt; try { @@ -109,10 +110,11 @@ public static File getDefaultSavePath(File origSourcePath) { } private static File getBaseDirPath(File origSourcePath) { - if (origSourcePath.isFile()) + if (origSourcePath.isFile()) { return origSourcePath.getParentFile(); - else + } else { return origSourcePath; + } } private Map readJava(File root) throws IOException, ParserException { diff --git a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SecurityLattice.java b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SecurityLattice.java index 27e2e45f4ec..269b036708c 100644 --- a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SecurityLattice.java +++ b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SecurityLattice.java @@ -38,8 +38,9 @@ public SecurityLattice() { */ SecurityDomain addDomain(String name) { SecurityDomain d = new SecurityDomain(name.intern()); - if (hash.contains(d)) + if (hash.contains(d)) { throw new IllegalArgumentException("Domain already in lattice (names must be unique)"); + } d.putSubDomain(bottom); top.putSubDomain(d); hash.add(d); @@ -51,16 +52,20 @@ SecurityDomain addDomain(String name) { * whether the domains are already in the lattice and that the lattice is still acyclic. */ void putSubDomain(SecurityDomain sup, SecurityDomain sub) { - if (sup == top || sub == bottom) + if (sup == top || sub == bottom) { return; // safely ignore this - if (!hash.contains(sup)) + } + if (!hash.contains(sup)) { throw new IllegalArgumentException( "Security domain " + sup + " must be added to the lattice first."); - if (!hash.contains(sub)) + } + if (!hash.contains(sub)) { throw new IllegalArgumentException( "Security domain " + sub + " must be added to the lattice first."); - if (sup == sub || sub.isSuperDomain(sup)) + } + if (sup == sub || sub.isSuperDomain(sup)) { throw new IllegalArgumentException("Security lattice must be acyclic."); + } sup.putSubDomain(sub); } @@ -78,8 +83,8 @@ void putSubDomain(SecurityDomain sup, SecurityDomain sub) { public final class SecurityDomain { private final String name; - private Set superDomains; - private Set subDomains; + private final Set superDomains; + private final Set subDomains; private SecurityDomain(String name) { this.name = name; @@ -97,11 +102,13 @@ private void putSubDomain(SecurityDomain sub) { */ // TODO: do we really want strict super-elements?? public boolean isSuperDomain(SecurityDomain other) { - if (other == this) + if (other == this) { return false; + } for (SecurityDomain sub : subDomains) { - if (sub == other || sub.isSuperDomain(other)) + if (sub == other || sub.isSuperDomain(other)) { return true; + } } return false; } @@ -110,11 +117,13 @@ public boolean isSuperDomain(SecurityDomain other) { * Returns whether this domain is strictly lower in the hierarchy than the other one. */ public boolean isSubDomain(SecurityDomain other) { - if (other == this) + if (other == this) { return false; + } for (SecurityDomain sup : superDomains) { - if (sup == other || sup.isSubDomain(other)) + if (sup == other || sup.isSubDomain(other)) { return true; + } } return false; } diff --git a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationContainer.java b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationContainer.java index 92e80bebbc4..2347b8719f2 100644 --- a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationContainer.java +++ b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationContainer.java @@ -21,39 +21,39 @@ public interface SpecificationContainer { * Return the security level of the field, represented as a String. Convenience method for * Recoder AST element. */ - public String field(FieldDeclaration fd, Type type); + String field(FieldDeclaration fd, Type type); /** * Return the security level of the field, represented as a String. */ - public String field(String inPackage, String inClass, String name, Type type); + String field(String inPackage, String inClass, String name, Type type); /** * Return the security level of the method parameter, represented as a String. Convenience * method for Recoder AST element. */ - public String parameter(MethodDeclaration md, int index, Type type); + String parameter(MethodDeclaration md, int index, Type type); /** * Return the security level of the method parameter, represented as a String. */ - public String parameter(String inPackage, String inClass, String methodName, + String parameter(String inPackage, String inClass, String methodName, String[] paramTypes, int index, Type type); /** * Return the security level of the method return, represented as a String. Convenience method * for Recoder AST element. */ - public String returnValue(MethodDeclaration md, Type type); + String returnValue(MethodDeclaration md, Type type); /** * Return the security level of the method return, represented as a String. */ - public String returnValue(String inPackage, String inClass, String methodName, + String returnValue(String inPackage, String inClass, String methodName, String[] paramTypes, Type type); /** * Return the domains from which the given domain flows */ - public Set flows(String domain); + Set flows(String domain); } diff --git a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationEntity.java b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationEntity.java index 8f06f6464b1..3c82712fb43 100644 --- a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationEntity.java +++ b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationEntity.java @@ -11,7 +11,7 @@ */ public abstract class SpecificationEntity { - static enum Type { + enum Type { SOURCE, SINK } @@ -109,8 +109,9 @@ public int hashCode() { @Override public String qualifiedName() { final StringBuffer sb = new StringBuffer(); - if (!"".equals(inPackage)) + if (!"".equals(inPackage)) { sb.append(inPackage + "."); + } sb.append(inClass + "#" + methodName + "("); int i = 1; for (final String p : paramTypes) { @@ -179,8 +180,9 @@ public int hashCode() { @Override public String qualifiedName() { final StringBuffer sb = new StringBuffer(); - if (!"".equals(inPackage)) + if (!"".equals(inPackage)) { sb.append(inPackage + "."); + } sb.append(inClass + "#" + methodName + "("); for (final String p : paramTypes) { sb.append(p); diff --git a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationInjector.java b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationInjector.java index 7b620ce5483..c740106960a 100644 --- a/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationInjector.java +++ b/key.core/rifl/src/main/java/de/uka/ilkd/key/util/rifl/SpecificationInjector.java @@ -160,8 +160,9 @@ String getSpecification() { } private void put(String key, Entry value) { - if (key == null) + if (key == null) { return; + } Set> target = respects.get(key); if (target == null) { target = new LinkedHashSet<>(); @@ -179,7 +180,7 @@ private void put(String key, Type t, String value) { private final SpecificationContainer sc; private final SourceInfo si; - private List specifiedMethodDeclarations; + private final List specifiedMethodDeclarations; public SpecificationInjector(SpecificationContainer sc, SourceInfo sourceInfo) { this.sc = sc; @@ -196,8 +197,9 @@ public List getSpecifiedMethodDeclarations() { // //////////////////////////////////////////////////////////// private void accessChildren(JavaNonTerminalProgramElement pe) { - for (int i = 0; i < pe.getChildCount(); i++) + for (int i = 0; i < pe.getChildCount(); i++) { pe.getChildAt(i).accept(this); + } } private void addComment(JavaProgramElement se, String comment) { @@ -218,8 +220,9 @@ private void addComment(JavaProgramElement se, String comment) { final ASTArrayList commentList = new ASTArrayList<>(); final ASTList oldComments = se.getComments(); - if (oldComments != null) + if (oldComments != null) { commentList.addAll(oldComments); + } if (comment != null && !comment.isEmpty()) { commentList.add(new Comment(comment)); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/api/Matcher.java b/key.core/src/main/java/de/uka/ilkd/key/api/Matcher.java index 7a9baf0f91c..a00847610dc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/api/Matcher.java +++ b/key.core/src/main/java/de/uka/ilkd/key/api/Matcher.java @@ -81,8 +81,9 @@ public List matchPattern(String pattern, Sequent currentSeq SequentFormula[] patternArray = new SequentFormula[patternSeq.size()]; int i = 0; - for (SequentFormula fm : patternSeq) + for (SequentFormula fm : patternSeq) { patternArray[i++] = fm; + } Queue queue = new LinkedList<>(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/api/ProofMacroApi.java b/key.core/src/main/java/de/uka/ilkd/key/api/ProofMacroApi.java index 9c8a567e7fe..342752691e4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/api/ProofMacroApi.java +++ b/key.core/src/main/java/de/uka/ilkd/key/api/ProofMacroApi.java @@ -14,7 +14,7 @@ * @version 1 (09.05.17) */ public class ProofMacroApi { - private Map commandMap = new HashMap<>(); + private final Map commandMap = new HashMap<>(); public ProofMacroApi() { initialize(); @@ -23,8 +23,9 @@ public ProofMacroApi() { private void initialize() { ServiceLoader loader = ServiceLoader.load(ProofMacro.class); loader.forEach(psc -> { - if (psc.getScriptCommandName() != null) + if (psc.getScriptCommandName() != null) { commandMap.put(psc.getScriptCommandName(), psc); + } }); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/api/ProofManagementApi.java b/key.core/src/main/java/de/uka/ilkd/key/api/ProofManagementApi.java index 259e476e346..11ec208e815 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/api/ProofManagementApi.java +++ b/key.core/src/main/java/de/uka/ilkd/key/api/ProofManagementApi.java @@ -22,7 +22,7 @@ * @author Sarah Grebing. */ public class ProofManagementApi { - private KeYEnvironment currentEnv; + private final KeYEnvironment currentEnv; private final List proofContracts = new ArrayList<>(); private HashSet ruleNames; @@ -41,8 +41,9 @@ public Services getServices() { * exception here) */ public List getProofContracts() { - if (proofContracts.isEmpty()) + if (proofContracts.isEmpty()) { buildContracts(); + } return proofContracts; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/api/ProofScriptCommandApi.java b/key.core/src/main/java/de/uka/ilkd/key/api/ProofScriptCommandApi.java index 3744f497b54..182c13ebe67 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/api/ProofScriptCommandApi.java +++ b/key.core/src/main/java/de/uka/ilkd/key/api/ProofScriptCommandApi.java @@ -14,7 +14,7 @@ * @version 1 (21.04.17) */ public class ProofScriptCommandApi { - private Map commandMap = new HashMap<>(); + private final Map commandMap = new HashMap<>(); public ProofScriptCommandApi() { initialize(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/api/ScriptApi.java b/key.core/src/main/java/de/uka/ilkd/key/api/ScriptApi.java index 9239d1017ad..d03c7bd2df3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/api/ScriptApi.java +++ b/key.core/src/main/java/de/uka/ilkd/key/api/ScriptApi.java @@ -1,12 +1,5 @@ package de.uka.ilkd.key.api; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Queue; - -import org.key_project.util.collection.ImmutableList; - import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.Term; @@ -15,6 +8,12 @@ import de.uka.ilkd.key.macros.scripts.ScriptException; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Node; +import org.key_project.util.collection.ImmutableList; + +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Queue; /** * This API class offers methods to apply script commands and match commands @@ -25,7 +24,7 @@ public class ScriptApi { private final ProofApi api; private final EngineState state; - private Matcher matcher; + private final Matcher matcher; public ScriptApi(ProofApi proofApi) { api = proofApi; diff --git a/key.core/src/main/java/de/uka/ilkd/key/api/ScriptResults.java b/key.core/src/main/java/de/uka/ilkd/key/api/ScriptResults.java index 36efbe70e65..49a8f048b01 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/api/ScriptResults.java +++ b/key.core/src/main/java/de/uka/ilkd/key/api/ScriptResults.java @@ -11,7 +11,7 @@ * @version 1 (21.04.17) */ public class ScriptResults implements List { - private List delegated = new ArrayList<>(); + private final List delegated = new ArrayList<>(); @Override public int size() { diff --git a/key.core/src/main/java/de/uka/ilkd/key/api/VariableAssignments.java b/key.core/src/main/java/de/uka/ilkd/key/api/VariableAssignments.java index f4e17183585..360a6eeec80 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/api/VariableAssignments.java +++ b/key.core/src/main/java/de/uka/ilkd/key/api/VariableAssignments.java @@ -28,17 +28,17 @@ public String getKeYDeclarationPrefix() { /** * Reference to parent assignments */ - private VariableAssignments parent; + private final VariableAssignments parent; /** * Current Assignments */ - private Map currentAssignments; + private final Map currentAssignments; /** * Type Map of assignments */ - private Map typeMap; + private final Map typeMap; /** * Create new, empty variable assignment, to add variables diff --git a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/PartialComparator.java b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/PartialComparator.java index 2a29fc46a75..0a488df782c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/PartialComparator.java +++ b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/PartialComparator.java @@ -21,7 +21,7 @@ public interface PartialComparator { /** * Possible results of the comparison. */ - public static enum PartialComparisonResult { + enum PartialComparisonResult { LTE, GTE, EQ, UNDEF } @@ -36,6 +36,6 @@ public static enum PartialComparisonResult { * @return LTE, EQ, or GTE as the first argument is less than, equal to, or greater than the * second; returns UNDEF if the arguments are incomparable. */ - public PartialComparisonResult compare(T o1, T o2); + PartialComparisonResult compare(T o1, T o2); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java index bdc3ef6f2d0..404f3f6bc1d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java +++ b/key.core/src/main/java/de/uka/ilkd/key/axiom_abstraction/predicateabstraction/AbstractionPredicate.java @@ -29,7 +29,7 @@ public abstract class AbstractionPredicate implements Function, Name /** * The sort for the argument of this {@link AbstractionPredicate}. */ - private Sort argSort; + private final Sort argSort; /** * The predicate term. Contains a placeholder ({@link #placeholderVariable}) which is to be @@ -180,7 +180,8 @@ public String toParseableString(final Services services) { sb.append("(").append("'").append(predicateFormWithPlaceholder.first.sort()).append(" ") .append(predicateFormWithPlaceholder.first).append("', '") .append(OutputStreamProofSaver.escapeCharacters(OutputStreamProofSaver - .printAnything(predicateFormWithPlaceholder.second, services, false).trim().replaceAll("(\\r|\\n|\\r\\n)+", ""))) + .printAnything(predicateFormWithPlaceholder.second, services, false).trim() + .replaceAll("(\\r|\\n|\\r\\n)+", ""))) .append("')"); return sb.toString(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java b/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java index ebc78907b10..56dbbb42a57 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/AbstractProofControl.java @@ -211,8 +211,9 @@ public boolean selectedTaclet(ImmutableSet applics, Goal goal) { } TacletApp tmpApp = firstApp.tryToInstantiate(services.getOverlay(goal.getLocalNamespaces())); - if (tmpApp != null) + if (tmpApp != null) { firstApp = tmpApp; + } } if (ifSeqInteraction || !firstApp.complete()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/CompositePTListener.java b/key.core/src/main/java/de/uka/ilkd/key/control/CompositePTListener.java index 8d908789291..c24e2868dd2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/CompositePTListener.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/CompositePTListener.java @@ -11,7 +11,7 @@ * @author Michael Kirsten */ public class CompositePTListener implements ProverTaskListener { - private ProverTaskListener[] listeners; + private final ProverTaskListener[] listeners; public CompositePTListener(ProverTaskListener[] l) { this.listeners = l; diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/InteractionListener.java b/key.core/src/main/java/de/uka/ilkd/key/control/InteractionListener.java index b3e104ead5d..aea8bbf00cb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/InteractionListener.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/InteractionListener.java @@ -32,7 +32,7 @@ void runBuiltInRule(Node node, IBuiltInRuleApp app, BuiltInRule rule, PosInOccur void runRule(Node goal, RuleApp app); - public enum SettingType { + enum SettingType { SMT, CHOICE, STRATEGY } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/ProofControl.java b/key.core/src/main/java/de/uka/ilkd/key/control/ProofControl.java index b077dc5c5ed..fabcafc895e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/ProofControl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/ProofControl.java @@ -30,39 +30,39 @@ * @author Martin Hentschel */ public interface ProofControl { - public boolean isMinimizeInteraction(); + boolean isMinimizeInteraction(); - public void setMinimizeInteraction(boolean minimizeInteraction); + void setMinimizeInteraction(boolean minimizeInteraction); /** * collects all applicable RewriteTaclets of the current goal (called by the SequentViewer) * * @return a list of Taclets with all applicable RewriteTaclets */ - public ImmutableList getRewriteTaclet(Goal focusedGoal, PosInOccurrence pos); + ImmutableList getRewriteTaclet(Goal focusedGoal, PosInOccurrence pos); /** * collects all applicable FindTaclets of the current goal (called by the SequentViewer) * * @return a list of Taclets with all applicable FindTaclets */ - public ImmutableList getFindTaclet(Goal focusedGoal, PosInOccurrence pos); + ImmutableList getFindTaclet(Goal focusedGoal, PosInOccurrence pos); /** * collects all applicable NoFindTaclets of the current goal (called by the SequentViewer) * * @return a list of Taclets with all applicable NoFindTaclets */ - public ImmutableList getNoFindTaclet(Goal focusedGoal); + ImmutableList getNoFindTaclet(Goal focusedGoal); /** * collects all built-in rules that are applicable at the given sequent position 'pos'. * * @param pos the PosInSequent where to look for applicable rules */ - public ImmutableList getBuiltInRule(Goal focusedGoal, PosInOccurrence pos); + ImmutableList getBuiltInRule(Goal focusedGoal, PosInOccurrence pos); - public boolean selectedTaclet(Taclet taclet, Goal goal, PosInOccurrence pos); + boolean selectedTaclet(Taclet taclet, Goal goal, PosInOccurrence pos); /** * Apply a RuleApp and continue with update simplification or strategy application according to @@ -71,7 +71,7 @@ public interface ProofControl { * @param app * @param goal */ - public void applyInteractive(RuleApp app, Goal goal); + void applyInteractive(RuleApp app, Goal goal); /** * selected rule to apply @@ -83,7 +83,7 @@ public interface ProofControl { * all (e.g. if a loop invariant is available do not ask the user to provide one) * @param interactive whether the rule was applied by the user */ - public void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos, + void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos, boolean forced, boolean interactive); /** @@ -93,11 +93,11 @@ public void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos * @return The default {@link ProverTaskListener} which will be added to all started * {@link ApplyStrategy} instances. */ - public ProverTaskListener getDefaultProverTaskListener(); + ProverTaskListener getDefaultProverTaskListener(); - public void addAutoModeListener(AutoModeListener p); + void addAutoModeListener(AutoModeListener p); - public void removeAutoModeListener(AutoModeListener p); + void removeAutoModeListener(AutoModeListener p); /** * Checks if the auto mode of this {@link UserInterfaceControl} supports the given @@ -165,7 +165,7 @@ public void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos */ void startAndWaitForAutoMode(Proof proof); - public void startFocussedAutoMode(PosInOccurrence focus, Goal goal); + void startFocussedAutoMode(PosInOccurrence focus, Goal goal); /** * Runs the given {@link ProofMacro} at the given {@link PosInOccurrence} on the given @@ -176,5 +176,5 @@ public void selectedBuiltInRule(Goal goal, BuiltInRule rule, PosInOccurrence pos * @param posInOcc The exact {@link PosInOccurrence} at which the {@link ProofMacro} is started * at. */ - public void runMacro(Node node, ProofMacro macro, PosInOccurrence posInOcc); + void runMacro(Node node, ProofMacro macro, PosInOccurrence posInOcc); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/RuleCompletionHandler.java b/key.core/src/main/java/de/uka/ilkd/key/control/RuleCompletionHandler.java index c185dd3e197..bf203dec919 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/RuleCompletionHandler.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/RuleCompletionHandler.java @@ -19,7 +19,7 @@ public interface RuleCompletionHandler { * automatically * @param goal the Goal where to apply */ - public void completeAndApplyTacletMatch(TacletInstantiationModel[] models, Goal goal); + void completeAndApplyTacletMatch(TacletInstantiationModel[] models, Goal goal); /** * completes rule applications of built in rules @@ -31,5 +31,5 @@ public interface RuleCompletionHandler { * automatically * @return a complete app or null if no completion was possible */ - public IBuiltInRuleApp completeBuiltInRuleApp(IBuiltInRuleApp app, Goal goal, boolean forced); + IBuiltInRuleApp completeBuiltInRuleApp(IBuiltInRuleApp app, Goal goal, boolean forced); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/UserInterfaceControl.java b/key.core/src/main/java/de/uka/ilkd/key/control/UserInterfaceControl.java index 49d695fd109..bfc66901ae9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/UserInterfaceControl.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/UserInterfaceControl.java @@ -99,12 +99,12 @@ AbstractProblemLoader load(Profile profile, File file, List classPaths, * * @return The used {@link ProofControl}. */ - public ProofControl getProofControl(); + ProofControl getProofControl(); /** * Returns the {@link TermLabelVisibilityManager}. * * @return The {@link TermLabelVisibilityManager}. */ - public TermLabelVisibilityManager getTermLabelVisibilityManager(); + TermLabelVisibilityManager getTermLabelVisibilityManager(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/event/TermLabelVisibilityManagerListener.java b/key.core/src/main/java/de/uka/ilkd/key/control/event/TermLabelVisibilityManagerListener.java index 89a39b1aed7..26430a0c580 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/event/TermLabelVisibilityManagerListener.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/event/TermLabelVisibilityManagerListener.java @@ -1,9 +1,9 @@ package de.uka.ilkd.key.control.event; -import java.util.EventListener; - import de.uka.ilkd.key.control.TermLabelVisibilityManager; +import java.util.EventListener; + /** * Observes changes on a {@link TermLabelVisibilityManager}. * @@ -15,5 +15,5 @@ public interface TermLabelVisibilityManagerListener extends EventListener { * * @param e The change event. */ - public void visibleLabelsChanged(TermLabelVisibilityManagerEvent e); + void visibleLabelsChanged(TermLabelVisibilityManagerEvent e); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/StartSideProofMacro.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/StartSideProofMacro.java index f5d9f6eee48..0d52a38c2c6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/StartSideProofMacro.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/StartSideProofMacro.java @@ -8,5 +8,5 @@ public interface StartSideProofMacro extends ProofMacro { /** * Key used in {@link ProofMacroFinishedInfo} to store the original {@link Proof}. */ - public static final String PROOF_MACRO_FINISHED_INFO_KEY_ORIGINAL_PROOF = "originalProof"; + String PROOF_MACRO_FINISHED_INFO_KEY_ORIGINAL_PROOF = "originalProof"; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowCompositePO.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowCompositePO.java index c4e13e75e4b..a43520132db 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowCompositePO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowCompositePO.java @@ -7,6 +7,6 @@ */ public interface InfFlowCompositePO extends InfFlowPO { - public AbstractInfFlowPO getChildPO(); + AbstractInfFlowPO getChildPO(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowPO.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowPO.java index ea13057d649..6b2a2ea105a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowPO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowPO.java @@ -13,18 +13,18 @@ public interface InfFlowPO extends ProofOblInput { * * @return the information flow proof obligation variables. */ - public IFProofObligationVars getLeafIFVars(); + IFProofObligationVars getLeafIFVars(); - public InfFlowProofSymbols getIFSymbols(); + InfFlowProofSymbols getIFSymbols(); - public void addIFSymbol(Term t); + void addIFSymbol(Term t); - public void addIFSymbol(Named n); + void addIFSymbol(Named n); - public void addLabeledIFSymbol(Term t); + void addLabeledIFSymbol(Term t); - public void addLabeledIFSymbol(Named n); + void addLabeledIFSymbol(Named n); - public void unionLabeledIFSymbols(InfFlowProofSymbols symbols); + void unionLabeledIFSymbols(InfFlowProofSymbols symbols); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java index c6d0f4a5188..7778672e2c0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/InfFlowProofSymbols.java @@ -249,8 +249,9 @@ private void addPredicate(Function p, boolean labeled) { } private void addFunction(Function f, boolean labeled) { - if (!containsFunction(f)) + if (!containsFunction(f)) { functions = functions.add(new Pair(f, !labeled)); + } } private void addFunc(Function f, boolean labeled) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java index a5e2560d1a2..031787663e4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicLoopExecutionSnippet.java @@ -26,8 +26,9 @@ public class BasicLoopExecutionSnippet extends ReplaceAndRegisterMethod implemen public Term produce(BasicSnippetData d, ProofObligationVars poVars) throws UnsupportedOperationException { ImmutableList posts = ImmutableSLList.nil(); - if (poVars.post.self != null) + if (poVars.post.self != null) { posts = posts.append(d.tb.equals(poVars.post.self, poVars.pre.self)); + } if (poVars.pre.guard != null) { final JavaBlock guardJb = buildJavaBlock(d).second; @@ -39,8 +40,9 @@ public Term produce(BasicSnippetData d, ProofObligationVars poVars) while (localVars.hasNext()) { Term i = localVars.next(); Term o = localVarsAtPost.next(); - if (i != null && o != null) + if (i != null && o != null) { posts = posts.append(d.tb.equals(o, i)); + } } posts = posts.append(d.tb.equals(poVars.post.heap, d.tb.getBaseHeap())); diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicPOSnippetFactory.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicPOSnippetFactory.java index 442897686f2..677a35264d8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicPOSnippetFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicPOSnippetFactory.java @@ -11,7 +11,7 @@ public interface BasicPOSnippetFactory { /** * The snippets which can be produced by this factory. */ - public static enum Snippet { + enum Snippet { // free precondition (the "general assumption") FREE_PRE(BasicFreePreSnippet.class), @@ -86,9 +86,9 @@ public static enum Snippet { Snippet(Class c) { this.c = c; } - }; + } - public Term create(Snippet snippet) throws UnsupportedOperationException; + Term create(Snippet snippet) throws UnsupportedOperationException; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java index e82f61e7101..e68fc9c5ba0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/BasicSnippetData.java @@ -1,12 +1,5 @@ package de.uka.ilkd.key.informationflow.po.snippet; -import java.util.EnumMap; -import java.util.List; - -import org.key_project.util.collection.ImmutableList; -import org.key_project.util.collection.ImmutableSLList; -import org.key_project.util.collection.ImmutableSet; - import de.uka.ilkd.key.informationflow.proof.init.StateVars; import de.uka.ilkd.key.java.Label; import de.uka.ilkd.key.java.Services; @@ -18,13 +11,15 @@ import de.uka.ilkd.key.logic.op.IObserverFunction; import de.uka.ilkd.key.logic.op.Modality; import de.uka.ilkd.key.logic.op.ProgramVariable; -import de.uka.ilkd.key.speclang.AuxiliaryContract; -import de.uka.ilkd.key.speclang.BlockContract; -import de.uka.ilkd.key.speclang.FunctionalOperationContract; -import de.uka.ilkd.key.speclang.InformationFlowContract; -import de.uka.ilkd.key.speclang.LoopSpecification; +import de.uka.ilkd.key.speclang.*; import de.uka.ilkd.key.util.InfFlowSpec; import de.uka.ilkd.key.util.MiscTools; +import org.key_project.util.collection.ImmutableList; +import org.key_project.util.collection.ImmutableSLList; +import org.key_project.util.collection.ImmutableSet; + +import java.util.EnumMap; +import java.util.List; /** @@ -70,7 +65,7 @@ public Object put(Key key, Object value) { /** * Keys to access the unified contract content. */ - static enum Key { + enum Key { /** * Returns the KeYJavaType representing the class/interface to which the specification @@ -113,7 +108,7 @@ static enum Key { public Class getType() { return type; } - }; + } BasicSnippetData(FunctionalOperationContract contract, Services services) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java index ee2734f756c..b4aec8db668 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowInputOutputRelationSnippet.java @@ -1,17 +1,16 @@ package de.uka.ilkd.key.informationflow.po.snippet; -import java.util.Iterator; - -import org.key_project.util.collection.ImmutableList; -import org.key_project.util.collection.ImmutableSLList; - import de.uka.ilkd.key.logic.DefaultVisitor; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.label.ParameterlessTermLabel; import de.uka.ilkd.key.logic.op.Function; import de.uka.ilkd.key.proof.init.ProofObligationVars; import de.uka.ilkd.key.util.InfFlowSpec; +import org.key_project.util.collection.ImmutableList; +import org.key_project.util.collection.ImmutableSLList; + +import java.util.Iterator; /** * Generate term "self != null". @@ -133,7 +132,7 @@ protected Term buildObjectSensitivePostRelation(InfFlowSpec infFlowSpec1, final Term newObjsSeq1 = d.tb.seq(infFlowSpec1.newObjects); final Term newObjsSeq2 = d.tb.seq(infFlowSpec2.newObjects); final Function newObjectsIso = - d.services.getNamespaces().functions().lookup("newObjectsIsomorphic"); + d.services.getNamespaces().functions().lookup("newObjectsIsomorphic"); final Term isoTerm = d.tb.func(newObjectsIso, newObjsSeq1, vs1.pre.heap, newObjsSeq2, vs2.pre.heap); @@ -158,7 +157,7 @@ protected Term buildObjectSensitivePostRelation(InfFlowSpec infFlowSpec1, private static class SearchVisitor extends DefaultVisitor { private boolean termFound = false; - private Term[] searchTerms; + private final Term[] searchTerms; public SearchVisitor(Term... searchTerms) { this.searchTerms = searchTerms; diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowPOSnippetFactory.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowPOSnippetFactory.java index f16e730e595..4e59c684465 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowPOSnippetFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/InfFlowPOSnippetFactory.java @@ -11,7 +11,7 @@ public interface InfFlowPOSnippetFactory { /** * The snippets which can be produced by this factory. */ - public static enum Snippet { + enum Snippet { // ( {s1}respects = {s2}respects // & {s1}declassifies = {s2}declassifies ) // -> {s1_post}respects = {s2_post}respects @@ -52,9 +52,9 @@ public static enum Snippet { Snippet(Class c) { this.c = c; } - }; + } - public Term create(Snippet snippet) throws UnsupportedOperationException; + Term create(Snippet snippet) throws UnsupportedOperationException; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/ReplaceAndRegisterMethod.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/ReplaceAndRegisterMethod.java index 12d9f62be12..628ea94fbf6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/ReplaceAndRegisterMethod.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/ReplaceAndRegisterMethod.java @@ -171,8 +171,9 @@ public boolean visitSubtree(Term visited) { @Override public void visit(Term visited) { final ImmutableArray boundVars = visited.boundVars(); - for (QuantifiableVariable var : boundVars) + for (QuantifiableVariable var : boundVars) { vars.add(var); + } } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java index af618cebbb1..fd0b8cf9498 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/po/snippet/TwoStateMethodPredicateSnippet.java @@ -69,8 +69,9 @@ private Function generateContApplPredicate(String nameString, Sort[] argSorts, T * This predicate needs to present on all branches and, therefore, must be added to the * toplevel function namespace. Hence, we rewind to the parent namespace here. */ - while (functionNS.parent() != null) + while (functionNS.parent() != null) { functionNS = functionNS.parent(); + } Function pred = functionNS.lookup(name); diff --git a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java index 0aed0e64a87..5c049fbc9c5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/informationflow/rule/tacletbuilder/AbstractInfFlowTacletBuilder.java @@ -153,7 +153,8 @@ public Term eqAtLocsPost(Services services, Term heap1Pre, Term heap1Post, Term class QuantifiableVariableVisitor implements Visitor { - private LinkedList vars = new LinkedList(); + private final LinkedList vars = + new LinkedList(); @Override public boolean visitSubtree(Term visited) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/CcatchBreakLabelParameterDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/CcatchBreakLabelParameterDeclaration.java index 4b0c37efb44..a25462b29a8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/CcatchBreakLabelParameterDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/CcatchBreakLabelParameterDeclaration.java @@ -28,8 +28,9 @@ public Label getLabel() { @Override public ProgramElement getChildAt(int index) { if (label != null) { - if (index == 0) + if (index == 0) { return label; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/CcatchContinueLabelParameterDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/CcatchContinueLabelParameterDeclaration.java index 38955c9eb51..ae641f26892 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/CcatchContinueLabelParameterDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/CcatchContinueLabelParameterDeclaration.java @@ -28,8 +28,9 @@ public Label getLabel() { @Override public ProgramElement getChildAt(int index) { if (label != null) { - if (index == 0) + if (index == 0) { return label; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Comment.java b/key.core/src/main/java/de/uka/ilkd/key/java/Comment.java index b70faff6a61..aac243e1d71 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Comment.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Comment.java @@ -57,10 +57,12 @@ public int hashCode() { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof Comment)) + } + if (!(o instanceof Comment)) { return false; + } Comment cmp = (Comment) o; return (getText().equals(cmp.getText())); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/CompilationUnit.java b/key.core/src/main/java/de/uka/ilkd/key/java/CompilationUnit.java index f11a19a6bdc..6e97930e5ac 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/CompilationUnit.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/CompilationUnit.java @@ -99,12 +99,15 @@ public String getName() { public int getChildCount() { int result = 0; - if (packageSpec != null) + if (packageSpec != null) { result++; - if (imports != null) + } + if (imports != null) { result += imports.size(); - if (typeDeclarations != null) + } + if (typeDeclarations != null) { result += typeDeclarations.size(); + } return result; } @@ -119,8 +122,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { int len; if (packageSpec != null) { - if (index == 0) + if (index == 0) { return packageSpec; + } index--; } if (imports != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Context.java b/key.core/src/main/java/de/uka/ilkd/key/java/Context.java index 6ce8d4cc7ad..917224ce455 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Context.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Context.java @@ -14,8 +14,8 @@ */ class Context { - private recoder.java.CompilationUnit compilationUnitContext; - private ClassDeclaration classContext; + private final recoder.java.CompilationUnit compilationUnitContext; + private final ClassDeclaration classContext; public static final String PARSING_CONTEXT_CLASS_NAME = ""; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java b/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java index 35b33ae8e39..9db816f0d6f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/ContextStatementBlock.java @@ -83,8 +83,9 @@ public IExecutionContext getExecutionContext() { public int getChildCount() { int count = 0; - if (executionContext != null) + if (executionContext != null) { count++; + } count += super.getChildCount(); return count; } @@ -119,9 +120,9 @@ public void visit(Visitor v) { /* toString */ public String toString() { String result = ".." + - super.toString() + - "\n" + - "..."; + super.toString() + + "\n" + + "..."; return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Dimension.java b/key.core/src/main/java/de/uka/ilkd/key/java/Dimension.java index 4652e05187b..4e9a574345c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Dimension.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Dimension.java @@ -2,7 +2,7 @@ public class Dimension { - private int dim; + private final int dim; public Dimension(int dim) { this.dim = dim; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Import.java b/key.core/src/main/java/de/uka/ilkd/key/java/Import.java index b191a1cd23d..f1e54434c40 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Import.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Import.java @@ -86,8 +86,9 @@ public boolean isMultiImport() { */ public int getChildCount() { int result = 0; - if (reference != null) + if (reference != null) { result++; + } return result; } @@ -100,8 +101,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (reference != null) { - if (index == 0) + if (index == 0) { return reference; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java b/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java index 4182098f21e..02391fcbc87 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/JavaInfo.java @@ -53,7 +53,7 @@ public final class JavaInfo { private HashMap name2KJTCache = null; - private LRUCache, ImmutableList> commonSubtypeCache = + private final LRUCache, ImmutableList> commonSubtypeCache = new LRUCache<>(200); private int nameCachedSize = 0; @@ -91,7 +91,7 @@ public final class JavaInfo { protected static final String DEFAULT_EXECUTION_CONTEXT_CLASS = ""; protected static final String DEFAULT_EXECUTION_CONTEXT_METHOD = ""; - private HashMap staticInvs = new LinkedHashMap<>(); + private final HashMap staticInvs = new LinkedHashMap<>(); /** @@ -231,16 +231,17 @@ public boolean isPackage(String name) { * Translates things like int[] into [I, etc. */ private String translateArrayType(String s) { - if ("byte[]".equals(s)) + if ("byte[]".equals(s)) { return "[B"; - else if ("int[]".equals(s)) + } else if ("int[]".equals(s)) { return "[I"; - else if ("long[]".equals(s)) + } else if ("long[]".equals(s)) { return "[J"; - else if ("short[]".equals(s)) + } else if ("short[]".equals(s)) { return "[S"; - else if ("char[]".equals(s)) + } else if ("char[]".equals(s)) { return "[C"; + } // Strangely, this one is not n // else if ("boolean[]".equals(s)) // return "[Z"; @@ -297,8 +298,9 @@ public Set getAllKeYJavaTypes() { public KeYJavaType getPrimitiveKeYJavaType(PrimitiveType type) { - if (type == null) + if (type == null) { throw new IllegalArgumentException("Given type is null"); + } if (type2KJTCache != null && type2KJTCache.containsKey(type)) { @@ -389,26 +391,32 @@ public static boolean isPrivate(KeYJavaType kjt) { final ArrayType at = (ArrayType) t; return isPrivate(at.getBaseType().getKeYJavaType()); } else // primitive type or null + { return true; + } } public static boolean isVisibleTo(SpecificationElement ax, KeYJavaType visibleTo) { final KeYJavaType kjt = ax.getKJT(); // elements of private types are not visible - if (isPrivate(kjt)) + if (isPrivate(kjt)) { return kjt.equals(visibleTo); + } // TODO: package information not yet available // BUGFIX: package-private is understood as private (see bug #1268) final boolean visibleToPackage = false; final VisibilityModifier visibility = ax.getVisibility(); - if (VisibilityModifier.isPublic(visibility)) + if (VisibilityModifier.isPublic(visibility)) { return true; - if (VisibilityModifier.allowsInheritance(visibility)) + } + if (VisibilityModifier.allowsInheritance(visibility)) { return visibleTo.getSort().extendsTrans(kjt.getSort()) || visibleToPackage; - if (VisibilityModifier.isPackageVisible(visibility)) + } + if (VisibilityModifier.isPackageVisible(visibility)) { return visibleToPackage; - else + } else { return kjt.equals(visibleTo); + } } /** @@ -1125,8 +1133,9 @@ public ImmutableList getAllAttributes(String programName, KeYJa protected void fillCommonTypesCache() { - if (commonTypesCacheValid) + if (commonTypesCacheValid) { return; + } final String[] fullNames = new String[] { "java.lang.Object", "java.lang.Cloneable", "java.io.Serializable" }; @@ -1271,8 +1280,9 @@ public ImmutableList getAllSubtypes(KeYJavaType type) { public ImmutableList getAllSupertypes(KeYJavaType type) { if (type.getJavaType() instanceof ArrayType) { ImmutableList res = ImmutableSLList.nil(); - for (Sort s : getSuperSorts(type.getSort())) + for (Sort s : getSuperSorts(type.getSort())) { res = res.append(getKeYJavaType(s)); + } return res; } return kpmi.getAllSupertypes(type); @@ -1281,10 +1291,11 @@ public ImmutableList getAllSupertypes(KeYJavaType type) { private ImmutableList getSuperSorts(Sort sort) { ImmutableList res = ImmutableSLList.nil(); final Sort object = getJavaLangObject().getSort(); - if (sort != object) + if (sort != object) { for (Sort exsort : sort.extendsSorts(services)) { res = res.append(getSuperSorts(exsort)).append(exsort); } + } return res; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/JavaReduxFileCollection.java b/key.core/src/main/java/de/uka/ilkd/key/java/JavaReduxFileCollection.java index 79c2f907b86..2be4c0636e2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/JavaReduxFileCollection.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/JavaReduxFileCollection.java @@ -49,7 +49,7 @@ public class JavaReduxFileCollection implements FileCollection { /** * This list stores all resources to be retrieved. It is fed by the constructor. */ - private List resources = new ArrayList(); + private final List resources = new ArrayList(); /** * Instantiates a new file collection. @@ -124,7 +124,7 @@ private class Walker implements FileCollection.Walker { /** * The iterator to wrap, it iterates the resources to open. */ - private Iterator iterator; + private final Iterator iterator; /** * The currently open resource. null before the first step and after the last step. @@ -142,8 +142,9 @@ private Walker(Iterator iterator) { } public DataLocation getCurrentDataLocation() throws NoSuchElementException { - if (currentURL == null) + if (currentURL == null) { throw new NoSuchElementException("Location of " + current + " not found."); + } return new URLDataLocation(currentURL); } @@ -157,8 +158,9 @@ public String getType() { } public InputStream openCurrent() throws IOException, NoSuchElementException { - if (current == null) + if (current == null) { throw new NoSuchElementException(); + } if (currentURL == null) { throw new FileNotFoundException("cannot find " + resourceLocation + "/" + current); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/KeYJavaASTFactory.java b/key.core/src/main/java/de/uka/ilkd/key/java/KeYJavaASTFactory.java index d9e094bdaca..40a5be81c8b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/KeYJavaASTFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/KeYJavaASTFactory.java @@ -833,8 +833,9 @@ public static StatementBlock insertStatementInBlock(Statement[] stmnt, Statement */ public static StatementBlock insertStatementInBlock(StatementBlock stmnt, StatementBlock b) { Statement[] stmnts = new Statement[stmnt.getStatementCount()]; - for (int i = 0; i < stmnt.getStatementCount(); i++) + for (int i = 0; i < stmnt.getStatementCount(); i++) { stmnts[i] = stmnt.getStatementAt(i); + } return insertStatementInBlock(stmnts, b); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/KeYProgModelInfo.java b/key.core/src/main/java/de/uka/ilkd/key/java/KeYProgModelInfo.java index e4a0e6a5b12..9ad20b6f2d9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/KeYProgModelInfo.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/KeYProgModelInfo.java @@ -226,7 +226,9 @@ public boolean isFinal(KeYJavaType kjt) { if (recoderType instanceof recoder.java.declaration.TypeDeclaration) { return ((recoder.java.declaration.TypeDeclaration) recoderType).isFinal(); } else // array or primitive type + { return false; + } } @@ -294,16 +296,19 @@ private boolean isAssignmentCompatible(recoder.abstraction.ArrayType subType, return bt1.getFullName().equals(bt2.getFullName()); } if (bt1 instanceof recoder.abstraction.ClassType - && bt2 instanceof recoder.abstraction.ClassType) - return isSubtype((recoder.abstraction.ClassType) bt1, - (recoder.abstraction.ClassType) bt2); + && bt2 instanceof recoder.abstraction.ClassType) { + return isSubtype((ClassType) bt1, + (ClassType) bt2); + } if (bt1 instanceof recoder.abstraction.ArrayType - && bt2 instanceof recoder.abstraction.ArrayType) + && bt2 instanceof recoder.abstraction.ArrayType) { return isAssignmentCompatible((recoder.abstraction.ArrayType) bt1, (recoder.abstraction.ArrayType) bt2); + } if (bt1 instanceof recoder.abstraction.ClassType - && bt2 instanceof recoder.abstraction.ArrayType) + && bt2 instanceof recoder.abstraction.ArrayType) { return false; + } if (bt1 instanceof recoder.abstraction.ArrayType && bt2 instanceof recoder.abstraction.ClassType) { if (((recoder.abstraction.ClassType) bt2).isInterface()) { @@ -728,8 +733,9 @@ public ImmutableList findImplementations(Type ct, String name, List superTypes = rct.getAllSupertypes(); int k = 0; while (k < superTypes.size() - && !declaresApplicableMethods(superTypes.get(k), name, rsignature)) + && !declaresApplicableMethods(superTypes.get(k), name, rsignature)) { k++; + } if (k < superTypes.size()) { rct = superTypes.get(k); KeYJavaType r = (KeYJavaType) mapping.toKeY(rct); @@ -783,10 +789,11 @@ private boolean declaresApplicableMethods(recoder.abstraction.ClassType ct, Stri while (i < s) { recoder.abstraction.Method m = list.get(i); if (name.equals(m.getName()) && si.isCompatibleSignature(signature, m.getSignature()) - && si.isVisibleFor(m, ct) && !m.isAbstract()) + && si.isVisibleFor(m, ct) && !m.isAbstract()) { return true; - else + } else { i++; + } } return false; } @@ -803,10 +810,11 @@ private boolean isDeclaringInterface(recoder.abstraction.ClassType ct, String na while (i < s) { recoder.abstraction.Method m = list.get(i); if (name.equals(m.getName()) && si.isCompatibleSignature(signature, m.getSignature()) - && si.isVisibleFor(m, ct)) + && si.isVisibleFor(m, ct)) { return true; - else + } else { i++; + } } return false; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/KeYRecoderMapping.java b/key.core/src/main/java/de/uka/ilkd/key/java/KeYRecoderMapping.java index 3699e92b52b..75e454233aa 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/KeYRecoderMapping.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/KeYRecoderMapping.java @@ -21,10 +21,10 @@ public class KeYRecoderMapping { /** * maps a recoder programelement (or something similar, e.g. Type) to the KeY-equivalent */ - private HashMap map; + private final HashMap map; /** maps a KeY programelement to the Recoder-equivalent */ - private HashMap revMap; + private final HashMap revMap; /** a pseudo super class for all arrays used to declare length */ private KeYJavaType superArrayType = null; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/PackageSpecification.java b/key.core/src/main/java/de/uka/ilkd/key/java/PackageSpecification.java index ef8d4704d84..a5700893c18 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/PackageSpecification.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/PackageSpecification.java @@ -44,8 +44,9 @@ public SourceElement getLastElement() { public int getChildCount() { int result = 0; - if (reference != null) + if (reference != null) { result++; + } return result; } @@ -59,8 +60,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (reference != null) { - if (index == 0) + if (index == 0) { return reference; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/ParentIsInterfaceDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/ParentIsInterfaceDeclaration.java index d5a4d61839e..168445f139b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/ParentIsInterfaceDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/ParentIsInterfaceDeclaration.java @@ -2,7 +2,7 @@ public class ParentIsInterfaceDeclaration { - private boolean value; + private final boolean value; public ParentIsInterfaceDeclaration(boolean val) { this.value = val; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeY.java b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeY.java index 861309a07f8..efa80250aa1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeY.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeY.java @@ -174,18 +174,22 @@ public Recoder2KeY(Services services, NamespaceSet nss) { private Recoder2KeY(Services services, KeYCrossReferenceServiceConfiguration servConf, String classPath, KeYRecoderMapping rec2key, NamespaceSet nss, TypeConverter tc) { - if (servConf == null) + if (servConf == null) { throw new IllegalArgumentException("service configuration is null"); + } - if (rec2key == null) + if (rec2key == null) { throw new IllegalArgumentException("rec2key mapping is null"); + } - if (nss == null) + if (nss == null) { throw new IllegalArgumentException("namespaces is null"); + } - if (!(servConf.getProjectSettings().getErrorHandler() instanceof KeYRecoderExcHandler)) + if (!(servConf.getProjectSettings().getErrorHandler() instanceof KeYRecoderExcHandler)) { throw new IllegalArgumentException( "Recoder2KeY needs a KeyRecoderExcHandler as exception handler"); + } this.services = services; this.servConf = servConf; @@ -987,8 +991,9 @@ private void addProgramVariablesToClassContext( String typeName; Type javaType = var.getKeYJavaType().getJavaType(); - if (javaType == null) + if (javaType == null) { continue; + } typeName = javaType.getFullName(); @@ -1182,8 +1187,9 @@ private static String trim(String s) { * reduce the size of a string to a maximum of length. */ private static String trim(String s, int length) { - if (s.length() > length) + if (s.length() > length) { return s.substring(0, length - 5) + "[...]"; + } return s; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java index 9676ea8e403..1f1a697f6dd 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java @@ -123,7 +123,7 @@ public Recoder2KeYConverter(Recoder2KeY rec2key, Services services, NamespaceSet * Access to this map is performed via the method * getProgramVariableForFieldSpecification */ - private HashMap fieldSpecificationMapping = + private final HashMap fieldSpecificationMapping = new LinkedHashMap(); /** @@ -131,7 +131,7 @@ public Recoder2KeYConverter(Recoder2KeY rec2key, Services services, NamespaceSet * convert but are not yet finished. The mapped value is the reference to the later completed * IProgramMethod. */ - private HashMap methodsDeclaring = + private final HashMap methodsDeclaring = new LinkedHashMap(); /** @@ -153,7 +153,7 @@ public Recoder2KeYConverter(Recoder2KeY rec2key, Services services, NamespaceSet /** * the associated Recoder2KeY object */ - private Recoder2KeY rec2key; + private final Recoder2KeY rec2key; /** * The namespaces are here to provide some conversion functions access to previously defined @@ -225,8 +225,9 @@ private boolean isParsingLibs() { */ protected Object callConvert(recoder.java.ProgramElement pe) throws ConvertException { - if (pe == null) + if (pe == null) { throw new ConvertException("cannot convert 'null'"); + } Class contextClass = pe.getClass(); Method m = methodCache.get(contextClass); @@ -248,9 +249,10 @@ protected Object callConvert(recoder.java.ProgramElement pe) throws ConvertExcep } } - if (m == null) + if (m == null) { throw new ConvertException( - "Could not find convert method for class or superclasses of " + pe.getClass()); + "Could not find convert method for class or superclasses of " + pe.getClass()); + } for (Class aL : l) { methodCache.put(aL, m); @@ -360,8 +362,9 @@ private ExtList collectComments(recoder.java.ProgramElement pe) { private ExtList collectChildrenAndComments(recoder.java.ProgramElement pe) { ExtList ret = new ExtList(); - if (pe instanceof recoder.java.NonTerminalProgramElement) + if (pe instanceof recoder.java.NonTerminalProgramElement) { ret.addAll(collectChildren((NonTerminalProgramElement) pe)); + } ret.addAll(collectComments(pe)); return ret; @@ -377,10 +380,11 @@ private PositionInfo positionInfo(recoder.java.SourceElement se) { var relPos = se.getRelativePosition(); var startPos = Position.fromPosition(se.getStartPosition()); var endPos = Position.fromPosition(se.getEndPosition()); - if ((!inLoopInit)) + if ((!inLoopInit)) { return new PositionInfo(relPos, startPos, endPos, currentClassURI); - else + } else { return new PositionInfo(relPos, startPos, endPos); + } } /** @@ -405,8 +409,9 @@ private Literal getLiteralFor(recoder.service.ConstantEvaluator.EvaluationResult case recoder.service.ConstantEvaluator.LONG_TYPE: return new LongLiteral(p_er.getLong()); case recoder.service.ConstantEvaluator.STRING_TYPE: - if (p_er.getString() == null) + if (p_er.getString() == null) { return NullLiteral.NULL; + } return new StringLiteral("\"" + p_er.getString() + "\""); default: throw new ConvertException( @@ -489,8 +494,9 @@ public ProgramElement convert(recoder.java.JavaProgramElement pe) { sb.append(p.toString()); sb.append(','); } - if (sb.charAt(sb.length() - 1) == ',') + if (sb.charAt(sb.length() - 1) == ',') { sb.deleteCharAt(sb.length() - 1); + } sb.append(')'); final String constructorName = sb.toString(); LOGGER.debug("recoder2key: invocation of constructor {} failed.", constructorName, e); @@ -532,7 +538,7 @@ private Class getKeYClass(Class re } } - private static int RECODER_PREFIX_LENGTH = "recoder.".length(); + private static final int RECODER_PREFIX_LENGTH = "recoder.".length(); /** * constructs the name of the corresponding KeYClass. Expected prefixes are either recoder or @@ -1278,8 +1284,9 @@ private Literal getCompileTimeConstantInitializer( recoder.java.declaration.FieldSpecification recoderVarSpec) { // Necessary condition: the field is static and final - if (!recoderVarSpec.isFinal() || !recoderVarSpec.isStatic()) + if (!recoderVarSpec.isFinal() || !recoderVarSpec.isStatic()) { return null; + } recoder.java.Expression init = recoderVarSpec.getInitializer(); @@ -1290,8 +1297,9 @@ private Literal getCompileTimeConstantInitializer( new recoder.service.ConstantEvaluator.EvaluationResult(); try { - if (ce.isCompileTimeConstant(init, er)) + if (ce.isCompileTimeConstant(init, er)) { return getLiteralFor(er); + } } catch (NumberFormatException t) { } catch (java.lang.ArithmeticException t) { } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java index 58e2066e90a..1e3846a3adc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYTypeConverter.java @@ -93,7 +93,7 @@ public class Recoder2KeYTypeConverter { */ private final Recoder2KeY recoder2key; - private JavaInfo javaInfo; + private final JavaInfo javaInfo; public Recoder2KeYTypeConverter(Services services, TypeConverter typeConverter, NamespaceSet namespaces, Recoder2KeY recoder2key) { @@ -162,8 +162,9 @@ public KeYJavaType getKeYJavaType(String typeName) { public KeYJavaType getKeYJavaType(recoder.abstraction.Type t) { // change from 2012-02-07: there must be a definite KJT - if (t == null) + if (t == null) { throw new NullPointerException("null cannot be converted into a KJT"); + } // lookup in the cache KeYJavaType kjt = lookupInCache(t); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java b/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java index be21d9725c4..b826fa6395e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/SchemaRecoder2KeYConverter.java @@ -39,7 +39,7 @@ public class SchemaRecoder2KeYConverter extends Recoder2KeYConverter { /** * the type that is used for schema variables types. */ - private static KeYJavaType typeSVType = + private static final KeYJavaType typeSVType = new KeYJavaType(PrimitiveType.PROGRAM_SV, ProgramSVSort.TYPE); /** @@ -131,7 +131,7 @@ public ProgramTransformer convert(de.uka.ilkd.key.java.recoderext.RKeYMetaConstr } else if ("#reattachLoopInvariant".equals(mcName)) { return new ReattachLoopInvariant(list.get(LoopStatement.class)); } else { - throw new ConvertException("Program meta construct " + mc.toString() + " unknown."); + throw new ConvertException("Program meta construct " + mc + " unknown."); } } @@ -152,7 +152,7 @@ public ProgramTransformer convert( } else if ("#length-reference".equals(mcName)) { return new ArrayLength(list.get(Expression.class)); } else { - throw new ConvertException("Program meta construct " + mc.toString() + " unknown."); + throw new ConvertException("Program meta construct " + mc + " unknown."); } } @@ -167,7 +167,7 @@ public ProgramTransformer convert(de.uka.ilkd.key.java.recoderext.RKeYMetaConstr if ("#typeof".equals(mc.getName0())) { return new TypeOf(list.get(Expression.class)); } else { - throw new ConvertException("Program meta construct " + mc.toString() + " unknown."); + throw new ConvertException("Program meta construct " + mc + " unknown."); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/Services.java b/key.core/src/main/java/de/uka/ilkd/key/java/Services.java index 87b333b6046..71e371f4f6e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/Services.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/Services.java @@ -35,7 +35,7 @@ public class Services implements TermServices { * used to determine whether an expression is a compile-time constant and if so the type and * result of the expression */ - private ConstantExpressionEvaluator cee; + private final ConstantExpressionEvaluator cee; /** * used to convert types, expressions and so on to logic elements (in special into to terms or @@ -56,7 +56,7 @@ public class Services implements TermServices { /** * map of names to counters */ - private HashMap counters; + private final HashMap counters; /** * specification repository @@ -318,8 +318,9 @@ public Services copyProofSpecific(Proof p_proof, boolean shareCaches) { */ public Counter getCounter(String name) { Counter c = counters.get(name); - if (c != null) + if (c != null) { return c; + } c = new Counter(name); counters.put(name, c); return c; @@ -354,7 +355,7 @@ public Proof getProof() { } public interface ITermProgramVariableCollectorFactory { - public TermProgramVariableCollector create(Services services); + TermProgramVariableCollector create(Services services); } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/SourceData.java b/key.core/src/main/java/de/uka/ilkd/key/java/SourceData.java index 5a462ca84d8..48c875c5416 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/SourceData.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/SourceData.java @@ -90,8 +90,9 @@ public void setElement(ProgramElement element) { * @return the ProgramElement to be matched next or null if there is no such element */ public ProgramElement getSource() { - if (childPos == -1) + if (childPos == -1) { return element; + } final NonTerminalProgramElement ntpe = (NonTerminalProgramElement) element; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/StatementBlock.java b/key.core/src/main/java/de/uka/ilkd/key/java/StatementBlock.java index edf3ccf33d3..66c4145d89a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/StatementBlock.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/StatementBlock.java @@ -220,18 +220,20 @@ public void visit(Visitor v) { public SourceElement getFirstElement() { - if (isEmpty()) + if (isEmpty()) { return this; + } final SourceElement e = getBody().get(0); return (e instanceof StatementBlock) ? e.getFirstElement() : e; } @Override public SourceElement getFirstElementIncludingBlocks() { - if (isEmpty()) + if (isEmpty()) { return this; - else + } else { return getBody().get(0); + } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/TypeConverter.java b/key.core/src/main/java/de/uka/ilkd/key/java/TypeConverter.java index feaccc6d1ab..5321de29ede 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/TypeConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/TypeConverter.java @@ -190,8 +190,9 @@ private Term convertReferencePrefix(ReferencePrefix prefix, ExecutionContext ec) public Term findThisForSortExact(Sort s, ExecutionContext ec) { ProgramElement pe = ec.getRuntimeInstance(); - if (pe == null) + if (pe == null) { return null; + } Term inst = convertToLogicElement(pe, ec); return findThisForSort(s, inst, ec.getTypeReference().getKeYJavaType(), true); @@ -199,8 +200,9 @@ public Term findThisForSortExact(Sort s, ExecutionContext ec) { public Term findThisForSort(Sort s, ExecutionContext ec) { ProgramElement pe = ec.getRuntimeInstance(); - if (pe == null) + if (pe == null) { return null; + } Term inst = convertToLogicElement(pe, ec); return findThisForSort(s, inst, ec.getTypeReference().getKeYJavaType(), false); } @@ -379,9 +381,9 @@ public KeYJavaType getPromotedType(KeYJavaType type1, KeYJavaType type2) { final Type t2 = type2.getJavaType(); if ((t1 == PrimitiveType.JAVA_REAL && isNumericalType(t2) - || (isNumericalType(t1) && t2 == PrimitiveType.JAVA_REAL))) + || (isNumericalType(t1) && t2 == PrimitiveType.JAVA_REAL))) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_REAL); - else if ((t1 == PrimitiveType.JAVA_BOOLEAN && t2 == PrimitiveType.JAVA_BOOLEAN)) { + } else if ((t1 == PrimitiveType.JAVA_BOOLEAN && t2 == PrimitiveType.JAVA_BOOLEAN)) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_BOOLEAN); } else if ((t1 == PrimitiveType.JAVA_BYTE || t1 == PrimitiveType.JAVA_SHORT || t1 == PrimitiveType.JAVA_CHAR || t1 == PrimitiveType.JAVA_INT) @@ -445,27 +447,29 @@ public boolean isIntegerType(Type t2) { public KeYJavaType getPromotedType(KeYJavaType type1) { final Type t1 = type1.getJavaType(); if (t1 == PrimitiveType.JAVA_BOOLEAN) - // not really numeric ... + // not really numeric ... + { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_BOOLEAN); - else if (t1 == PrimitiveType.JAVA_BYTE || t1 == PrimitiveType.JAVA_SHORT - || t1 == PrimitiveType.JAVA_CHAR || t1 == PrimitiveType.JAVA_INT) + } else if (t1 == PrimitiveType.JAVA_BYTE || t1 == PrimitiveType.JAVA_SHORT + || t1 == PrimitiveType.JAVA_CHAR || t1 == PrimitiveType.JAVA_INT) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_INT); - else if (t1 == PrimitiveType.JAVA_LONG) + } else if (t1 == PrimitiveType.JAVA_LONG) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_LONG); - else if (t1 == PrimitiveType.JAVA_LOCSET) + } else if (t1 == PrimitiveType.JAVA_LOCSET) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_LOCSET); - else if (t1 == PrimitiveType.JAVA_SEQ) + } else if (t1 == PrimitiveType.JAVA_SEQ) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_SEQ); - else if (t1 == PrimitiveType.JAVA_BIGINT) + } else if (t1 == PrimitiveType.JAVA_BIGINT) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_BIGINT); - else if (t1 == PrimitiveType.JAVA_REAL) + } else if (t1 == PrimitiveType.JAVA_REAL) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_REAL); - else if (t1 == PrimitiveType.JAVA_FLOAT) + } else if (t1 == PrimitiveType.JAVA_FLOAT) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_FLOAT); - else if (t1 == PrimitiveType.JAVA_DOUBLE) + } else if (t1 == PrimitiveType.JAVA_DOUBLE) { return services.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_DOUBLE); - else + } else { throw new RuntimeException("Could not determine promoted type " + "of " + type1); + } } @@ -612,44 +616,57 @@ public KeYJavaType getKeYJavaType(Type t) { */ public boolean isWidening(PrimitiveType from, PrimitiveType to) { // we do not handle null's - if (from == null || to == null) + if (from == null || to == null) { return false; + } // equal types can be coerced - if (from == to) + if (from == to) { return true; + } // boolean types cannot be coerced into something else - if (from == PrimitiveType.JAVA_BOOLEAN || to == PrimitiveType.JAVA_BOOLEAN) + if (from == PrimitiveType.JAVA_BOOLEAN || to == PrimitiveType.JAVA_BOOLEAN) { return false; + } // everything else can be coerced to a \real - if (to == PrimitiveType.JAVA_REAL) + if (to == PrimitiveType.JAVA_REAL) { return true; + } // everything except \real and \bigint can be coerced to a double - if (to == PrimitiveType.JAVA_DOUBLE) + if (to == PrimitiveType.JAVA_DOUBLE) { return from != PrimitiveType.JAVA_BIGINT; + } // but a double cannot be coerced to anything else - if (from == PrimitiveType.JAVA_DOUBLE) + if (from == PrimitiveType.JAVA_DOUBLE) { return from != PrimitiveType.JAVA_BIGINT; + } // everything except doubles can be coerced to a float - if (to == PrimitiveType.JAVA_FLOAT) + if (to == PrimitiveType.JAVA_FLOAT) { return true; + } // but a float cannot be coerced to anything but float or double - if (from == PrimitiveType.JAVA_FLOAT) + if (from == PrimitiveType.JAVA_FLOAT) { return false; + } // any integral type can be coerced to a \bigint - if (to == PrimitiveType.JAVA_BIGINT) + if (to == PrimitiveType.JAVA_BIGINT) { return true; + } // everything except the above can be coerced to a long - if (to == PrimitiveType.JAVA_LONG) + if (to == PrimitiveType.JAVA_LONG) { return true; + } // but a long cannot be coerced to anything but float, double or long - if (from == PrimitiveType.JAVA_LONG) + if (from == PrimitiveType.JAVA_LONG) { return false; + } // everything except long, float or double can be coerced to an int - if (to == PrimitiveType.JAVA_INT) + if (to == PrimitiveType.JAVA_INT) { return true; + } // but an int cannot be coerced to the remaining byte, char, short - if (from == PrimitiveType.JAVA_INT) + if (from == PrimitiveType.JAVA_INT) { return false; + } // between byte, char, short, only one conversion is admissible return (from == PrimitiveType.JAVA_BYTE && to == PrimitiveType.JAVA_SHORT); } @@ -674,10 +691,12 @@ public boolean isWidening(ArrayType from, ArrayType to) { public boolean isWidening(Type from, Type to) { - if (from instanceof KeYJavaType) + if (from instanceof KeYJavaType) { return isWidening((KeYJavaType) from, getKeYJavaType(to)); - if (to instanceof KeYJavaType) + } + if (to instanceof KeYJavaType) { return isWidening(getKeYJavaType(from), (KeYJavaType) to); + } if (from instanceof ClassType) { return isWidening(getKeYJavaType(from), getKeYJavaType(to)); @@ -706,10 +725,11 @@ public boolean isWidening(KeYJavaType from, KeYJavaType to) { return from.getSort().extendsTrans(to.getSort()) || (a == NullType.JAVA_NULL && b instanceof ArrayType); } else { - if (b == null) + if (b == null) { return to == services.getJavaInfo().getJavaLangObject() && a instanceof ArrayType; - else + } else { return isWidening(a, b); + } } } @@ -773,18 +793,20 @@ public boolean isNarrowing(KeYJavaType from, KeYJavaType to) { || (from == services.getJavaInfo().getJavaLangObject() && a instanceof ArrayType); } else { - if (b == null) + if (b == null) { return false; - else + } else { return isNarrowing(a, b); + } } } public boolean isNarrowing(PrimitiveType from, PrimitiveType to) { // we do not handle null's - if (from == null || to == null) + if (from == null || to == null) { return false; + } if (from == PrimitiveType.JAVA_BYTE) { return (to == PrimitiveType.JAVA_CHAR); @@ -837,10 +859,12 @@ public boolean isNarrowing(ArrayType from, ArrayType to) { public boolean isNarrowing(Type from, Type to) { - if (from instanceof KeYJavaType) + if (from instanceof KeYJavaType) { return isNarrowing((KeYJavaType) from, getKeYJavaType(to)); - if (to instanceof KeYJavaType) + } + if (to instanceof KeYJavaType) { return isNarrowing(getKeYJavaType(from), (KeYJavaType) to); + } if (from instanceof ClassType) { return isNarrowing(getKeYJavaType(from), getKeYJavaType(to)); @@ -861,16 +885,19 @@ public boolean isCastingTo(Type from, Type to) { // there is currently no interface handling // identity conversion - if (isIdentical(from, to)) + if (isIdentical(from, to)) { return true; + } // conversions between numeric types are always possible - if (isNumericalType(from) && isNumericalType(to)) + if (isNumericalType(from) && isNumericalType(to)) { return true; + } // all widening conversions - if (isWidening(from, to)) + if (isWidening(from, to)) { return true; + } // narrowing return isNarrowing(from, to); @@ -878,8 +905,9 @@ public boolean isCastingTo(Type from, Type to) { public boolean isNumericalType(Type t) { - if (t instanceof KeYJavaType) + if (t instanceof KeYJavaType) { t = ((KeYJavaType) t).getJavaType(); + } return t == PrimitiveType.JAVA_BYTE || t == PrimitiveType.JAVA_SHORT || t == PrimitiveType.JAVA_INT || t == PrimitiveType.JAVA_CHAR || t == PrimitiveType.JAVA_LONG || t == PrimitiveType.JAVA_BIGINT @@ -889,8 +917,9 @@ public boolean isNumericalType(Type t) { public boolean isIntegralType(Type t) { - if (t instanceof KeYJavaType) + if (t instanceof KeYJavaType) { t = ((KeYJavaType) t).getJavaType(); + } return t == PrimitiveType.JAVA_BYTE || t == PrimitiveType.JAVA_SHORT || t == PrimitiveType.JAVA_INT || t == PrimitiveType.JAVA_CHAR || t == PrimitiveType.JAVA_LONG || t == PrimitiveType.JAVA_BIGINT; @@ -898,8 +927,9 @@ public boolean isIntegralType(Type t) { public boolean isReferenceType(Type t) { - if (t instanceof KeYJavaType) + if (t instanceof KeYJavaType) { t = ((KeYJavaType) t).getJavaType(); + } return // there is currently no interface handling t == null || (t instanceof ClassType && !(t instanceof NullType)) || t instanceof ArrayType; @@ -907,15 +937,17 @@ public boolean isReferenceType(Type t) { public boolean isNullType(Type t) { - if (t instanceof KeYJavaType) + if (t instanceof KeYJavaType) { t = ((KeYJavaType) t).getJavaType(); + } return t == NullType.JAVA_NULL; } public boolean isBooleanType(Type t) { - if (t instanceof KeYJavaType) + if (t instanceof KeYJavaType) { t = ((KeYJavaType) t).getJavaType(); + } return t == PrimitiveType.JAVA_BOOLEAN; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/KeYJavaType.java b/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/KeYJavaType.java index c4ebf7e746c..8114a85a2c2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/KeYJavaType.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/KeYJavaType.java @@ -67,16 +67,19 @@ public Sort getSort() { * @return the default value of the given type according to JLS Sect. 4.5.5 */ public Literal getDefaultValue() { - if (javaType == null) + if (javaType == null) { return null; + } return javaType.getDefaultValue(); } public String toString() { - if (this == VOID_TYPE) + if (this == VOID_TYPE) { return "KeYJavaType:void"; - if (javaType == null) + } + if (javaType == null) { return "KeYJavaType:null," + sort; + } return "(type, sort): (" + javaType.getName() + "," + sort + ")"; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/Package.java b/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/Package.java index d185c1bc6df..1f36527ec05 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/Package.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/Package.java @@ -8,7 +8,7 @@ */ public class Package implements ClassTypeContainer { - private String name; + private final String name; /** * Creates a new package with the given name, organized by the given program model info. diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/PrimitiveType.java b/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/PrimitiveType.java index d487dbd1ad2..ece3b85f6b1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/PrimitiveType.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/abstraction/PrimitiveType.java @@ -1,34 +1,14 @@ package de.uka.ilkd.key.java.abstraction; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.Map; - import de.uka.ilkd.key.java.expression.Literal; -import de.uka.ilkd.key.java.expression.literal.BooleanLiteral; -import de.uka.ilkd.key.java.expression.literal.CharLiteral; -import de.uka.ilkd.key.java.expression.literal.DoubleLiteral; -import de.uka.ilkd.key.java.expression.literal.EmptyMapLiteral; -import de.uka.ilkd.key.java.expression.literal.EmptySeqLiteral; -import de.uka.ilkd.key.java.expression.literal.EmptySetLiteral; -import de.uka.ilkd.key.java.expression.literal.FloatLiteral; -import de.uka.ilkd.key.java.expression.literal.FreeLiteral; -import de.uka.ilkd.key.java.expression.literal.IntLiteral; -import de.uka.ilkd.key.java.expression.literal.LongLiteral; -import de.uka.ilkd.key.java.expression.literal.RealLiteral; -import de.uka.ilkd.key.java.recoderext.DLEmbeddedExpression; -import de.uka.ilkd.key.ldt.BooleanLDT; -import de.uka.ilkd.key.ldt.DoubleLDT; -import de.uka.ilkd.key.ldt.FloatLDT; -import de.uka.ilkd.key.ldt.FreeLDT; -import de.uka.ilkd.key.ldt.IntegerLDT; -import de.uka.ilkd.key.ldt.LocSetLDT; -import de.uka.ilkd.key.ldt.MapLDT; -import de.uka.ilkd.key.ldt.RealLDT; -import de.uka.ilkd.key.ldt.SeqLDT; +import de.uka.ilkd.key.java.expression.literal.*; +import de.uka.ilkd.key.ldt.*; import de.uka.ilkd.key.logic.Name; import de.uka.ilkd.key.logic.ProgramElementName; +import java.util.LinkedHashMap; +import java.util.Map; + /** * A program model element representing primitive types. * @@ -165,28 +145,29 @@ public String toString() { */ public ProgramElementName getArrayElementName() { if (arrayElementName == null) { - if (this.getName().equals("byte")) + if (this.getName().equals("byte")) { arrayElementName = new ProgramElementName("[B"); - else if (this.getName().equals("char")) + } else if (this.getName().equals("char")) { arrayElementName = new ProgramElementName("[C"); - else if (this.getName().equals("double")) + } else if (this.getName().equals("double")) { arrayElementName = new ProgramElementName("[D"); - else if (this.getName().equals("float")) + } else if (this.getName().equals("float")) { arrayElementName = new ProgramElementName("[F"); - else if (this.getName().equals("int")) + } else if (this.getName().equals("int")) { arrayElementName = new ProgramElementName("[I"); - else if (this.getName().equals("long")) + } else if (this.getName().equals("long")) { arrayElementName = new ProgramElementName("[J"); - else if (this.getName().equals("short")) + } else if (this.getName().equals("short")) { arrayElementName = new ProgramElementName("[S"); - else if (this.getName().equals("boolean")) + } else if (this.getName().equals("boolean")) { arrayElementName = new ProgramElementName("[Z"); - else if (this.getName().equals("\\locset")) + } else if (this.getName().equals("\\locset")) { arrayElementName = new ProgramElementName("[X"); - else if (this.getName().equals("\\bigint")) + } else if (this.getName().equals("\\bigint")) { arrayElementName = new ProgramElementName("[Y"); - else if (this.getName().equals("\\real")) + } else if (this.getName().equals("\\real")) { arrayElementName = new ProgramElementName("[R"); + } } assert arrayElementName != null; return arrayElementName; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ArrayDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ArrayDeclaration.java index fa893b729ad..d2cb816c0d9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ArrayDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ArrayDeclaration.java @@ -69,14 +69,18 @@ public ArrayDeclaration(ExtList children, TypeReference baseType, KeYJavaType su */ public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (name != null) + } + if (name != null) { result++; - if (basetype != null) + } + if (basetype != null) { result++; - if (members != null) + } + if (members != null) { result += members.size(); + } return result; } @@ -101,13 +105,15 @@ public ProgramElement getChildAt(int index) { index -= len; } if (name != null) { - if (index == 0) + if (index == 0) { return name; + } index--; } if (basetype != null) { - if (index == 0) + if (index == 0) { return basetype; + } index--; } if (members != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java index 38c25371f81..7e1460c1420 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassDeclaration.java @@ -115,16 +115,21 @@ public ClassDeclaration(ExtList children, ProgramElementName fullName, boolean i */ public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (name != null) + } + if (name != null) { result++; - if (extending != null) + } + if (extending != null) { result++; - if (implementing != null) + } + if (implementing != null) { result++; - if (members != null) + } + if (members != null) { result += members.size(); + } return result; } @@ -145,18 +150,21 @@ public ProgramElement getChildAt(int index) { index -= len; } if (name != null) { - if (index == 0) + if (index == 0) { return name; + } index--; } if (extending != null) { - if (index == 0) + if (index == 0) { return extending; + } index--; } if (implementing != null) { - if (index == 0) + if (index == 0) { return implementing; + } index--; } if (members != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassInitializer.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassInitializer.java index 2f559c95c06..fdefa1160cc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassInitializer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ClassInitializer.java @@ -68,10 +68,12 @@ public Statement getStatementAt(int index) { public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -93,8 +95,9 @@ public ProgramElement getChildAt(int index) { index -= len; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/EnumClassDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/EnumClassDeclaration.java index 6c016c308de..172c7c76ddc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/EnumClassDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/EnumClassDeclaration.java @@ -28,7 +28,7 @@ public class EnumClassDeclaration extends ClassDeclaration { /** * store the program variables which represent the enum constants */ - private List constants = new ArrayList(); + private final List constants = new ArrayList(); /** * create a new EnumClassDeclaration that describes an enum defintion. It merely wraps a @@ -77,8 +77,9 @@ private IProgramVariable findAttr(String fieldName) { */ private boolean isLocalEnumConstant(IProgramVariable pv) { for (IProgramVariable cnst : constants) { - if (cnst.equals(pv)) + if (cnst.equals(pv)) { return true; + } } return false; } @@ -91,8 +92,9 @@ private boolean isLocalEnumConstant(IProgramVariable pv) { */ private int localIndexOf(ProgramVariable pv) { for (int i = 0; i < constants.size(); i++) { - if (constants.get(i).equals(pv)) + if (constants.get(i).equals(pv)) { return i; + } } return -1; } @@ -115,20 +117,22 @@ public int getNumberOfConstants() { public static boolean isEnumConstant(IProgramVariable attribute) { KeYJavaType kjt = attribute.getKeYJavaType(); Type type = kjt.getJavaType(); - if (type instanceof EnumClassDeclaration) + if (type instanceof EnumClassDeclaration) { return ((EnumClassDeclaration) type).isLocalEnumConstant(attribute); - else + } else { return false; + } } // TODO DOC public static int indexOf(ProgramVariable attribute) { KeYJavaType kjt = attribute.getKeYJavaType(); Type type = kjt.getJavaType(); - if (type instanceof EnumClassDeclaration) + if (type instanceof EnumClassDeclaration) { return ((EnumClassDeclaration) type).localIndexOf(attribute); - else + } else { return -1; + } } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/FieldDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/FieldDeclaration.java index 180fd8c725a..9784d8dc29d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/FieldDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/FieldDeclaration.java @@ -64,12 +64,15 @@ public ImmutableArray getVariables() { public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (typeReference != null) + } + if (typeReference != null) { result++; - if (fieldSpecs != null) + } + if (fieldSpecs != null) { result += fieldSpecs.size(); + } return result; } @@ -90,8 +93,9 @@ public ProgramElement getChildAt(int index) { index -= len; } if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } index--; } if (fieldSpecs != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InheritanceSpecification.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InheritanceSpecification.java index 171c044ffef..79a098804ed 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InheritanceSpecification.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InheritanceSpecification.java @@ -81,8 +81,9 @@ public SourceElement getLastElement() { public int getChildCount() { int result = 0; - if (supertypes != null) + if (supertypes != null) { result += supertypes.size(); + } return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java index 09091737e45..568e1a355cd 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/InterfaceDeclaration.java @@ -63,14 +63,18 @@ public InterfaceDeclaration(ProgramElementName name) { */ public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (name != null) + } + if (name != null) { result++; - if (extending != null) + } + if (extending != null) { result++; - if (members != null) + } + if (members != null) { result += members.size(); + } return result; } @@ -91,13 +95,15 @@ public ProgramElement getChildAt(int index) { index -= len; } if (name != null) { - if (index == 0) + if (index == 0) { return name; + } index--; } if (extending != null) { - if (index == 0) + if (index == 0) { return extending; + } index--; } if (members != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/LocalVariableDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/LocalVariableDeclaration.java index fcab608bb2b..dd8aa0c23d9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/LocalVariableDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/LocalVariableDeclaration.java @@ -119,12 +119,15 @@ public ImmutableArray getVariables() { public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (typeReference != null) + } + if (typeReference != null) { result++; - if (varSpecs != null) + } + if (varSpecs != null) { result += varSpecs.size(); + } return result; } @@ -146,8 +149,9 @@ public ProgramElement getChildAt(int index) { index -= len; } if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } index--; } if (varSpecs != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/MethodDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/MethodDeclaration.java index 71d72660cf5..ec227ac4f20 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/MethodDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/MethodDeclaration.java @@ -152,18 +152,24 @@ public SourceElement getLastElement() { @Override public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (returnType != null) + } + if (returnType != null) { result++; - if (name != null) + } + if (name != null) { result++; - if (parameters != null) + } + if (parameters != null) { result += parameters.size(); - if (exceptions != null) + } + if (exceptions != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -179,13 +185,15 @@ public ProgramElement getChildAt(int index) { index -= len; } if (returnType != null) { - if (index == 0) + if (index == 0) { return returnType; + } index--; } if (name != null) { - if (index == 0) + if (index == 0) { return name; + } index--; } if (parameters != null) { @@ -196,13 +204,15 @@ public ProgramElement getChildAt(int index) { index -= len; } if (exceptions != null) { - if (index == 0) + if (index == 0) { return exceptions; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } } throw new ArrayIndexOutOfBoundsException(); } @@ -348,8 +358,9 @@ public boolean isVoid() { * @return true iff so */ public boolean isVarArgMethod() { - if (parameters == null || parameters.size() == 0) + if (parameters == null || parameters.size() == 0) { return false; + } return parameters.get(parameters.size() - 1).isVarArg(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ParameterDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ParameterDeclaration.java index eafbcdf4326..be7b8214c1b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ParameterDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/ParameterDeclaration.java @@ -107,12 +107,15 @@ public ImmutableArray getVariables() { */ public int getChildCount() { int result = 0; - if (modArray != null) + if (modArray != null) { result += modArray.size(); - if (typeReference != null) + } + if (typeReference != null) { result++; - if (varSpec != null) + } + if (varSpec != null) { result++; + } return result; } @@ -134,13 +137,15 @@ public ProgramElement getChildAt(int index) { index -= len; } if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } index--; } if (varSpec != null) { - if (index == 0) + if (index == 0) { return varSpec.get(0); + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/Throws.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/Throws.java index f7da1050c7f..66250a497c8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/Throws.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/Throws.java @@ -75,8 +75,9 @@ public SourceElement getLastElement() { */ public int getChildCount() { int result = 0; - if (exceptions != null) + if (exceptions != null) { result += exceptions.size(); + } return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/TypeDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/TypeDeclaration.java index de55183491d..cedb15c9313 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/TypeDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/TypeDeclaration.java @@ -374,7 +374,8 @@ public boolean isAbstract() { public boolean equals(Object o) { if (o instanceof TypeDeclaration) { return ((TypeDeclaration) o).fullName.equals(fullName); - } else + } else { return false; + } } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/VariableSpecification.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/VariableSpecification.java index d792b1982f1..7b67c5b4069 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/VariableSpecification.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/VariableSpecification.java @@ -97,10 +97,12 @@ public VariableSpecification(ExtList children, IProgramVariable var, int dim, Ty */ public int getChildCount() { int result = 0; - if (var != null) + if (var != null) { result++; - if (initializer != null) + } + if (initializer != null) { result++; + } return result; } @@ -113,8 +115,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (var != null) { - if (index == 0) + if (index == 0) { return var; + } index--; } if (initializer != null && index == 0) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Private.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Private.java index 458285c61e2..8c5aac36bea 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Private.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Private.java @@ -38,14 +38,18 @@ protected String getSymbol() { @Override public int compareTo(VisibilityModifier arg0) { - if (arg0 instanceof Private) + if (arg0 instanceof Private) { return 0; - if (arg0 == null) + } + if (arg0 == null) { return 1; - if (arg0 instanceof Protected) + } + if (arg0 instanceof Protected) { return 2; - if (arg0 instanceof Public) + } + if (arg0 instanceof Public) { return 3; + } assert false; return 0; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Protected.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Protected.java index 47e3a502fed..40e4562d0c8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Protected.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Protected.java @@ -39,14 +39,18 @@ protected String getSymbol() { @Override public int compareTo(VisibilityModifier arg0) { - if (arg0 instanceof Private) + if (arg0 instanceof Private) { return -2; - if (arg0 == null) + } + if (arg0 == null) { return -1; - if (arg0 instanceof Protected) + } + if (arg0 instanceof Protected) { return 0; - if (arg0 instanceof Public) + } + if (arg0 instanceof Public) { return 1; + } assert false; return 0; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Public.java b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Public.java index 44de2b93aed..1f0548cf3d2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Public.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/declaration/modifier/Public.java @@ -39,14 +39,18 @@ protected String getSymbol() { @Override public int compareTo(VisibilityModifier arg0) { - if (arg0 instanceof Private) + if (arg0 instanceof Private) { return -3; - if (arg0 == null) + } + if (arg0 == null) { return -2; - if (arg0 instanceof Protected) + } + if (arg0 instanceof Protected) { return -1; - if (arg0 instanceof Public) + } + if (arg0 instanceof Public) { return 0; + } assert false; return 0; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/Assignment.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/Assignment.java index 85812af86f6..a6333082ad8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/Assignment.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/Assignment.java @@ -86,10 +86,11 @@ public String reuseSignature(Services services, ExecutionContext ec) { // no second argument, e.g. PostIncrement return base; } - if (rhs instanceof BooleanLiteral) + if (rhs instanceof BooleanLiteral) { return base + "[" + rhs + "]"; - else + } else { return base; + } } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Conditional.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Conditional.java index b02c2a2f5ec..40d03fec574 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Conditional.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Conditional.java @@ -80,33 +80,41 @@ public KeYJavaType getKeYJavaType(Services javaServ, ExecutionContext ec) { final TypeConverter tc = javaServ.getTypeConverter(); final KeYJavaType type1 = tc.getKeYJavaType(getExpressionAt(1), ec); final KeYJavaType type2 = tc.getKeYJavaType(getExpressionAt(2), ec); - if (tc.isIdentical(type1, type2)) + if (tc.isIdentical(type1, type2)) { return type1; + } // numeric types if (tc.isNumericalType(type1) && tc.isNumericalType(type2)) { if (type1.getJavaType() == PrimitiveType.JAVA_BYTE && type2.getJavaType() == PrimitiveType.JAVA_SHORT || type1.getJavaType() == PrimitiveType.JAVA_SHORT - && type2.getJavaType() == PrimitiveType.JAVA_BYTE) + && type2.getJavaType() == PrimitiveType.JAVA_BYTE) { return javaServ.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_SHORT); - if (tc.isImplicitNarrowing(getExpressionAt(1), (PrimitiveType) type2.getJavaType())) + } + if (tc.isImplicitNarrowing(getExpressionAt(1), (PrimitiveType) type2.getJavaType())) { return type2; - if (tc.isImplicitNarrowing(getExpressionAt(2), (PrimitiveType) type1.getJavaType())) + } + if (tc.isImplicitNarrowing(getExpressionAt(2), (PrimitiveType) type1.getJavaType())) { return type1; + } return tc.getPromotedType(type1, type2); } // reference types - if (tc.isNullType(type1) && tc.isReferenceType(type2)) + if (tc.isNullType(type1) && tc.isReferenceType(type2)) { return type2; - if (tc.isNullType(type2) && tc.isReferenceType(type1)) + } + if (tc.isNullType(type2) && tc.isReferenceType(type1)) { return type1; - if (tc.isAssignableTo(type1, type2)) + } + if (tc.isAssignableTo(type1, type2)) { return type2; - if (tc.isAssignableTo(type2, type1)) + } + if (tc.isAssignableTo(type2, type1)) { return type1; + } throw new RuntimeException("Could not determine type of conditional " + "expression\n" + this + ". This usually means that " + "the Java program is not compilable."); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/DLEmbeddedExpression.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/DLEmbeddedExpression.java index 278e4e274af..b12d00da7e4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/DLEmbeddedExpression.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/DLEmbeddedExpression.java @@ -79,8 +79,9 @@ public void visit(Visitor v) { public void check(Services javaServ, KeYJavaType containingClass) throws ConvertException { - if (functionSymbol == null) + if (functionSymbol == null) { throw new ConvertException("null function symbol"); + } int expected = functionSymbol.arity(); int actual = children.size(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/ExactInstanceof.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/ExactInstanceof.java index a570433f68a..67f1fa8c134 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/ExactInstanceof.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/ExactInstanceof.java @@ -41,10 +41,12 @@ public ExactInstanceof(Expression unaryChild, TypeReference typeref) { public int getChildCount() { int result = 0; - if (children != null) + if (children != null) { result += children.size(); - if (typeReference != null) + } + if (typeReference != null) { result++; + } return result; } @@ -70,8 +72,9 @@ public ProgramElement getChildAt(int index) { index -= len; } if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Instanceof.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Instanceof.java index 777627dfa5f..f9e65ba4884 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Instanceof.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/Instanceof.java @@ -44,10 +44,12 @@ public Instanceof(Expression unaryChild, TypeReference typeref) { public int getChildCount() { int result = 0; - if (children != null) + if (children != null) { result += children.size(); - if (typeReference != null) + } + if (typeReference != null) { result++; + } return result; } @@ -73,8 +75,9 @@ public ProgramElement getChildAt(int index) { index -= len; } if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/New.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/New.java index 9cebe95a7b0..96a3d345c46 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/New.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/New.java @@ -140,14 +140,18 @@ public TypeDeclaration getTypeDeclarationAt(int index) { @Override public int getChildCount() { int result = 0; - if (accessPath != null) + if (accessPath != null) { result++; - if (typeReference != null) + } + if (typeReference != null) { result++; - if (children != null) + } + if (children != null) { result += children.size(); - if (anonymousClass != null) + } + if (anonymousClass != null) { result++; + } return result; } @@ -156,13 +160,15 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { int len; if (accessPath != null) { - if (index == 0) + if (index == 0) { return accessPath; + } index--; } if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } index--; } if (children != null) { @@ -173,8 +179,9 @@ public ProgramElement getChildAt(int index) { index -= len; } if (anonymousClass != null) { - if (index == 0) + if (index == 0) { return anonymousClass; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/NewArray.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/NewArray.java index bc230b29cc7..9a115998f30 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/NewArray.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/NewArray.java @@ -146,12 +146,15 @@ public ArrayInitializer getArrayInitializer() { public int getChildCount() { int result = 0; - if (typeReference != null) + if (typeReference != null) { result++; - if (children != null) + } + if (children != null) { result += children.size(); - if (arrayInitializer != null) + } + if (arrayInitializer != null) { result++; + } return result; } @@ -166,8 +169,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { int len; if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } index--; } if (children != null) { @@ -178,8 +182,9 @@ public ProgramElement getChildAt(int index) { index -= len; } if (arrayInitializer != null) { - if (index == 0) + if (index == 0) { return arrayInitializer; + } } throw new ArrayIndexOutOfBoundsException(); } @@ -192,10 +197,12 @@ public ProgramElement getChildAt(int index) { public int getExpressionCount() { int result = 0; - if (children != null) + if (children != null) { result += children.size(); - if (arrayInitializer != null) + } + if (arrayInitializer != null) { result++; + } return result; } @@ -219,8 +226,9 @@ public Expression getExpressionAt(int index) { index -= len; } if (arrayInitializer != null) { - if (index == 0) + if (index == 0) { return arrayInitializer; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/TypeCast.java b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/TypeCast.java index 182e2994abc..4bdd07fb690 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/TypeCast.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/expression/operator/TypeCast.java @@ -47,10 +47,12 @@ public TypeCast(ExtList children) { public int getChildCount() { int result = 0; - if (typeReference != null) + if (typeReference != null) { result++; - if (children != null) + } + if (children != null) { result += children.size(); + } return result; } @@ -65,8 +67,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { int len; if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } index--; } if (children != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CatchAllStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CatchAllStatement.java index 1ce4d53dcba..615d8d592de 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CatchAllStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CatchAllStatement.java @@ -111,10 +111,12 @@ public SourceElement getLastElement() { */ public int getChildCount() { int result = 0; - if (body != null) + if (body != null) { result++; - if (param != null) + } + if (param != null) { result++; + } return result; } @@ -128,13 +130,15 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (param != null) { - if (index == 0) + if (index == 0) { return param; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Ccatch.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Ccatch.java index e8457c74cdf..0e41c90c6c6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Ccatch.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Ccatch.java @@ -132,12 +132,15 @@ public SourceElement getLastElement() { @Override public int getChildCount() { int result = 0; - if (hasParameterDeclaration()) + if (hasParameterDeclaration()) { result++; - if (hasNonStdParameterDeclaration()) + } + if (hasNonStdParameterDeclaration()) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -151,18 +154,21 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (hasParameterDeclaration()) { - if (index == 0) + if (index == 0) { return parameter.get(); + } index--; } if (hasNonStdParameterDeclaration()) { - if (index == 0) + if (index == 0) { return nonStdParameter.get(); + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchBreakLabelParameterDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchBreakLabelParameterDeclaration.java index 8fa7049838a..e72ae939e70 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchBreakLabelParameterDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchBreakLabelParameterDeclaration.java @@ -52,8 +52,9 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (label != null) { - if (index == 0) + if (index == 0) { return label; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchContinueLabelParameterDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchContinueLabelParameterDeclaration.java index ea535e1090b..ad873090c0d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchContinueLabelParameterDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CcatchContinueLabelParameterDeclaration.java @@ -52,8 +52,9 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (label != null) { - if (index == 0) + if (index == 0) { return label; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationBuilder.java index fff01500745..b8b04b3277a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationBuilder.java @@ -55,13 +55,13 @@ public class ClassFileDeclarationBuilder implements Comparable memberDecls; // the manager to which this builder belongs - private ClassFileDeclarationManager manager; + private final ClassFileDeclarationManager manager; // store all type parameters of this class and potentially // all enclosing classes @@ -115,10 +115,11 @@ public String getFullClassname() { * @return the name of the class */ public String getClassName() { - if (isInnerClass()) + if (isInnerClass()) { return physicalName.substring(physicalName.lastIndexOf('$') + 1); - else + } else { return physicalName.substring(physicalName.lastIndexOf('.') + 1); + } } /** @@ -159,8 +160,9 @@ public TypeDeclaration makeTypeDeclaration() { memberDecls = new ASTArrayList(); if (typeDecl instanceof EnumDeclaration) { for (FieldInfo field : classFile.getFieldInfos()) { - if (isEnumConstant(field)) + if (isEnumConstant(field)) { addEnumConstant(field); + } } // create a default constructor for the enum constants addDefaultConstructor(); @@ -169,8 +171,9 @@ public TypeDeclaration makeTypeDeclaration() { addConstructor(constr); } for (FieldInfo field : classFile.getFieldInfos()) { - if (!isEnumConstant(field)) + if (!isEnumConstant(field)) { addField(field); + } } for (MethodInfo method : classFile.getMethodInfos()) { addMethod(method); @@ -229,9 +232,10 @@ public boolean isAnonymousClass() { * */ public void attachToEnclosingDeclaration() { - if (!isInnerClass()) + if (!isInnerClass()) { throw new IllegalStateException( "only inner classes can be attached to enclosing classes"); + } // this builder must not yet have built: assert typeDecl == null; @@ -251,8 +255,9 @@ public void attachToEnclosingDeclaration() { * @return class name, not null */ public String getEnclosingName() { - if (!isInnerClass() && !isAnonymousClass()) + if (!isInnerClass() && !isAnonymousClass()) { throw new IllegalStateException("only inner classes have an enclosing class"); + } return physicalName.substring(0, physicalName.lastIndexOf('$')); } @@ -270,8 +275,9 @@ public String getEnclosingName() { public static CompilationUnit makeEmptyClassDeclaration(ProgramFactory programFactory, String fullClassName) throws ParserException { - while (fullClassName.endsWith("[]")) + while (fullClassName.endsWith("[]")) { fullClassName = fullClassName.substring(0, fullClassName.length() - 2); + } String cuString = ""; int lastdot = fullClassName.lastIndexOf('.'); @@ -328,16 +334,21 @@ private void setNameAndMods() { ASTArrayList specs = new ASTArrayList(); - if (classFile.isAbstract()) + if (classFile.isAbstract()) { specs.add(factory.createAbstract()); - if (classFile.isPublic()) + } + if (classFile.isPublic()) { specs.add(factory.createPublic()); - if (classFile.isFinal()) + } + if (classFile.isFinal()) { specs.add(factory.createFinal()); - if (classFile.isStrictFp()) + } + if (classFile.isStrictFp()) { specs.add(factory.createStrictFp()); - if (classFile.isStatic()) + } + if (classFile.isStatic()) { specs.add(factory.createStatic()); + } typeDecl.setDeclarationSpecifiers(specs); } @@ -348,8 +359,9 @@ private void setNameAndMods() { private void setInheritance() { // do not inherit Object from itself! - if ("java.lang.Object".equals(physicalName)) + if ("java.lang.Object".equals(physicalName)) { return; + } String superClassName = classFile.getSuperClassName(); String[] interfaceNames = classFile.getInterfaceNames(); @@ -364,26 +376,30 @@ private void setInheritance() { for (String intf : interfaceNames) { implList.add(createTypeReference(intf)); } - if (implList.size() > 0) + if (implList.size() > 0) { classDecl.setImplementedTypes(factory.createImplements(implList)); + } } else if (typeDecl instanceof EnumDeclaration) { EnumDeclaration enDecl = (EnumDeclaration) typeDecl; ASTList implList = new ASTArrayList(); for (String intf : interfaceNames) { implList.add(createTypeReference(intf)); } - if (implList.size() > 0) + if (implList.size() > 0) { enDecl.setImplementedTypes(factory.createImplements(implList)); + } } else if (typeDecl instanceof InterfaceDeclaration) { InterfaceDeclaration intfDecl = (InterfaceDeclaration) typeDecl; ASTList implList = new ASTArrayList(); for (String intf : interfaceNames) { implList.add(createTypeReference(intf)); } - if (implList.size() > 0) + if (implList.size() > 0) { intfDecl.setExtendedTypes(factory.createExtends(implList)); - } else + } + } else { throw new Error("unknown declaration type: " + typeDecl.getClass().getName()); + } } @@ -393,8 +409,9 @@ private void setInheritance() { private void setPackage() { int packIndex = physicalName.lastIndexOf('.'); // default package: job done - if (packIndex < 0) + if (packIndex < 0) { return; + } String packName = physicalName.substring(0, packIndex); PackageReference ref = makePackageReference(packName); PackageSpecification p = factory.createPackageSpecification(ref); @@ -408,16 +425,21 @@ private void setPackage() { */ private ASTList makeFieldSpecifiers(FieldInfo decl) { ASTList specs = new ASTArrayList(); - if (decl.isPrivate()) + if (decl.isPrivate()) { specs.add(factory.createPrivate()); - if (decl.isProtected()) + } + if (decl.isProtected()) { specs.add(factory.createProtected()); - if (decl.isPublic()) + } + if (decl.isPublic()) { specs.add(factory.createPublic()); - if (decl.isStatic()) + } + if (decl.isStatic()) { specs.add(factory.createStatic()); - if (decl.isFinal()) + } + if (decl.isFinal()) { specs.add(factory.createFinal()); + } return specs; } @@ -437,8 +459,9 @@ private void addField(FieldInfo field) { // ignore internal fields. String name = field.getName(); - if (isInternal(name)) + if (isInternal(name)) { return; + } String typename = field.getTypeName(); typename = resolveTypeVariable(typename, null); @@ -470,18 +493,24 @@ private void addEnumConstant(FieldInfo field) { */ private ASTList makeMethodSpecifiers(MethodInfo decl) { ASTList specs = new ASTArrayList(); - if (decl.isAbstract()) + if (decl.isAbstract()) { specs.add(factory.createAbstract()); - if (decl.isPrivate()) + } + if (decl.isPrivate()) { specs.add(factory.createPrivate()); - if (decl.isProtected()) + } + if (decl.isProtected()) { specs.add(factory.createProtected()); - if (decl.isPublic()) + } + if (decl.isPublic()) { specs.add(factory.createPublic()); - if (decl.isFinal()) + } + if (decl.isFinal()) { specs.add(factory.createAbstract()); - if (decl.isStatic()) + } + if (decl.isStatic()) { specs.add(factory.createStatic()); + } return specs; } @@ -496,8 +525,9 @@ private void addMethod(MethodInfo method) { // feature: ignore access functions which should not ne visible on // source code level String methodName = method.getName(); - if (isInternal(methodName)) + if (isInternal(methodName)) { return; + } String returntype = method.getTypeName(); returntype = resolveTypeVariable(returntype, method.getTypeParameters()); @@ -573,8 +603,9 @@ private void addConstructor(ConstructorInfo constr) { tys = resolveTypeVariable(tys, constr.getTypeParameters()); // filter out those constructors with a Classname$1 argument // that are only introduced for technical reasons - if (ClassFileDeclarationBuilder.isAnononymous(tys)) + if (ClassFileDeclarationBuilder.isAnononymous(tys)) { return; + } type = createTypeReference(tys); String name = "arg" + (index++); Identifier id = factory.createIdentifier(name); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationManager.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationManager.java index 582a9a3005f..749ebccab07 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationManager.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ClassFileDeclarationManager.java @@ -46,13 +46,13 @@ public class ClassFileDeclarationManager { private static final Logger LOGGER = LoggerFactory.getLogger(ClassFileDeclarationManager.class); - private List compUnits = new ArrayList<>(); + private final List compUnits = new ArrayList<>(); - private List builderList = new ArrayList<>(); + private final List builderList = new ArrayList<>(); - private ProgramFactory programFactory; + private final ProgramFactory programFactory; - private Map classBuilders = new LinkedHashMap<>(); + private final Map classBuilders = new LinkedHashMap<>(); /** * create a new ClassFileDeclarationManager diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ConstructorNormalformBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ConstructorNormalformBuilder.java index 390bc7a1a79..dcba5278634 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ConstructorNormalformBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ConstructorNormalformBuilder.java @@ -227,8 +227,9 @@ private MethodDeclaration normalform(ClassDeclaration cd, Constructor cons) { TypeDeclaration td = class2enclosingClass.get(cd); final List outerVars = getLocalClass2FinalVar().get(cd); int j = et == null ? 0 : 1; - if (outerVars != null) + if (outerVars != null) { j += outerVars.size(); + } ParameterDeclaration pd = null; CopyAssignment ca = null; String etId = "_ENCLOSING_THIS"; @@ -254,9 +255,11 @@ private MethodDeclaration normalform(ClassDeclaration cd, Constructor cons) { StatementBlock origBody = consDecl.getBody(); if (origBody == null) // may happen if a stub is defined with an empty constructor + { body = null; - else + } else { body = origBody.deepClone(); + } } if (outerVars != null && !outerVars.isEmpty()) { @@ -300,12 +303,14 @@ private MethodDeclaration normalform(ClassDeclaration cd, Constructor cons) { ((SuperConstructorReference) first).getReferencePrefix(); ASTList args = ((SpecialConstructorReference) first).getArguments(); if (referencePrefix instanceof Expression) { - if (args == null) + if (args == null) { args = new ASTArrayList<>(1); + } args.add((Expression) referencePrefix); } else if (class2superContainer.get(cd) != null) { - if (args == null) + if (args == null) { args = new ASTArrayList<>(1); + } args.add(new VariableReference(new Identifier(etId))); } attach( @@ -348,8 +353,9 @@ private MethodDeclaration normalform(ClassDeclaration cd, Constructor cons) { private ConstructorDeclaration attachConstructorDecl(TypeDeclaration td) { if (td.getASTParent() instanceof New) { New n = (New) td.getASTParent(); - if (n.getArguments() == null || n.getArguments().isEmpty()) + if (n.getArguments() == null || n.getArguments().isEmpty()) { return null; + } ConstructorDeclaration constr = services.getCrossReferenceSourceInfo().getConstructorDeclaration( services.getCrossReferenceSourceInfo().getConstructor(n)); @@ -376,8 +382,9 @@ protected void makeExplicit(TypeDeclaration td) { if (td.getName() == null) { anonConstr = attachConstructorDecl(td); } - if (anonConstr != null) + if (anonConstr != null) { constructors.add(anonConstr); + } for (Constructor constructor : constructors) { attach(normalform((ClassDeclaration) td, constructor), td, 0); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CreateObjectBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CreateObjectBuilder.java index 607073bb0ed..3edb88f5135 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CreateObjectBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/CreateObjectBuilder.java @@ -93,10 +93,11 @@ private StatementBlock createBody(ClassDeclaration recoderClass) { */ private TypeReference makeTyRef(ClassDeclaration recoderClass) { Identifier id = recoderClass.getIdentifier(); - if (id instanceof ImplicitIdentifier) + if (id instanceof ImplicitIdentifier) { return new TypeReference(id); - else + } else { return TypeKit.createTypeReference(getProgramFactory(), recoderClass); + } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/EnumClassDeclaration.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/EnumClassDeclaration.java index 48182112b14..627a57c10e2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/EnumClassDeclaration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/EnumClassDeclaration.java @@ -86,7 +86,7 @@ public class EnumClassDeclaration extends ClassDeclaration { * store the EnumConstantDeclarations here. NB: The AST-parent cannot be set to this * because it is not a EnumDeclaration. */ - private List enumConstants; + private final List enumConstants; public EnumClassDeclaration() { super(); @@ -113,10 +113,11 @@ public EnumClassDeclaration(EnumDeclaration ed) { // Declaration Specs. ASTList orgDecls = ed.getDeclarationSpecifiers(); ASTList decls; - if (orgDecls != null) + if (orgDecls != null) { decls = orgDecls.deepClone(); - else + } else { decls = new ASTArrayList(); + } if (!ed.isFinal()) { decls.add(f.createFinal()); @@ -124,8 +125,9 @@ public EnumClassDeclaration(EnumDeclaration ed) { // // Comments - if (ed.getComments() != null) + if (ed.getComments() != null) { setComments(ed.getComments().deepClone()); + } // // Extends @@ -134,8 +136,9 @@ public EnumClassDeclaration(EnumDeclaration ed) { // // Implements Implements implement = ed.getImplementedTypes(); - if (implement != null) + if (implement != null) { setImplementedTypes(implement.deepClone()); + } // // Members @@ -147,8 +150,9 @@ public EnumClassDeclaration(EnumDeclaration ed) { if (mem instanceof EnumConstantDeclaration) { members.add(makeConstantField((EnumConstantDeclaration) mem, ed)); enumConstants.add((EnumConstantDeclaration) mem.deepClone()); - } else + } else { members.add((MemberDeclaration) mem.deepClone()); + } } @@ -175,8 +179,9 @@ private void addImplicitMethods() { // values StringBuilder sb = new StringBuilder(); for (EnumConstantDeclaration ecd : getEnumConstantDeclarations()) { - if (sb.length() != 0) + if (sb.length() != 0) { sb.append(", "); + } sb.append(ecd.getEnumConstantSpecification().getIdentifier().getText()); } String valuesString = VALUES_PROTO.replace("$E", getIdentifier().getText()); @@ -254,10 +259,11 @@ private void addInternalFields() { * normal Identifier */ private static Identifier createIdentifier(String string) { - if (string.startsWith("<")) + if (string.startsWith("<")) { return new ImplicitIdentifier(string); - else + } else { return new Identifier(string); + } } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Exec.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Exec.java index 19633b01d84..d2affa919b3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Exec.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/Exec.java @@ -86,8 +86,9 @@ protected Exec(Exec proto) { if (proto.branches != null) { branches = proto.branches.deepClone(); } - if (proto.variableDeclarations != null) + if (proto.variableDeclarations != null) { variableDeclarations = proto.variableDeclarations.deepClone(); + } makeParentRoleValid(); } @@ -136,10 +137,12 @@ public SourceElement getLastElement() { @Override public int getChildCount() { int result = 0; - if (body != null) + if (body != null) { result++; - if (branches != null) + } + if (branches != null) { result += branches.size(); + } result += variableDeclarations == null ? 0 : variableDeclarations.size(); return result; } @@ -154,13 +157,15 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (variableDeclarations != null) { - if (index < variableDeclarations.size()) + if (index < variableDeclarations.size()) { return variableDeclarations.get(index); + } index -= variableDeclarations.size(); } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } if (branches != null) { @@ -362,8 +367,9 @@ public void setVariableDeclarations(ASTList variableDe public List getVariablesInScope() { if (variableDeclarations != null) { List res = new ArrayList(); - for (LocalVariableDeclaration vd : variableDeclarations) + for (LocalVariableDeclaration vd : variableDeclarations) { res.addAll(vd.getVariables()); + } return res; } return Collections.emptyList(); @@ -373,8 +379,9 @@ public List getVariablesInScope() { public VariableSpecification getVariableInScope(String name) { Debug.assertNonnull(name); for (VariableSpecification vs : getVariablesInScope()) { - if (vs.getName().equals(name)) + if (vs.getName().equals(name)) { return vs; + } } return null; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ExecutionContext.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ExecutionContext.java index b05420e7e7a..456c7b9c36a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ExecutionContext.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ExecutionContext.java @@ -58,12 +58,15 @@ public ExecutionContext(TypeReference classContext, MethodSignature methodContex */ public int getChildCount() { int count = 0; - if (runtimeInstance != null) + if (runtimeInstance != null) { count++; - if (classContext != null) + } + if (classContext != null) { count++; - if (methodContext != null) + } + if (methodContext != null) { count++; + } return count; } @@ -76,18 +79,21 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (classContext != null) { - if (index == 0) + if (index == 0) { return classContext; + } index--; } if (methodContext != null) { - if (index == 0) + if (index == 0) { return methodContext; + } index--; } if (runtimeInstance != null) { - if (index == 0) + if (index == 0) { return runtimeInstance; + } index--; } throw new ArrayIndexOutOfBoundsException(); @@ -102,18 +108,21 @@ public ProgramElement getChildAt(int index) { public int getChildPositionCode(ProgramElement child) { int idx = 0; if (classContext != null) { - if (child == classContext) + if (child == classContext) { return idx; + } idx++; } if (methodContext != null) { - if (child == methodContext) + if (child == methodContext) { return idx; + } idx++; } if (runtimeInstance != null) { - if (child == runtimeInstance) + if (child == runtimeInstance) { return idx; + } } return -1; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/JMLTransformer.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/JMLTransformer.java index bcd00121933..1a0f54db258 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/JMLTransformer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/JMLTransformer.java @@ -126,8 +126,9 @@ private PositionedString convertToString(ImmutableList mods, public static String getFullText(ParserRuleContext context) { if (context.start == null || context.stop == null || context.start.getStartIndex() < 0 - || context.stop.getStopIndex() < 0) + || context.stop.getStopIndex() < 0) { return context.getText(); // Fallback + } return context.start.getInputStream() .getText(Interval.of(context.start.getStartIndex(), context.stop.getStopIndex())); } @@ -393,8 +394,9 @@ private void transformMethodDecl(TextualJMLMethodDecl decl, Comment[] originalCo private void transformAssertStatement(TextualJMLAssertStatement stat, Comment[] originalComments) throws SLTranslationException { - if (originalComments.length <= 0) + if (originalComments.length <= 0) { throw new IllegalArgumentException(); + } // determine parent, child index StatementBlock astParent = (StatementBlock) originalComments[0].getParent().getASTParent(); @@ -533,8 +535,9 @@ private void transformMethodlevelCommentsHelper(ProgramElement pe, String fileNa transformMethodlevelCommentsHelper(aChildren, fileName); } - if (pe instanceof MethodDeclaration) + if (pe instanceof MethodDeclaration) { return; + } // get comments Comment[] comments = getCommentsAndSetParent(pe); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceNameInfo.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceNameInfo.java index d4311e3f621..8d3c752f5ea 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceNameInfo.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceNameInfo.java @@ -95,8 +95,9 @@ public void unregisterClassType(String fullname) { @Override public Type getType(String name) { Type t = super.getType(name); - if (t instanceof ClassType) + if (t instanceof ClassType) { classtypes.put(name, (ClassType) t); + } return t; } @@ -110,8 +111,9 @@ public Type getType(String name) { @Override public ClassType getJavaLangObject() throws ConvertException { ClassType result = super.getJavaLangObject(); - if (result == null) + if (result == null) { throw new ConvertException("Class type 'java.lang.Object' cannot be found"); + } return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceSourceFileRepository.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceSourceFileRepository.java index c1762b755df..262862fa50c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceSourceFileRepository.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/KeYCrossReferenceSourceFileRepository.java @@ -35,8 +35,9 @@ public KeYCrossReferenceSourceFileRepository(ServiceConfiguration config) { */ protected DataLocation createDataLocation(CompilationUnit cu) { DataLocation dataLocation = cu.getDataLocation(); - if (dataLocation == null) + if (dataLocation == null) { dataLocation = SpecDataLocation.UNKNOWN_LOCATION; + } return dataLocation; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/LoopScopeBlock.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/LoopScopeBlock.java index 53275e00705..4a07079835a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/LoopScopeBlock.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/LoopScopeBlock.java @@ -111,10 +111,12 @@ public SourceElement getLastElement() { public int getChildCount() { int result = 0; - if (indexPV != null) + if (indexPV != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -128,13 +130,15 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (indexPV != null) { - if (index == 0) + if (index == 0) { return indexPV; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodBodyStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodBodyStatement.java index d002a0b584a..e87c2358e36 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodBodyStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodBodyStatement.java @@ -150,16 +150,21 @@ public SourceElement getLastElement() { public int getChildCount() { int result = 0; - if (bodySource != null) + if (bodySource != null) { result++; - if (resultVar != null) + } + if (resultVar != null) { result++; - if (methodReferencePrefix != null) + } + if (methodReferencePrefix != null) { result++; - if (methodName != null) + } + if (methodName != null) { result++; - if (arguments != null) + } + if (arguments != null) { result += arguments.size(); + } return result; } @@ -173,23 +178,27 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (bodySource != null) { - if (index == 0) + if (index == 0) { return bodySource; + } index--; } if (resultVar != null) { - if (index == 0) + if (index == 0) { return resultVar; + } index--; } if (methodReferencePrefix != null) { - if (index == 0) + if (index == 0) { return methodReferencePrefix; + } index--; } if (methodName != null) { - if (index == 0) + if (index == 0) { return methodName; + } index--; } if (arguments != null) { @@ -250,8 +259,9 @@ public int getExpressionCount() { */ public Expression getExpressionAt(int index) { if (resultVar != null) { - if (index == 0) + if (index == 0) { return resultVar; + } index--; } if (arguments != null) { @@ -273,8 +283,9 @@ public Expression getExpressionAt(int index) { */ public boolean replaceChild(ProgramElement p, ProgramElement q) { - if (p == null) + if (p == null) { throw new NullPointerException(); + } if (bodySource == p) { TypeReference r = (TypeReference) q; bodySource = r; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodCallStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodCallStatement.java index 58b64c71327..70447f9fb60 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodCallStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/MethodCallStatement.java @@ -151,12 +151,15 @@ public ExecutionContext getExecutionContext() { public int getChildCount() { int result = 0; - if (resultVar != null) + if (resultVar != null) { result++; - if (ec != null) + } + if (ec != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -170,18 +173,21 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (resultVar != null) { - if (index == 0) + if (index == 0) { return resultVar; + } index--; } if (ec != null) { - if (index == 0) + if (index == 0) { return ec; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewArrayWrapper.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewArrayWrapper.java index 09889ddaea6..75e4f01bb5c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewArrayWrapper.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewArrayWrapper.java @@ -9,7 +9,7 @@ public class NewArrayWrapper extends NewArray { * */ private static final long serialVersionUID = -3838799869300845065L; - private Identifier scope; + private final Identifier scope; public NewArrayWrapper(NewArray proto, Identifier scope) { super(proto); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewWrapper.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewWrapper.java index 2c7e50ccdc7..9e91cf437c6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewWrapper.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/NewWrapper.java @@ -9,7 +9,7 @@ public class NewWrapper extends New { * */ private static final long serialVersionUID = -2814303467813768233L; - private Identifier scope; + private final Identifier scope; public NewWrapper(New proto, Identifier scope) { super(proto); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ProofJavaProgramFactory.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ProofJavaProgramFactory.java index b22685365c1..01de640dd98 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ProofJavaProgramFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/ProofJavaProgramFactory.java @@ -42,7 +42,7 @@ protected ProofJavaProgramFactory() {} /** * The singleton instance of the program factory. */ - private static ProofJavaProgramFactory theFactory = new ProofJavaProgramFactory(); + private static final ProofJavaProgramFactory theFactory = new ProofJavaProgramFactory(); /** * Returns the single instance of this class. diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstruct.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstruct.java index 75de4617f77..0d2aa2a82bb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstruct.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstruct.java @@ -9,16 +9,16 @@ package de.uka.ilkd.key.java.recoderext; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - +import de.uka.ilkd.key.logic.op.ProgramSV; import recoder.java.ProgramElement; import recoder.java.SourceVisitor; import recoder.java.Statement; import recoder.java.StatementContainer; import recoder.java.statement.JavaStatement; -import de.uka.ilkd.key.logic.op.ProgramSV; + +import java.util.Iterator; +import java.util.List; +import java.util.Vector; public class RKeYMetaConstruct extends JavaStatement implements StatementContainer, KeYRecoderExtension { @@ -35,7 +35,7 @@ public class RKeYMetaConstruct extends JavaStatement protected String name = ""; /** schemavariable needed by meta construct */ - private List sv = new Vector(); // of ProgramVariableSVWrapper + private final List sv = new Vector(); // of ProgramVariableSVWrapper /** * Loop statement. @@ -70,8 +70,9 @@ public void makeParentRoleValid() { */ public int getChildCount() { int result = 0; - if (child != null) + if (child != null) { result++; + } return result; } @@ -84,8 +85,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (child != null) { - if (index == 0) + if (index == 0) { return child; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructExpression.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructExpression.java index 0d90e976960..ef8a40f49b2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructExpression.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructExpression.java @@ -58,8 +58,9 @@ public void makeParentRoleValid() { */ public int getChildCount() { int result = 0; - if (child != null) + if (child != null) { result++; + } return result; } @@ -72,8 +73,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (child != null) { - if (index == 0) + if (index == 0) { return child; + } } throw new ArrayIndexOutOfBoundsException(); } @@ -103,8 +105,9 @@ public int getIndexOfChild(int posCode) { } public int getRoleOfChild(int i) { - if (i == 0) + if (i == 0) { return getChildPositionCode(child); + } return -1; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructType.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructType.java index 1a14c06d205..4474d18257a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructType.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RKeYMetaConstructType.java @@ -44,8 +44,9 @@ public RKeYMetaConstructType() { */ public int getChildCount() { int result = 0; - if (child != null) + if (child != null) { result++; + } return result; } @@ -58,8 +59,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (child != null) { - if (index == 0) + if (index == 0) { return child; + } } throw new ArrayIndexOutOfBoundsException(); } @@ -89,8 +91,9 @@ public int getIndexOfChild(int posCode) { } public int getRoleOfChild(int i) { - if (i == 0) + if (i == 0) { return getChildPositionCode(child); + } return -1; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodBodyStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodBodyStatement.java index d22d6efb2d6..f92789f2ae7 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodBodyStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodBodyStatement.java @@ -83,16 +83,21 @@ public void setMethodReference(MethodReference methRef) { public int getChildCount() { int result = 0; - if (bodySource != null) + if (bodySource != null) { result++; - if (resultVar != null) + } + if (resultVar != null) { result++; - if (methodReferencePrefix != null) + } + if (methodReferencePrefix != null) { result++; - if (methodName != null) + } + if (methodName != null) { result++; - if (arguments != null) + } + if (arguments != null) { result += arguments.size(); + } return result; } @@ -106,23 +111,27 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (bodySource != null) { - if (index == 0) + if (index == 0) { return bodySource; + } index--; } if (resultVar != null) { - if (index == 0) + if (index == 0) { return resultVar; + } index--; } if (methodReferencePrefix != null) { - if (index == 0) + if (index == 0) { return methodReferencePrefix; + } index--; } if (methodName != null) { - if (index == 0) + if (index == 0) { return methodName; + } index--; } if (arguments != null) { @@ -199,8 +208,9 @@ public void makeParentRoleValid() { */ public boolean replaceChild(ProgramElement p, ProgramElement q) { - if (p == null) + if (p == null) { throw new NullPointerException(); + } if (bodySource == p) { TypeReference r = (TypeReference) q; bodySource = r; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodCallStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodCallStatement.java index 4409b12e3b9..de20f482e76 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodCallStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RMethodCallStatement.java @@ -28,7 +28,7 @@ public class RMethodCallStatement extends JavaStatement private ProgramVariableSVWrapper resultVar; /** schemavariable needed by method call */ - private ExecutionContext ecsvw; + private final ExecutionContext ecsvw; /** * Body. @@ -63,12 +63,15 @@ public void makeParentRoleValid() { public int getChildCount() { int result = 0; - if (resultVar != null) + if (resultVar != null) { result++; - if (ecsvw != null) + } + if (ecsvw != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -82,18 +85,21 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (resultVar != null) { - if (index == 0) + if (index == 0) { return resultVar; + } index--; } if (ecsvw != null) { - if (index == 0) + if (index == 0) { return ecsvw; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RecoderModelTransformer.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RecoderModelTransformer.java index 0b3e2294804..70f29df86ba 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RecoderModelTransformer.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/RecoderModelTransformer.java @@ -336,8 +336,8 @@ public void visitVariableReference(VariableReference vr) { } private static class TypeAndClassDeclarationCollector extends SourceVisitorExtended { - private Set result = new LinkedHashSet<>(); - private Set types = new LinkedHashSet<>(); + private final Set result = new LinkedHashSet<>(); + private final Set types = new LinkedHashSet<>(); public TypeAndClassDeclarationCollector() { super(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/SchemaJavaProgramFactory.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/SchemaJavaProgramFactory.java index 8091e5f2ef4..74fd74409f4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/SchemaJavaProgramFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/SchemaJavaProgramFactory.java @@ -43,7 +43,7 @@ protected SchemaJavaProgramFactory() {} /** * The singleton instance of the program factory. */ - private static SchemaJavaProgramFactory theFactory = new SchemaJavaProgramFactory(); + private static final SchemaJavaProgramFactory theFactory = new SchemaJavaProgramFactory(); /** * Returns the single instance of this class. @@ -135,8 +135,9 @@ public static void throwSortInvalid(SchemaVariable sv, String s) throws ParseExc public boolean lookupSchemaVariableType(String s, ProgramSVSort sort) { - if (svns == null) + if (svns == null) { return false; + } Named n = svns.lookup(new Name(s)); if (n != null && n instanceof SchemaVariable) { return ((SchemaVariable) n).sort() == sort; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/TransactionStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/TransactionStatement.java index aa8e32cbbfe..7cc0e1a1095 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/TransactionStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/TransactionStatement.java @@ -13,7 +13,7 @@ public class TransactionStatement extends JavaStatement { public static final int FINISH = 3; public static final int ABORT = 4; - private int type; + private final int type; public TransactionStatement(int type) { super(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/URLDataLocation.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/URLDataLocation.java index feeef95c5f7..3745d9e48f0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/URLDataLocation.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/URLDataLocation.java @@ -19,7 +19,7 @@ */ public class URLDataLocation implements DataLocation { - private URL url; + private final URL url; public static final String LOCATION_TYPE_FILE = "URL"; diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/adt/MethodSignature.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/adt/MethodSignature.java index 5210c5e0e2f..1386044c6bb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/adt/MethodSignature.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/adt/MethodSignature.java @@ -12,8 +12,8 @@ public class MethodSignature extends JavaNonTerminalProgramElement { private static final long serialVersionUID = 6966957683489654730L; - private Identifier methodName; - private ASTList paramTypes; + private final Identifier methodName; + private final ASTList paramTypes; public MethodSignature(Identifier methodName, ASTList paramTypes) { super(); @@ -23,8 +23,9 @@ public MethodSignature(Identifier methodName, ASTList paramTypes) @Override public ProgramElement getChildAt(int i) { - if (i == 0) + if (i == 0) { return methodName; + } i--; if (i >= 0 && i < paramTypes.size()) { return paramTypes.get(i); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/expression/literal/RealLiteral.java b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/expression/literal/RealLiteral.java index b1d2bed57a4..a7589f28023 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/expression/literal/RealLiteral.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/recoderext/expression/literal/RealLiteral.java @@ -1,15 +1,14 @@ package de.uka.ilkd.key.java.recoderext.expression.literal; -import java.math.BigDecimal; - +import de.uka.ilkd.key.java.recoderext.KeYRecoderExtension; import org.key_project.util.ExtList; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import recoder.java.Expression; import recoder.java.SourceVisitor; import recoder.java.expression.Literal; -import de.uka.ilkd.key.java.recoderext.KeYRecoderExtension; + +import java.math.BigDecimal; /** * Literal for JML \real type; @@ -68,10 +67,11 @@ public String toString() { } public boolean equals(Object o) { - if (o instanceof RealLiteral) + if (o instanceof RealLiteral) { return value.equals(((RealLiteral) o).getValue()); - else + } else { return false; + } } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayLengthReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayLengthReference.java index 8be88718700..ee6977a16e2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayLengthReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayLengthReference.java @@ -57,8 +57,9 @@ public int getChildCount() { * @exception ArrayIndexOutOfBoundsException if index is out of bounds */ public ProgramElement getChildAt(int index) { - if (prefix != null && index == 0) + if (prefix != null && index == 0) { return prefix; + } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayReference.java index 29c8f61c0ca..28324e73eee 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ArrayReference.java @@ -106,10 +106,12 @@ private ArrayReference(Expression[] e, ReferencePrefix accessPath) { */ public int getExpressionCount() { int c = 0; - if (prefix instanceof Expression) + if (prefix instanceof Expression) { c += 1; - if (inits != null) + } + if (inits != null) { c += inits.size(); + } return c; } @@ -125,8 +127,9 @@ public int getExpressionCount() { public Expression getExpressionAt(int index) { if (prefix instanceof Expression) { - if (index == 0) + if (index == 0) { return (Expression) prefix; + } index--; } if (inits != null) { @@ -179,10 +182,12 @@ public ReferencePrefix getReferencePrefix() { */ public int getChildCount() { int result = 0; - if (prefix != null) + if (prefix != null) { result++; - if (inits != null) + } + if (inits != null) { result += inits.size(); + } return result; } @@ -195,8 +200,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } index--; } if (inits != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ExecutionContext.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ExecutionContext.java index 7d80b7be46f..205e76e7b7b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ExecutionContext.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ExecutionContext.java @@ -23,7 +23,7 @@ public class ExecutionContext extends JavaNonTerminalProgramElement /** * the currently active method */ - private IProgramMethod methodContext; + private final IProgramMethod methodContext; /** * creates an execution context reference @@ -61,12 +61,15 @@ public ExecutionContext(ExtList children) { @Override public int getChildCount() { int count = 0; - if (classContext != null) + if (classContext != null) { count++; - if (methodContext != null) + } + if (methodContext != null) { count++; - if (runtimeInstance != null) + } + if (runtimeInstance != null) { count++; + } return count; } @@ -80,18 +83,21 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (classContext != null) { - if (index == 0) + if (index == 0) { return classContext; + } index--; } if (methodContext != null) { - if (index == 0) + if (index == 0) { return methodContext; + } index--; } if (runtimeInstance != null) { - if (index == 0) + if (index == 0) { return runtimeInstance; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/FieldReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/FieldReference.java index a86240319f8..eb10427c079 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/FieldReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/FieldReference.java @@ -52,10 +52,12 @@ public FieldReference(ProgramVariable pv, ReferencePrefix prefix, PositionInfo p */ public int getChildCount() { int result = 0; - if (prefix != null) + if (prefix != null) { result++; - if (variable != null) + } + if (variable != null) { result++; + } return result; } @@ -68,13 +70,15 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } index--; } if (variable != null) { - if (index == 0) + if (index == 0) { return variable; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/IExecutionContext.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/IExecutionContext.java index a8ae1131b5b..7fbb1145fa1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/IExecutionContext.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/IExecutionContext.java @@ -12,19 +12,19 @@ public interface IExecutionContext extends Reference { * * @return the type reference to the next enclosing class */ - public TypeReference getTypeReference(); + TypeReference getTypeReference(); /** * returns the program method which is currently active * * @return the currently active method */ - public IProgramMethod getMethodContext(); + IProgramMethod getMethodContext(); /** * returns the runtime instance object * * @return the runtime instance object */ - public ReferencePrefix getRuntimeInstance(); + ReferencePrefix getRuntimeInstance(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java index ea5e9dcc86f..32fbf226f2b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MetaClassReference.java @@ -63,8 +63,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (typeReference != null) { - if (index == 0) + if (index == 0) { return typeReference; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java index 4963bef3e37..3ca198cc7c4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/MethodReference.java @@ -80,8 +80,9 @@ public MethodReference(ExtList children, MethodName n, ReferencePrefix p, Positi protected void checkArguments() { ImmutableArray args = getArguments(); for (Expression arg : args) { - if (arg == null) + if (arg == null) { throw new NullPointerException(); + } } } @@ -114,12 +115,15 @@ public ReferencePrefix getReferencePrefix() { public int getChildCount() { int result = 0; - if (prefix != null) + if (prefix != null) { result++; - if (name != null) + } + if (name != null) { result++; - if (arguments != null) + } + if (arguments != null) { result += arguments.size(); + } return result; } @@ -132,13 +136,15 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } index--; } if (name != null) { - if (index == 0) + if (index == 0) { return name; + } index--; } if (arguments != null) { @@ -183,8 +189,9 @@ public TypeReference getTypeReferenceAt(int index) { */ public int getExpressionCount() { int result = 0; - if (prefix instanceof Expression) + if (prefix instanceof Expression) { result += 1; + } if (arguments != null) { result += arguments.size(); } @@ -232,8 +239,9 @@ public ProgramElementName getProgramElementName() { return (ProgramElementName) name; } else if (name instanceof SchemaVariable) { return (((ProgramSV) name).getProgramElementName()); - } else + } else { return null; + } } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/PackageReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/PackageReference.java index b96901d4f25..c4fd69ccc19 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/PackageReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/PackageReference.java @@ -61,10 +61,12 @@ public SourceElement getFirstElementIncludingBlocks() { */ public int getChildCount() { int result = 0; - if (prefix != null) + if (prefix != null) { result++; - if (name != null) + } + if (name != null) { result++; + } return result; } @@ -77,13 +79,15 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } index--; } if (name != null) { - if (index == 0) + if (index == 0) { return name; + } } throw new ArrayIndexOutOfBoundsException(); } @@ -150,6 +154,6 @@ public boolean equals(Object o) { public String toString() { - return (prefix != null ? prefix.toString() + "." : "") + getName(); + return (prefix != null ? prefix + "." : "") + getName(); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchematicFieldReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchematicFieldReference.java index 1b076340b91..022f716bc18 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchematicFieldReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/SchematicFieldReference.java @@ -41,10 +41,12 @@ public SchematicFieldReference(ExtList children, ReferencePrefix prefix) { */ public int getChildCount() { int result = 0; - if (prefix != null) + if (prefix != null) { result++; - if (schemaVariable != null) + } + if (schemaVariable != null) { result++; + } return result; } @@ -57,13 +59,15 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } index--; } if (schemaVariable != null) { - if (index == 0) + if (index == 0) { return (ProgramSV) schemaVariable; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/SuperReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/SuperReference.java index 6b206324176..fa68e2de9fc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/SuperReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/SuperReference.java @@ -71,8 +71,9 @@ public ReferencePrefix getReferencePrefix() { */ public int getChildCount() { int count = 0; - if (prefix != null) + if (prefix != null) { count++; + } return count; } @@ -85,8 +86,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ThisReference.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ThisReference.java index 7c65174dfdb..2a8cf4cae70 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/ThisReference.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/ThisReference.java @@ -64,8 +64,9 @@ public SourceElement getFirstElementIncludingBlocks() { */ public int getChildCount() { int count = 0; - if (prefix != null) + if (prefix != null) { count++; + } return count; } @@ -78,8 +79,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/reference/TypeReferenceImp.java b/key.core/src/main/java/de/uka/ilkd/key/java/reference/TypeReferenceImp.java index f0fe336cf7f..4811e05cecc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/reference/TypeReferenceImp.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/reference/TypeReferenceImp.java @@ -78,10 +78,12 @@ public SourceElement getFirstElementIncludingBlocks() { */ public int getChildCount() { int result = 0; - if (prefix != null) + if (prefix != null) { result++; - if (name != null) + } + if (name != null) { result++; + } return result; } @@ -94,13 +96,15 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (prefix != null) { - if (index == 0) + if (index == 0) { return prefix; + } index--; } if (name != null) { - if (index == 0) + if (index == 0) { return name; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Assert.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Assert.java index 69ce9f1fc8c..e0ce54bdd34 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Assert.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Assert.java @@ -6,8 +6,8 @@ public class Assert extends JavaStatement implements ExpressionContainer { - private Expression condition; - private Expression message; + private final Expression condition; + private final Expression message; public Assert(Expression condition, Expression message, PositionInfo pos) { super(pos); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Case.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Case.java index a7d1bb1150c..98d3429877c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Case.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Case.java @@ -74,10 +74,12 @@ public Case(ExtList children, Expression expr, PositionInfo pos) { */ public int getChildCount() { int result = 0; - if (expression != null) + if (expression != null) { result++; - if (body != null) + } + if (body != null) { result += body.size(); + } return result; } @@ -91,8 +93,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { int len; if (expression != null) { - if (index == 0) + if (index == 0) { return expression; + } index--; } if (body != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Catch.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Catch.java index 52f4ce9387b..f78bf3553a5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Catch.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Catch.java @@ -68,10 +68,12 @@ public SourceElement getLastElement() { */ public int getChildCount() { int result = 0; - if (parameter != null) + if (parameter != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -84,13 +86,15 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (parameter != null) { - if (index == 0) + if (index == 0) { return parameter; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/CatchAllStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/CatchAllStatement.java index 05d8463151b..2cdee8ef280 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/CatchAllStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/CatchAllStatement.java @@ -9,8 +9,8 @@ public class CatchAllStatement extends JavaNonTerminalProgramElement implements Statement, NonTerminalProgramElement, StatementContainer { - private StatementBlock body; - private LocationVariable param; + private final StatementBlock body; + private final LocationVariable param; public CatchAllStatement(StatementBlock body, LocationVariable param) { this.body = body; @@ -42,10 +42,12 @@ public LocationVariable getParam() { */ public int getChildCount() { int i = 0; - if (body != null) + if (body != null) { i++; - if (param != null) + } + if (param != null) { i++; + } return i; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Ccatch.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Ccatch.java index c16047b2c9b..ccedcd30c45 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Ccatch.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Ccatch.java @@ -96,12 +96,15 @@ public boolean hasNonStdParameterDeclaration() { @Override public int getChildCount() { int result = 0; - if (hasParameterDeclaration()) + if (hasParameterDeclaration()) { result++; - if (hasNonStdParameterDeclaration()) + } + if (hasNonStdParameterDeclaration()) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -115,18 +118,21 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (hasParameterDeclaration()) { - if (index == 0) + if (index == 0) { return parameter.get(); + } index--; } if (hasNonStdParameterDeclaration()) { - if (index == 0) + if (index == 0) { return nonStdParameter.get(); + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Default.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Default.java index 9204ecfe6ed..e19a558c3a2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Default.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Default.java @@ -52,8 +52,9 @@ public Default(ExtList children) { */ public int getChildCount() { int result = 0; - if (body != null) + if (body != null) { result += body.size(); + } return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Else.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Else.java index e5becde11ba..2a838daea93 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Else.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Else.java @@ -63,8 +63,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (body != null) { - if (index == 0) + if (index == 0) { return body; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Exec.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Exec.java index 93ec13afd9e..e6f309d3e63 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Exec.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Exec.java @@ -138,10 +138,12 @@ public SourceElement getLastElement() { @Override public int getChildCount() { int result = 0; - if (body != null) + if (body != null) { result++; - if (branches != null) + } + if (branches != null) { result += branches.size(); + } return result; } @@ -155,8 +157,9 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } if (branches != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/ExpressionJumpStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/ExpressionJumpStatement.java index b4819a60b9f..6f885832293 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/ExpressionJumpStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/ExpressionJumpStatement.java @@ -95,8 +95,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (expression != null) { - if (index == 0) + if (index == 0) { return expression; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Finally.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Finally.java index 11b70e281ae..e8a823d5316 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Finally.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Finally.java @@ -50,8 +50,9 @@ public Finally(ExtList children) { */ public int getChildCount() { int result = 0; - if (body != null) + if (body != null) { result++; + } return result; } @@ -64,8 +65,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (body != null) { - if (index == 0) + if (index == 0) { return body; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Guard.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Guard.java index f50c66418e4..3b6b619919f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Guard.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Guard.java @@ -36,8 +36,9 @@ public int getChildCount() { } public ProgramElement getChildAt(int index) { - if (index == 0) + if (index == 0) { return expr; + } return null; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/If.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/If.java index b1c586f2dff..c5daaa1b918 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/If.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/If.java @@ -109,18 +109,21 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (expression != null) { - if (index == 0) + if (index == 0) { return expression; + } index--; } if (thenBranch != null) { - if (index == 0) + if (index == 0) { return thenBranch; + } index--; } if (elseBranch != null) { - if (index == 0) + if (index == 0) { return elseBranch; + } } throw new ArrayIndexOutOfBoundsException(); } @@ -185,8 +188,9 @@ public Else getElse() { */ public int getBranchCount() { int result = 1; - if (elseBranch != null) + if (elseBranch != null) { result += 1; + } return result; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/JmlAssert.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/JmlAssert.java index 30d8384bd2f..6978a0c0c17 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/JmlAssert.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/JmlAssert.java @@ -45,7 +45,7 @@ public class JmlAssert extends JavaStatement { /** * services (needed for pretty printing) */ - private Services services; + private final Services services; /** * diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabelJumpStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabelJumpStatement.java index c8e3f2e8cec..1602b8c4d57 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabelJumpStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabelJumpStatement.java @@ -103,8 +103,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (name != null) { - if (index == 0) + if (index == 0) { return name; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabeledStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabeledStatement.java index 3727de09fea..919e0274921 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabeledStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LabeledStatement.java @@ -209,10 +209,12 @@ public Statement getBody() { public int getChildCount() { int result = 0; - if (name != null) + if (name != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -226,13 +228,15 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (name != null) { - if (index == 0) + if (index == 0) { return name; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopScopeBlock.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopScopeBlock.java index bd3760ced11..2e7a7e28aed 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopScopeBlock.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopScopeBlock.java @@ -147,10 +147,12 @@ public IProgramVariable getIndexPV() { @Override public int getChildCount() { int result = 0; - if (indexPV != null) + if (indexPV != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -164,13 +166,15 @@ public int getChildCount() { @Override public ProgramElement getChildAt(int index) { if (indexPV != null) { - if (index == 0) + if (index == 0) { return indexPV; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopStatement.java index e550a4ef635..bffce37d0a1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/LoopStatement.java @@ -216,14 +216,18 @@ static private ExtList add(ExtList e, Object o) { */ public int getChildCount() { int result = 0; - if (inits != null) + if (inits != null) { result++; - if (guard != null) + } + if (guard != null) { result++; - if (updates != null) + } + if (updates != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -243,8 +247,9 @@ public ProgramElement getChildAt(int index) { } if (isCheckedBeforeIteration()) { if (guard != null) { - if (index == 0) + if (index == 0) { return guard; + } index--; } } @@ -255,14 +260,16 @@ public ProgramElement getChildAt(int index) { index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } if (!isCheckedBeforeIteration()) { if (guard != null) { - if (index == 0) + if (index == 0) { return guard; + } index--; } } @@ -276,8 +283,9 @@ public ProgramElement getChildAt(int index) { */ public int getExpressionCount() { int result = 0; - if (guard != null) + if (guard != null) { result += 1; + } if (inits != null) { result += 1; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/MergePointStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/MergePointStatement.java index 169ab22892a..4fc6a3221c5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/MergePointStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/MergePointStatement.java @@ -80,8 +80,9 @@ public Expression getExpression() { */ public int getChildCount() { int result = 0; - if (identifier != null) + if (identifier != null) { result++; + } return result; } @@ -94,8 +95,9 @@ public int getChildCount() { */ public ProgramElement getChildAt(int index) { if (identifier != null) { - if (index == 0) + if (index == 0) { return identifier; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodBodyStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodBodyStatement.java index 628094e455f..b1e7525ffb7 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodBodyStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodBodyStatement.java @@ -158,12 +158,15 @@ public Statement getBody(Services services) { */ public int getChildCount() { int i = 0; - if (bodySource != null) + if (bodySource != null) { i++; - if (resultVar != null) + } + if (resultVar != null) { i++; - if (methodReference != null) + } + if (methodReference != null) { i++; + } return i; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodFrame.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodFrame.java index 24fb25cb371..753976324b5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodFrame.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/MethodFrame.java @@ -183,12 +183,15 @@ public IProgramMethod getProgramMethod() { public int getChildCount() { int result = 0; - if (resultVar != null) + if (resultVar != null) { result++; - if (execContext != null) + } + if (execContext != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -202,18 +205,21 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (resultVar != null) { - if (index == 0) + if (index == 0) { return resultVar; + } index--; } if (execContext != null) { - if (index == 0) + if (index == 0) { return execContext; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } throw new ArrayIndexOutOfBoundsException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Switch.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Switch.java index 370ae8cb11d..66ffa97ce09 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Switch.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Switch.java @@ -79,10 +79,12 @@ public Switch(ExtList children) { public int getChildCount() { int result = 0; - if (expression != null) + if (expression != null) { result++; - if (branches != null) + } + if (branches != null) { result += branches.size(); + } return result; } @@ -96,8 +98,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (expression != null) { - if (index == 0) + if (index == 0) { return expression; + } index--; } if (branches != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/SynchronizedBlock.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/SynchronizedBlock.java index abd836e8d81..62900e65f1f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/SynchronizedBlock.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/SynchronizedBlock.java @@ -181,10 +181,12 @@ public Expression getExpression() { public int getChildCount() { int result = 0; - if (expression != null) + if (expression != null) { result++; - if (body != null) + } + if (body != null) { result++; + } return result; } @@ -198,13 +200,15 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (expression != null) { - if (index == 0) + if (index == 0) { return expression; + } index--; } if (body != null) { - if (index == 0) + if (index == 0) { return body; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Then.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Then.java index 1cc576aa904..7f09b087154 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Then.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Then.java @@ -75,8 +75,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (body != null) { - if (index == 0) + if (index == 0) { return body; + } } throw new ArrayIndexOutOfBoundsException(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/TransactionStatement.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/TransactionStatement.java index d6d4041d186..7f620557c9b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/TransactionStatement.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/TransactionStatement.java @@ -12,7 +12,7 @@ public class TransactionStatement extends JavaStatement { public static final String[] names = { "#beginJavaCardTransaction", "#commitJavaCardTransaction", "#finishJavaCardTransaction", "#abortJavaCardTransaction" }; - private int type; + private final int type; public TransactionStatement(int type) { super(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Try.java b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Try.java index b87a3e75846..7cc3615a6e7 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/statement/Try.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/statement/Try.java @@ -144,10 +144,12 @@ public SourceElement getLastElement() { public int getChildCount() { int result = 0; - if (body != null) + if (body != null) { result++; - if (branches != null) + } + if (branches != null) { result += branches.size(); + } return result; } @@ -161,8 +163,9 @@ public int getChildCount() { public ProgramElement getChildAt(int index) { if (body != null) { - if (index == 0) + if (index == 0) { return body; + } index--; } if (branches != null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/CreatingASTVisitor.java b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/CreatingASTVisitor.java index 2aca8374207..c67542aa02e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/CreatingASTVisitor.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/CreatingASTVisitor.java @@ -964,7 +964,7 @@ ProgramElement createNewElement(ExtList changeList) { @Override public void performActionOnNewArray(NewArray x) { DefaultAction def = new DefaultAction(x) { - NewArray y = (NewArray) pe; + final NewArray y = (NewArray) pe; @Override ProgramElement createNewElement(ExtList children) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/DeclarationProgramVariableCollector.java b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/DeclarationProgramVariableCollector.java index 0cbd328f0a5..18fa9730928 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/DeclarationProgramVariableCollector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/DeclarationProgramVariableCollector.java @@ -23,7 +23,7 @@ */ public class DeclarationProgramVariableCollector extends JavaASTVisitor { - private Set result = new LinkedHashSet(); + private final Set result = new LinkedHashSet(); /** creates a new declaration visitor */ diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java index 98e6cd45d7d..c11a9be5d8e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/JavaASTCollector.java @@ -13,7 +13,7 @@ public class JavaASTCollector extends JavaASTWalker { /** the type of nodes to be collected */ - private Class type; + private final Class type; /** the list of found elements */ private ImmutableList resultList = ImmutableSLList.nil(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/LabelCollector.java b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/LabelCollector.java index f9b0a79ecd9..fa968de79ec 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/java/visitor/LabelCollector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/java/visitor/LabelCollector.java @@ -13,7 +13,7 @@ */ public class LabelCollector extends JavaASTVisitor { - private HashSet