From 8d6ee90d9005a175b0d80c41748d1809b6b14a14 Mon Sep 17 00:00:00 2001 From: Aman Goel Date: Mon, 6 May 2024 19:16:15 +0000 Subject: [PATCH] [PExplicit] Correct counting unexplored choices --- .../runtime/scheduler/explicit/ExplicitSearchScheduler.java | 2 +- .../runtime/scheduler/explicit/strategy/SearchTask.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/ExplicitSearchScheduler.java b/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/ExplicitSearchScheduler.java index 0ae2b7b80..b037a0e29 100644 --- a/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/ExplicitSearchScheduler.java +++ b/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/ExplicitSearchScheduler.java @@ -444,7 +444,7 @@ private void setChildTask(Choice choice, int choiceNum, SearchTask parentTask, b newTask.addPrefixChoice(schedule.getChoice(i)); } - newTask.addSuffixChoice(choice.transferChoice()); + newTask.addSuffixChoice(choice); if (!isExact) { for (int i = choiceNum + 1; i < schedule.size(); i++) { diff --git a/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/strategy/SearchTask.java b/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/strategy/SearchTask.java index cd1a3d701..14c25960a 100644 --- a/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/strategy/SearchTask.java +++ b/Src/PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/scheduler/explicit/strategy/SearchTask.java @@ -49,13 +49,12 @@ public void addPrefixChoice(Choice choice) { } public void addSuffixChoice(Choice choice) { - // TODO: check if we need copy here - suffixChoices.add(choice.transferChoice()); if (choice instanceof ScheduleChoice scheduleChoice) { numUnexploredScheduleChoices += scheduleChoice.getUnexplored().size(); } else { numUnexploredDataChoices += ((DataChoice) choice).getUnexplored().size(); } + suffixChoices.add(choice.transferChoice()); } public List getAllChoices() {