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

Fixing problem with printing traces where reduction was disabled. #157

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

srba
Copy link
Member

@srba srba commented Nov 21, 2023

Partially fixes the problem where CTL trace generator with disabled structural reductions didn't return the tokens in the trace, e.g. the bug report: https://bugs.launchpad.net/tapaal/+bug/2037313

@@ -214,6 +214,8 @@ namespace PetriEngine {
transitions.push(p.second);
}

auto reducer = builder->getReducer();

Copy link
Member

Choose a reason for hiding this comment

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

You probably want to avoid shadowing the member; introduce a new variable.

Also I think

reducer = reducer ? reducer : builder->getReducer();

Would be more sound; the reducer might already be set, and you may actually unset it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the definition as suggested, but it should not make any change, as the reduced is set to builder if called.

@srba srba requested a review from petergjoel November 21, 2023 15:41
@srba srba merged commit a9e15da into main Nov 21, 2023
3 checks passed
@srba srba deleted the fix-trace-printing-no-tokens branch November 21, 2023 20:21
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