Skip to content

Conversation

@sjunges
Copy link
Contributor

@sjunges sjunges commented Feb 2, 2025

Add choice label building for JANI. Fixes #661

@TheGreatfpmK
Copy link
Contributor

I tried the implementation on csma.-2-2 model (both JANI and PRISM can be found here: csma.2-2.v1.zip) and it seems it works mostly fine, however, there is one additional label with no name when parsing JANI.

PRISM model output:

Model type: MDP (sparse)
States: 1038
Transitions: 1282
Choices: 1054
Reward Models: none

State Labels: 2 labels

  • deadlock -> 0 item(s)
  • init -> 1 item(s)

Choice Labels: 8 labels

  • send1 -> 12 item(s)
  • send2 -> 12 item(s)
  • end2 -> 20 item(s)
  • cd -> 6 item(s)
  • time -> 844 item(s)
  • busy2 -> 30 item(s)
  • busy1 -> 30 item(s)
  • end1 -> 20 item(s)

JANI model output:

Model type: MDP (sparse)
States: 1038
Transitions: 1282
Choices: 1054
Reward Models: none

State Labels: 2 labels

  • deadlock -> 0 item(s)
  • init -> 1 item(s)

Choice Labels: 9 labels

  • send1 -> 12 item(s)
  • send2 -> 12 item(s)
  • end2 -> 20 item(s)
  • cd -> 6 item(s)
  • time -> 844 item(s)
  • busy2 -> 30 item(s)
  • -> 80 item(s)
  • busy1 -> 30 item(s)
  • end1 -> 20 item(s)

@sjunges sjunges marked this pull request as draft February 3, 2025 22:02
@sjunges
Copy link
Contributor Author

sjunges commented Feb 18, 2025

Could you create a smaller file to show where these empty labels come from?

@TheGreatfpmK
Copy link
Contributor

Ok I see what's happening. If there are empty action labels [] in the PRISM file then the corresponding edges in the JANI file don't have any "action" property. While building models from PRISM these are ignored when it comes to choice labeling, but here a new "empty" label is created for these choices. In this zip jani-empty-labels-example.zip there are 2 versions of the same model. In tiny_rewards all actions have labels and therefore this is not a problem, in tiny_rewards2 there is one action with no label leading to this behaviour.

@sjunges
Copy link
Contributor Author

sjunges commented Feb 19, 2025

Ok, so the expected solution is that for empty labels, I just dont add a label? :-)

@TheGreatfpmK
Copy link
Contributor

Yes, that should be all.

@sjunges sjunges added this to the 1.10 milestone Feb 19, 2025
@sjunges sjunges modified the milestones: 1.10, 1.11 Mar 23, 2025
@sjunges sjunges requested a review from tquatmann June 9, 2025 20:26
@sjunges sjunges marked this pull request as ready for review June 9, 2025 20:27
Copy link
Member

@tquatmann tquatmann left a comment

Choose a reason for hiding this comment

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

LGTM!

@sjunges sjunges merged commit 83b9191 into moves-rwth:master Jun 10, 2025
14 of 16 checks passed
@sjunges sjunges deleted the jani-choicelab branch June 10, 2025 10:48
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.

Building JANI with choice labels is not supported

3 participants