diff --git a/src/main/java/de/tlc4b/TLC4B.java b/src/main/java/de/tlc4b/TLC4B.java index e98d0e21268107c0e19feae7877070fd3c72ea4d..45d56b841f849b552bf35f54859546760d1851a6 100644 --- a/src/main/java/de/tlc4b/TLC4B.java +++ b/src/main/java/de/tlc4b/TLC4B.java @@ -15,11 +15,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import de.be4.classicalb.core.parser.exceptions.BCompoundException; import de.tlc4b.exceptions.TLC4BException; @@ -117,34 +112,6 @@ public class TLC4B { // tlc4B.createFiles() is intentionally not called here! } - /** - * Quickly check whether TLC4B is applicable to the provided machine. - * - * @param path path to B machine file - * @param timeOut time out in seconds - * @return Exception if TLC4B is not applicable, else null (also if unknown) - * @deprecated This method creates an executor that is never shut down. - * Use {@link #checkTLC4BIsApplicable(String)} instead and implement the timeout logic yourself as appropriate for your application. - */ - @Deprecated - public static Exception checkTLC4BIsApplicable(final String path, int timeOut) { - Future<Exception> future = Executors.newSingleThreadExecutor().submit(() -> { - try { - checkTLC4BIsApplicable(path); - return null; - } catch (BCompoundException | TLC4BException e) { - return e; - } - }); - - try { - return future.get(timeOut, TimeUnit.SECONDS); - } catch (TimeoutException | InterruptedException | ExecutionException e) { - future.cancel(true); - return null; // unknown if TLC4B is applicable, exceptions can be ignored - } - } - private void printResults(TLCResults results) throws IOException { printOperationsCount(results); // options