-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PEx] Correct timelines tracking and RL-based choice selection
- Loading branch information
Showing
16 changed files
with
143 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 12 additions & 5 deletions
17
...PRuntimes/PExplicitRuntime/src/main/java/pexplicit/runtime/machine/MachineLocalState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
package pexplicit.runtime.machine; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.tuple.ImmutablePair; | ||
import pexplicit.values.PEvent; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
/** | ||
* Represents the local state of a machine | ||
*/ | ||
@Getter | ||
public class MachineLocalState implements Serializable { | ||
/** | ||
* List of values of all local variables (including internal variables like currentState, FIFO queue, etc.) | ||
*/ | ||
@Getter | ||
@Setter | ||
private List<Object> locals; | ||
private final List<Object> locals; | ||
private final Set<PEvent> observedEvents; | ||
private final Set<ImmutablePair<PEvent, PEvent>> happensBeforePairs; | ||
private final int timelineHash; | ||
|
||
public MachineLocalState(List<Object> locals) { | ||
public MachineLocalState(List<Object> locals, Set<PEvent> observedEvents, Set<ImmutablePair<PEvent, PEvent>> happensBeforePairs) { | ||
this.locals = locals; | ||
this.observedEvents = observedEvents; | ||
this.happensBeforePairs = happensBeforePairs; | ||
this.timelineHash = happensBeforePairs.hashCode(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.