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

Constant variable substitution, loop unroll pass + dpor code cleanup #202

Merged
merged 9 commits into from
Sep 10, 2023

Conversation

csanadtelbisz
Copy link
Contributor

The somewhat messy code used for the TSE article is cleaned up and contributed in this pull request.

# Conflicts:
#	subprojects/xcfa/xcfa-cli/src/main/java/hu/bme/mit/theta/xcfa/cli/XcfaCli.kt
# Conflicts:
#	subprojects/xcfa/xcfa-analysis/src/main/java/hu/bme/mit/theta/xcfa/analysis/por/XcfaDporLts.kt
Copy link
Contributor

@leventeBajczi leventeBajczi left a comment

Choose a reason for hiding this comment

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

Nice work, thanks for the cleanup! There's one minor question (see comment on the file), but otherwise, I think these changes are mergeable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this change necessary? How come this used to be so complicated, and now an ID equivalence is enough?

Copy link
Contributor Author

@csanadtelbisz csanadtelbisz Sep 10, 2023

Choose a reason for hiding this comment

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

Well, I have no idea why this was so complicated beforehand. I can see no reason for the ID equivalence check being an incorrect way of determining the equivalence of ArgNodes as long as IDs are unique (if we compare ArgNodes from different ARGs, it may be wrong; though I do not see such a use case). On the other hand, the former complicated way resulted in a depth-first ARG search from the given ArgNode (cf. line 284 in the old version comparing outEdges and line 33 comparing the targets of ArgEdges).
(We had a conversation about this issue on the 15th of June; also with @AdamZsofi).

Copy link
Contributor Author

@csanadtelbisz csanadtelbisz Sep 10, 2023

Choose a reason for hiding this comment

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

Based on git blame, you are the author of the original equivalence check, so you may have the reasons for implementing equivalence check this way.
e9defab (fixed link)

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, I've made these changes in e9defab. The reason for them was that even if you fully re-build an ARG from a model a second time, due to mismatched IDs, the two ARG's comparison would fail. I think that with this simplified version, the problem would reappear, and we'd have some problems with ARG comparisons, e.g., in the progress check of @AdamZsofi. Of course we can mitigate it some other way, I don't think it's acceptable that a DFS search should run at every ArgNode comparison.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move this topic to our next in-person meeting. I think we will need to come up with a solution that neither breaks existing functionality nor does it place such a burden on performance.

Copy link
Contributor

Choose a reason for hiding this comment

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

(also, @AdamZsofi: some tests would be nice, so that similar changes are reflected in the CT pipeline's success!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I omit this change from this PR but I have created the issue #203 about ArgNode comparison.

@leventeBajczi
Copy link
Contributor

Also, feel free to merge the PR without waiting for all the tests - this PR does not target master, so we can merge it and fix it in #198.

@csanadtelbisz csanadtelbisz merged commit df97782 into ftsrg:xcfa-refactor Sep 10, 2023
13 of 24 checks passed
@leventeBajczi leventeBajczi mentioned this pull request Sep 10, 2023
11 tasks
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