Skip to content
Snippets Groups Projects
Commit d0fa48a0 authored by dgelessus's avatar dgelessus
Browse files

Remove unused debugging key generation and passing

The debugging key was only used by the debug_console/2 command, which
the Rodin plugin hasn't called in over 10 years and has now been removed
from probcli.
parent f1671dc8
No related branches found
No related tags found
No related merge requests found
Pipeline #103345 passed
...@@ -8,7 +8,6 @@ package de.prob.cli; ...@@ -8,7 +8,6 @@ package de.prob.cli;
import java.io.*; import java.io.*;
import java.net.*; import java.net.*;
import java.security.*;
import java.util.*; import java.util.*;
import org.eclipse.core.filesystem.EFS; import org.eclipse.core.filesystem.EFS;
...@@ -26,7 +25,6 @@ public final class CliStarter { ...@@ -26,7 +25,6 @@ public final class CliStarter {
"ParserAspects.jar", "aspectjrt.jar", "prolog.jar" }; "ParserAspects.jar", "aspectjrt.jar", "prolog.jar" };
private Process prologProcess; private Process prologProcess;
private String debuggingKey;
private int port = -1; private int port = -1;
private Long userInterruptReference = null; private Long userInterruptReference = null;
...@@ -59,10 +57,6 @@ public final class CliStarter { ...@@ -59,10 +57,6 @@ public final class CliStarter {
} }
} }
public String getDebuggingKey() {
return debuggingKey;
}
// Based on org.eventb.core.seqprover.xprover.BundledFileExtractor.BundledFileDescriptor#makeExecutable // Based on org.eventb.core.seqprover.xprover.BundledFileExtractor.BundledFileDescriptor#makeExecutable
// (from rodin-b-sharp/rodincore/org.eventb.core.seqprover) // (from rodin-b-sharp/rodincore/org.eventb.core.seqprover)
private void setExecutable(final File path, final boolean executable) throws CliException { private void setExecutable(final File path, final boolean executable) throws CliException {
...@@ -78,7 +72,6 @@ public final class CliStarter { ...@@ -78,7 +72,6 @@ public final class CliStarter {
private void startProlog(final File file) throws CliException { private void startProlog(final File file) throws CliException {
prologProcess = null; prologProcess = null;
debuggingKey = null;
final String os = Platform.getOS(); final String os = Platform.getOS();
final File applicationPath = getCliPath(); final File applicationPath = getCliPath();
...@@ -110,11 +103,8 @@ public final class CliStarter { ...@@ -110,11 +103,8 @@ public final class CliStarter {
command.add(file.getAbsolutePath()); command.add(file.getAbsolutePath());
} }
createDebuggingKey();
final ProcessBuilder pb = new ProcessBuilder(); final ProcessBuilder pb = new ProcessBuilder();
pb.command(command); pb.command(command);
pb.environment().put("PROB_DEBUGGING_KEY", debuggingKey);
pb.environment().put("TRAILSTKSIZE", "1M"); pb.environment().put("TRAILSTKSIZE", "1M");
pb.environment().put("PROLOGINCSIZE", "50M"); pb.environment().put("PROLOGINCSIZE", "50M");
pb.environment().put("PROB_HOME", osPath); pb.environment().put("PROB_HOME", osPath);
...@@ -213,16 +203,6 @@ public final class CliStarter { ...@@ -213,16 +203,6 @@ public final class CliStarter {
errLogger.start(); errLogger.start();
} }
private void createDebuggingKey() {
Random random;
try {
random = SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException e) {
random = new Random();
}
debuggingKey = Long.toHexString(random.nextLong());
}
private void analyseStdout(final BufferedReader input, private void analyseStdout(final BufferedReader input,
Collection<? extends CliPattern<?>> patterns) throws CliException { Collection<? extends CliPattern<?>> patterns) throws CliException {
patterns = new ArrayList<CliPattern<?>>(patterns); patterns = new ArrayList<CliPattern<?>>(patterns);
......
...@@ -322,10 +322,6 @@ public final class Animator { ...@@ -322,10 +322,6 @@ public final class Animator {
return getImplementation().isMachineLoaded(); return getImplementation().isMachineLoaded();
} }
public String getDebuggingKey() {
return getImplementation().getDebuggingKey();
}
public LanguageDependendAnimationPart getLanguageDependendPart() { public LanguageDependendAnimationPart getLanguageDependendPart() {
return getImplementation().getLangdep(); return getImplementation().getLangdep();
} }
......
...@@ -43,7 +43,5 @@ public interface IServerConnection { ...@@ -43,7 +43,5 @@ public interface IServerConnection {
public abstract void startup(File file) throws CliException; public abstract void startup(File file) throws CliException;
String getDebuggingKey();
void sendUserInterruptSignal(); void sendUserInterruptSignal();
} }
\ No newline at end of file
...@@ -145,10 +145,6 @@ public class AnimatorImpl { ...@@ -145,10 +145,6 @@ public class AnimatorImpl {
return this.description != null; return this.description != null;
} }
public synchronized String getDebuggingKey() {
return connector == null ? null : connector.getDebuggingKey();
}
public void execute(final IComposableCommand command) throws ProBException { public void execute(final IComposableCommand command) throws ProBException {
checkConnector(command.getClass().getName()); checkConnector(command.getClass().getName());
......
...@@ -50,11 +50,6 @@ public class ServerConnection implements IServerConnection { ...@@ -50,11 +50,6 @@ public class ServerConnection implements IServerConnection {
return lastCommand; return lastCommand;
} }
@Override
public String getDebuggingKey() {
return cli == null ? null : cli.getDebuggingKey();
}
private void establishConnection(final int port) throws CliException { private void establishConnection(final int port) throws CliException {
try { try {
socket = new Socket(InetAddress.getByName(null), port); socket = new Socket(InetAddress.getByName(null), port);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment