Umb bindings#400
Merged
Merged
Conversation
volkm
approved these changes
May 21, 2026
Contributor
volkm
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding the support.
Just a few minor comments for potential improvements.
| return _convert_sparse_model(intermediate, value_type=_ValueType.EXACT) | ||
| if intermediate.supports_uncertainty: | ||
| return _convert_sparse_model(intermediate, value_type=_ValueType.INTERVAL) | ||
| return _convert_sparse_model(intermediate, value_type=_ValueType.DOUBLE) |
Contributor
There was a problem hiding this comment.
I guess we do not need a check for parametric?
| assert model.nr_transitions == model2.nr_transitions | ||
| assert model.nr_choices == model2.nr_choices | ||
|
|
||
| def test_dtmc_short_round_trip(self, dtmc): |
Contributor
There was a problem hiding this comment.
Is this not the same as test_export_and_build_dtmc? Maybe we only keep this function?
Similar for the MDP.
Contributor
Author
There was a problem hiding this comment.
Yes, we can remove them. We only added the highlevel convenience methods later...
| import_opts.build_state_valuations = False | ||
| umb2 = stormpy.import_umb(tmp_umb, import_opts) | ||
| model2 = stormpy.sparse_model_from_umb(umb2, import_opts) | ||
| self._assert_same_structure(dtmc, model2) |
Contributor
There was a problem hiding this comment.
Maybe explicitly check here for the missing state valuations?
Co-authored-by: Matthias Volk <volkm@users.noreply.github.com>
Co-authored-by: Matthias Volk <volkm@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provide bindings for importing and exporting umb in stormpy.