Skip to content

Conversation

@maxkurze1
Copy link
Contributor

@maxkurze1 maxkurze1 commented Apr 21, 2022

Fix issue #178

  • allows labels to be placed inside other labels. This can look like: label "l1" = "l2" & "l3";
  • adds check to find cyclic dependencies between labels (also finds cycles between labels and formulas if formulas are expanded before running the check)
  • changing label evaluation to evaluate all labels together instead of one by one
  • by allowing labels inside other label-definitions labels are also allowed inside guards, therefore also adding support for label evaluation inside guards

Example:

dtmc

module test
	s : [0..3] init 0;
        d : [0..1] init 0;

	[] s=0 -> 0.1 : (s'=1) + 0.3 : (s'=2) + 0.6 : (s'=3);
	[] s=1 -> (s'=1);
	[] s=2 -> (s'=2) & (d'=1);
	[] s=3 -> (s'=3) & (d'=1);
endmodule

// true for s=2 or 3
label "l1" = d=1;
// true for s=2
label "l2" = s=2;
// true for s=0 or 2
label "l3" = ("l1" & "l2") | s=0;

// true for s=0 or 2 or 3
formula f1 = "l1" | s=0;
// true for s=0 or 2
label "l4" = "l3" & f1

Also module renaming doesn't affect the evaluation of the label. The label used inside the guard stays the same.

dtmc

module m1
    s1: bool init false;

    [] !"foo" -> (s1'=true);
    [] true -> (s1'=false);
endmodule

module m2=m1[s1=s2] endmodule

label "foo" = s1 | s2;

@maxkurze1 maxkurze1 force-pushed the label-evaluation branch 2 times, most recently from b5a776e to 7c57555 Compare April 22, 2022 12:04
@maxkurze1 maxkurze1 force-pushed the label-evaluation branch from ff75456 to 617b988 Compare May 3, 2022 21:52
@maxkurze1 maxkurze1 force-pushed the label-evaluation branch 2 times, most recently from 9f921b6 to 64dc29e Compare May 16, 2022 12:02
@maxkurze1 maxkurze1 force-pushed the label-evaluation branch 2 times, most recently from a6944ef to d858043 Compare June 24, 2022 12:34
@maxkurze1 maxkurze1 force-pushed the label-evaluation branch 2 times, most recently from ac6b964 to 485aa20 Compare March 14, 2023 17:57
@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.

1 participant