-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When a default constraint is placed inside an if-else block, randomization fails.
Scenario Code
// Example showing default constraint inside if-else
component pss_top {
action root_a {
activity {
do testTruePath;
do testFalsePath;
}
}
action testTruePath {
rand int value;
constraint {
if (1) {
default value == 1;
} else {
default value == 2;
}
}
exec body ASM = """testTruePath: {{value}}""";
}
action testFalsePath {
rand int value;
constraint {
if (0) {
default value == 1;
} else {
default value == 2;
}
}
exec body ASM = """testFalsePath: {{value}}""";
}
}
Expected Output or Behaviour
testTruePath: 1
testFalsePath: 2
Error Message from PSSGen or JAVA (Optional)
PSSRandom.limitRetry(), Ln55: randomize fail
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working