Skip to content

Commit 68c7a1f

Browse files
committed
Merge branch 'master' into actions
2 parents 7ac1e57 + 85b086c commit 68c7a1f

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

electrum/src/main/java/edu/mit/csail/sdg/alloy4/WorkerEngine.java

-3
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,11 @@ public static void stop() {
104104
try {
105105
Field f = latest_sub.getClass().getDeclaredField("pid");
106106
f.setAccessible(true);
107-
System.out.println("Process ID : " + f.get(latest_sub));
108107
Runtime.getRuntime().exec("kill -SIGTERM "+f.get(latest_sub));
109-
110108
} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException | IOException e) {
111109
// TODO Auto-generated catch block
112110
e.printStackTrace();
113111
}
114-
115112
// latest_sub.destroy();
116113
}} finally { latest_manager=null; latest_sub=null; }
117114
}

electrum/src/main/java/edu/mit/csail/sdg/alloy4whole/PreferencesDialog.java

+9-5
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ private static boolean isSat(String output) {
226226
private static boolean loadLibrary(String library) {
227227
boolean loaded = _loadLibrary(library);
228228
String libName = System.mapLibraryName(library);
229-
if (loaded) System.out.println("Loaded: " + libName);
230-
else System.out.println("Failed to load: " + libName);
229+
if ("yes".equals(System.getProperty("debug"))) // [HASLab]
230+
if (loaded) System.out.println("Loaded: " + libName);
231+
else System.out.println("Failed to load: " + libName);
231232
return loaded;
232233
}
233234

@@ -238,20 +239,23 @@ private static boolean staticLibrary(String name) {
238239
for(int i = dirs.length-1; i >= 0; i--) {
239240
final File file = new File(dirs[i]+File.separator+name);
240241
if (file.canExecute()) {
241-
System.out.println("Loaded: " + name);
242+
if ("yes".equals(System.getProperty("debug")))
243+
System.out.println("Loaded: " + name);
242244
return true;
243245
}
244246
}
245247
// check if in system path
246248
for (String str : (System.getenv("PATH")+":/usr/local/bin").split(Pattern.quote(File.pathSeparator))) {
247249
Path pth = Paths.get(str);
248250
if (Files.exists(pth.resolve(name))) {
249-
System.out.println("Loaded: " + name);
251+
if ("yes".equals(System.getProperty("debug")))
252+
System.out.println("Loaded: " + name);
250253
return true;
251254
}
252255
}
253256

254-
System.out.println("Failed to load: " + name);
257+
if ("yes".equals(System.getProperty("debug")))
258+
System.out.println("Failed to load: " + name);
255259
return false;
256260
}
257261

pardinus

0 commit comments

Comments
 (0)