Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset Net's performRestriction() weirdness #637

Open
nxsaken opened this issue Mar 19, 2021 · 1 comment
Open

Reset Net's performRestriction() weirdness #637

nxsaken opened this issue Mar 19, 2021 · 1 comment

Comments

@nxsaken
Copy link

nxsaken commented Mar 19, 2021

Hi,

I'm trying to understand the reset net technique's implementation to compute the enablement of an OR-join. I've noticed that in E2WFOJNet's performRestriction() method, there is a check whether a restricted transition is a cancel transition. If it's true, restricted places are removed from the transition's remove set. However, the new remove set is not used after that. Is it supposed to be like that?

if (t.isCancelTransition()) {
  Set removeSet = new HashSet(t.getRemoveSet());
  removeSet.retainAll(restrictedPlaces);
} // removeSet unused
@adamsmj
Copy link
Collaborator

adamsmj commented Mar 22, 2021

You have definitely found a bug. I contacted the original author of that code, but she can't remember anything about the logic flow, so we have to do a best guess based on context. It looks to me like what is supposed to happen there is the removal of any unrestricted places from the transition's cancel set. That is:

if (t.isCancelTransition()) {
  t.getRemoveSet().retainAll(restrictedPlaces);  // getRemoveSet() guaranteed not null
} 

So, that's how it is now in the repo.

I'll leave this open for a while for observation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants