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

Expose state sorting option in prism.Prism #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisnovakovic
Copy link
Contributor

I should've included this as part of PR #94, but it had been merged by the time I realised I left it out.

PR #94 makes it possible to enable or disable state sorting in an explicit ModelGenerator directly, but the more common way of interacting with a ModelGenerator is indirectly via prism.Prism, which doesn't expose access to the underlying ModelGenerator. This PR creates a new setting PRISM_SORT_STATES that makes it possible to control state sorting via prism.Prism. (The ability to control the value of PRISM_SORT_STATES in turn via the command line is deliberately omitted from this PR, for all the reasons discussed in #94.)

Although it is possible to enable or disable state sorting in an
explicit ModelGenerator directly, it is not possible to do so via the
prism.Prism class, which is the more common way to interact with the
PRISM API. Create a new setting PRISM_SORT_STATES to control this
behaviour in underlying explicit ModelGenerators, and add methods for
controlling its value in prism.Prism.
@kleinj
Copy link
Member

kleinj commented Dec 17, 2018

I think there is not much of a difference between having it as a setting in PrismSettings (exposed via the GUI) or having it on the command-line, as both are user facing.

But I'd really like to get this exposed to the user, as it can lead to significant speed-ups. From the old PR, there was a question whether it makes sense to have other-than-lexicographic ordering for the symbolic engines, and I think there is no easy way to achieve that. So, it's mainly a question for the explicit engine. One option would be just to provide a "sort=yes/no" switch (similar to the one proposed here, in the sense of "ensure that the states are sorted lexicographically"). Other option would be to go with a "sort=lexicographic|dfs|bfs" switch, which gives a bit more extendability (and where some variants would just not apply to the symbolic engines, perhaps resulting in a warning).

chrisnovakovic added a commit to schimp/schimp that referenced this pull request May 8, 2019
Includes one patch for configuring state sorting that isn't currently
merged into PRISM:

prismmodelchecker/prism#102
@davexparker davexparker force-pushed the master branch 2 times, most recently from ca12ca0 to 6bf73df Compare January 12, 2024 14:23
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