Skip to content

Conversation

@davexparker
Copy link
Member

ModelInfo supplies action list
Action lists used when building/transforming models
Additional action access methods (explicit engine)
Action to string access methods

This includes null for unlabelled choices/transitions (as for Model).

This will allow aligning actions in a built model and its source,
facilitating the use of action indices for efficiency.

For now, this is optional: returning null indicates that the
information is unavailable.

ModulesFile supports this. BasicModelInfo is able to store/provide the info
but, for now, explicit model import does not use this because it cannot
provide the action list efficiently without searching all transitions.
To keep ModelGenerator and Model classes in synch, the existing
get*ActionString methods in ModelGenerator, used only by the
simulator, are renamed to get*ActionDescription. These provide
source-dependent descriptions, e.g. module/[action] for PRISM
models, rather than simply converting actions to strings.
In a similar style to the one in NondetModel.
Used e.g. when simulating explicitly imported models.
Was working before for PRISM models, because CTMCs are exposed
as multiple action-labelled choices, but now works for other
sources too, e.g., explicitly imported models.
(i.e. add null if an unlabelled self-loop was added to fix a deadlock)

Not actually needed if the action set is later computed on demand, since
the method to add a transition will take care of this, but this works
more smoothly when the assumed action set is provided up front with
ModelExplicit.setActions, as in e.g. ConstructModel.
@davexparker davexparker merged commit 55ded8d into prismmodelchecker:master Oct 11, 2025
15 of 18 checks passed
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.

1 participant