Skip to content

Commit

Permalink
[Pexplicit] Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-goel committed Apr 25, 2024
1 parent e21ae0f commit 4b0867f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class PExplicitOptions {
Option strategy =
Option.builder("st")
.longOpt("strategy")
.desc("Exploration strategy: dfs, random, astar (default: dfs)")
.desc("Exploration strategy: dfs, random, astar (default: random)")
.numberOfArgs(1)
.hasArg()
.argName("Strategy (string)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ public static void logNewTasks(List<SearchTask> tasks) {
}
}

public static void logNextTask(SearchTask task) {
if (verbosity > 1) {
log.info(String.format(" Next task is %s", task.toStringDetailed()));
}
}

/**
* Log at the start of an iteration
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ public void run() throws TimeoutException {
// set the next task
SearchTask nextTask = setNextTask();
assert (nextTask != null);
PExplicitLogger.logNextTask(nextTask);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private boolean isValidTaskId(int id) {
return (id < allTasks.size());
}

private SearchTask getTask(int id) {
protected SearchTask getTask(int id) {
assert (isValidTaskId(id));
return allTasks.get(id);
}
Expand All @@ -81,7 +81,6 @@ public SearchTask setNextTask() {
}

SearchTask nextTask = popNextTask();
assert (!nextTask.isInitialTask());
setCurrTask(nextTask);

return nextTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ public SearchStrategyDfs() {
}

public void addNewTask(SearchTask task) {
assert (pendingTasks.isEmpty());
}

public SearchTask popNextTask() {
throw new RuntimeException("Cannot pop the next task in dfs strategy since there should be just a single task");
assert (pendingTasks.size() == 1);
return getTask(pendingTasks.iterator().next());
}
}

0 comments on commit 4b0867f

Please sign in to comment.