Skip to content

Delete unused code / minor refactor to reduce IDE warnings#1005

Merged
hernanponcedeleon merged 2 commits intodevelopmentfrom
deleteUnusedCode
Mar 10, 2026
Merged

Delete unused code / minor refactor to reduce IDE warnings#1005
hernanponcedeleon merged 2 commits intodevelopmentfrom
deleteUnusedCode

Conversation

@ThomasHaas
Copy link
Collaborator

@ThomasHaas ThomasHaas commented Mar 9, 2026

There are no functional changes in this PR.

EDIT: Okay, there is one bug fix that I accidentally committed as well. It's a single line of code added in cutting:

   ... || def instanceof Free;

Reformat code (reduce IDE warnings)
Comment on lines +15 to +18
import com.dat3m.dartagnan.program.event.arch.ptx.*;
import com.dat3m.dartagnan.program.event.arch.ptx.PTXAtomCAS;
import com.dat3m.dartagnan.program.event.arch.ptx.PTXAtomExch;
import com.dat3m.dartagnan.program.event.arch.ptx.PTXAtomOp;
import com.dat3m.dartagnan.program.event.arch.ptx.PTXRedOp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this (I do not even understand why your IDE goes from explicit to * in other parts and from * to explicit here).

There are other files where this gets expanded, revert those too

Copy link
Collaborator Author

@ThomasHaas ThomasHaas Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a rule-of-thumb of when we want to use explicit imports? Would you already want to use .* for just two imports?

EDIT: It seems my IDE collapses import to .* when 5 classes get imported from the same package.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the whole package only contains two imports (my comment "There are other files ..." refers to svcomp package which only has two classes), then I would say yes.

As a rule-of-thumbs I would say: "do not import e.g., the whole java.utils unnecessarily, but if the package just contains a few classes (this would cover e.g., all our event and expressions packages) go for *"

// GPUs
|| def instanceof SameScope || def instanceof SyncWith
|| def instanceof SyncFence || def instanceof SyncBar || def instanceof SameVirtualLocation
|| def instanceof Free;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now it kind of looks like this is related to GPUs. I would move it together with AMOPairs and SameInstruction

@hernanponcedeleon hernanponcedeleon merged commit fb95b14 into development Mar 10, 2026
7 checks passed
@hernanponcedeleon hernanponcedeleon deleted the deleteUnusedCode branch March 10, 2026 10:39
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

Successfully merging this pull request may close these issues.

2 participants