Package org.mpi_sws.jmc.strategies.trust
Class LocationStore
java.lang.Object
org.mpi_sws.jmc.strategies.trust.LocationStore
A single class to store references to locations and to keep track of location aliases.
Location objects are shared objects used in the program. Whenever a new iteration of the model checker runs, we will replace the Location object associated with the old hashcode with the new one and add an alias that points the new hash code to the old one.
LocationStore is accessed when events are accessed.
The lifetime of a location store is that of the algorithm.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an alias between the two location codes.voidaddLocation(Integer location) Add a location to the store.voidclear()Remove all locations from the store.voidRemove all aliases from the store.booleanReturns if a location is contained in the store.booleancontainsAlias(Integer hashCode) Returns if an alias is contained in the store.Returns the location alias for the given hash code.
-
Field Details
-
ThreadLocation
-
-
Constructor Details
-
LocationStore
public LocationStore()Constructs a new location store.
-
-
Method Details
-
addLocation
Add a location to the store. -
clear
public void clear()Remove all locations from the store. -
clearAliases
public void clearAliases()Remove all aliases from the store. -
contains
Returns if a location is contained in the store. -
containsAlias
Returns if an alias is contained in the store. -
addAlias
Adds an alias between the two location codes. -
getAlias
Returns the location alias for the given hash code.
-