You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PSSActionModel.java, the action only collects its own constraints and the constraints of its sub-actions when it executes, is there any problem if the constraints of the containing action are not taken into account at this time? For example, in the following code scenario.
If the execution of a and b only considers its own constraints, then will the entry's a.x > b.y constraint not be satisfied?
For example, a.x = 0 causes b.x to have no legal value.
In current version (v2.3.0), as you said, the action only gets its constraint when it is executed, thus any constraint declared from its parents can't be covered (except in-line constraint).
Also, any sub-action attribute can't be accessed when the action handle is uninitialized. Therefore, a.x > b.y will be failed traversal and an error message shall be shown (PSS-ERROR: [PSSMemberPathElemExpression] a.x is not defined.).
Tip
Suppose you want the same behaviours as your example (i.e., do 2 actions with the first action's value greater than seconds.). We suggest you solve both values first, then assign them by in-line constraint.
Solution
component pss_top {
action sub_a {randbit [2] x;
exec body ASM="""sub_a.x = {{x}}""";
}
action sub_b {randbit [2] y;
exec body ASM="""sub_b.y = {{y}}""";
}
action root_a {randbit [2] x, y;
constraint {
x < y
}
activity {do sub_a with{ x ==this.x; };
do sub_b with{ y ==this.y; };
}}}
Description
In PSSActionModel.java, the action only collects its own constraints and the constraints of its sub-actions when it executes, is there any problem if the constraints of the containing action are not taken into account at this time? For example, in the following code scenario.
If the execution of a and b only considers its own constraints, then will the entry's a.x > b.y constraint not be satisfied?
For example, a.x = 0 causes b.x to have no legal value.
在 PSSActionModel.java,action 执行时只收集了自身以及子action的约束,此时如果不考虑父亲action的约束会不会有问题呢?例如一下代码情况,
如果执行a和b时,只考虑自身约束,那么entry的 a.x > b.y 约束会不会无法满足呢?
比如 a.x = 0,会导致 b.x 没有合法值。
Scenario Code
The text was updated successfully, but these errors were encountered: