From 2e5517271d1ff295cb23dc456f50e8bbea044066 Mon Sep 17 00:00:00 2001 From: Fedor Isakov Date: Thu, 13 Jun 2024 11:02:34 +0200 Subject: [PATCH] Drop deprecated code marked for removal --- .../core/internal/ConstraintsProcessing.kt | 1 - .../reactor/core/internal/ControllerImpl.kt | 1 - .../core/internal/EvaluationSessionImpl.kt | 4 - .../reactor/evaluation/EvaluationSession.java | 4 - ...IncrementalContractViolationException.java | 29 ------ .../reactor/program/IncrementalSpec.java | 97 ------------------- reactor/Test/test/TestStoreAwareJournal.kt | 1 - 7 files changed, 137 deletions(-) delete mode 100644 reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalContractViolationException.java delete mode 100644 reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalSpec.java diff --git a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt index 50db3dd7..68ce3550 100644 --- a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt +++ b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ConstraintsProcessing.kt @@ -18,7 +18,6 @@ package jetbrains.mps.logic.reactor.core.internal import jetbrains.mps.logic.reactor.core.* import jetbrains.mps.logic.reactor.evaluation.EvaluationTrace -import jetbrains.mps.logic.reactor.program.IncrementalSpec import jetbrains.mps.logic.reactor.logical.LogicalContext import jetbrains.mps.logic.reactor.program.Constraint import jetbrains.mps.logic.reactor.program.Rule diff --git a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ControllerImpl.kt b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ControllerImpl.kt index 5a0c1959..52527605 100644 --- a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ControllerImpl.kt +++ b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/ControllerImpl.kt @@ -23,7 +23,6 @@ import jetbrains.mps.logic.reactor.logical.Logical import jetbrains.mps.logic.reactor.logical.LogicalContext import jetbrains.mps.logic.reactor.logical.MetaLogical import jetbrains.mps.logic.reactor.program.Constraint -import jetbrains.mps.logic.reactor.program.IncrementalSpec import jetbrains.mps.logic.reactor.program.Predicate import jetbrains.mps.logic.reactor.program.Rule import jetbrains.mps.logic.reactor.util.Profiler diff --git a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/EvaluationSessionImpl.kt b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/EvaluationSessionImpl.kt index c68ad7d1..020f8767 100644 --- a/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/EvaluationSessionImpl.kt +++ b/reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/EvaluationSessionImpl.kt @@ -154,10 +154,6 @@ internal class EvaluationSessionImpl private constructor ( return this } - override fun withIncrSpec(ispec: IncrementalSpec): EvaluationSession.Config { - return this - } - override fun withParameter(key: ParameterKey, value: T): EvaluationSession.Config { this.parameters.put(key, value as Any) return this diff --git a/reactor/Core/src/jetbrains/mps/logic/reactor/evaluation/EvaluationSession.java b/reactor/Core/src/jetbrains/mps/logic/reactor/evaluation/EvaluationSession.java index 1a16acfb..d050737d 100644 --- a/reactor/Core/src/jetbrains/mps/logic/reactor/evaluation/EvaluationSession.java +++ b/reactor/Core/src/jetbrains/mps/logic/reactor/evaluation/EvaluationSession.java @@ -17,7 +17,6 @@ package jetbrains.mps.logic.reactor.evaluation; -import jetbrains.mps.logic.reactor.program.IncrementalSpec; import jetbrains.mps.logic.reactor.program.Program; import jetbrains.mps.logic.reactor.util.Profiler; @@ -84,9 +83,6 @@ public abstract class EvaluationSession { public Config withProfiler(Profiler profiler) { return this; } - @Deprecated(forRemoval = true) - public Config withIncrSpec(IncrementalSpec ispec) { return this; } - public abstract EvaluationResult start(Supervisor supervisor); diff --git a/reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalContractViolationException.java b/reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalContractViolationException.java deleted file mode 100644 index 74698cf8..00000000 --- a/reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalContractViolationException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2014-2020 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package jetbrains.mps.logic.reactor.program; - -public class IncrementalContractViolationException extends IllegalStateException { - - public IncrementalContractViolationException(String message) { - super(message); - } - - public IncrementalContractViolationException(String message, Throwable ex) { - super(message, ex); - } - -} diff --git a/reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalSpec.java b/reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalSpec.java deleted file mode 100644 index 1c4b0b70..00000000 --- a/reactor/Core/src/jetbrains/mps/logic/reactor/program/IncrementalSpec.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014-2019 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package jetbrains.mps.logic.reactor.program; - -import org.jetbrains.annotations.NotNull; - -@Deprecated(forRemoval = true) -public interface IncrementalSpec { - - boolean isPrincipal(Constraint ctr); - boolean isPrincipal(Rule rule); - - @Deprecated(forRemoval = true) - default boolean isWeakPrincipal(Rule rule) {return false; } - - @NotNull - @Deprecated(forRemoval = true) - default Enabled ability() { throw new UnsupportedOperationException(); } - @NotNull - @Deprecated(forRemoval = true) - default IncrLevel incrLevel() { throw new UnsupportedOperationException(); } - @NotNull - @Deprecated(forRemoval = true) - default AssertLevel assertLevel() { throw new UnsupportedOperationException(); } - - enum IncrLevel { - Preamble, Full; - - public IncrLevel min(IncrLevel other) { - return this.compareTo(other) <= 0 ? this : other; - } - } - - enum Enabled { - No, Unsafe, Yes; - - public Enabled min(Enabled other) { - return this.compareTo(other) <= 0 ? this : other; - } - - public boolean allowed() { - return this.compareTo(Enabled.No) > 0; - } - - public boolean strict() { - return this.compareTo(Enabled.Yes) >= 0; - } - } - - enum AssertLevel { - Normal, AssertContracts; - - public AssertLevel max(AssertLevel other) { - return this.compareTo(other) >= 0 ? this : other; - } - - public boolean assertContracts() { - return this.compareTo(AssertLevel.AssertContracts) >= 0; - } - } - - class StubSpec implements IncrementalSpec { - @Override - public boolean isPrincipal(Constraint ctr) { return false; } - @Override - public boolean isPrincipal(Rule rule) { return false; } - @Override - public boolean isWeakPrincipal(Rule rule) { return false; } - - @Override - @NotNull - public Enabled ability() { return Enabled.No; } - @NotNull - @Override - public IncrLevel incrLevel() { return IncrLevel.Full; } - @NotNull - @Override - public AssertLevel assertLevel() { return AssertLevel.Normal; } - } - - StubSpec DefaultSpec = new StubSpec(); -} - diff --git a/reactor/Test/test/TestStoreAwareJournal.kt b/reactor/Test/test/TestStoreAwareJournal.kt index a35fd424..089d170c 100644 --- a/reactor/Test/test/TestStoreAwareJournal.kt +++ b/reactor/Test/test/TestStoreAwareJournal.kt @@ -1,7 +1,6 @@ import jetbrains.mps.logic.reactor.core.* import jetbrains.mps.logic.reactor.core.internal.* import jetbrains.mps.logic.reactor.program.Constraint -import jetbrains.mps.logic.reactor.program.IncrementalSpec import jetbrains.mps.logic.reactor.program.Rule import org.junit.Test import org.junit.Assert.*