Adding Probabilistic Choose() in P #526
Replies: 4 comments 1 reply
-
@ankushdesai Yes, definitely. I see this as a P language feature. With every data choice made through
With a distribution provided, I think this would be a good feature for users to directly control what region of the state-space is explored by P backends (both Coyote/PSym). For example, consider TwoPhaseCommit example where a participant returns in the Prepare phase based on
P backends can then explore the state-space corresponding to
For bug finding through Coyote/PSym, this will be an elegant syntax sugar, instead of the "mimic"-style hack. |
Beta Was this translation helpful? Give feedback.
-
I agree that this would be a useful feature to add to P. In addition to all the reasons mentioned by @aman-goel, I mention two other possibilities:
|
Beta Was this translation helpful? Give feedback.
-
@shazqadeer So the guidance to using probabilistic choose is not to mimic real world behavior, but its actually the other way round. Use the probabilistic choose to give lower weightage to common behavior and bring to surface the less common executions that happen in production. So my struggle has been, I would like to introduce this feature not as a way to mimic real-world settings but to improve the coverage of less common scenarios. |
Beta Was this translation helpful? Give feedback.
-
I don't see how modeling real behavior is a misuse of the feature. At some point in my modeling of a system with P, I may wish to only look at "real" executions and have the P executor do exactly that by giving low probability to "unreal" executions. At another point, I am curious about "unreal" executions so I increase their probability. Perhaps you are alluding to the problem that we don't know what conclusion to reach when the output of P is not an error trace. Perhaps this problem is solvable by just telling the engineer: don't reach any conclusions when P does not report an error trace. |
Beta Was this translation helpful? Give feedback.
-
@aman-goel would it help in to have a probabilistic choose()?
Instead of equal probability for the elements in the choose(), having weights assigned to them.
Would it help in coverage? Bug finding?
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions