PSharp
PSharp copied to clipboard
Cycle detection optimizations
Check for cycles only at Sends
Personally, I would have not added a bool to GetNext. Instead, just check the operation type inside the cycledetector strategy. Unless there is an issue with doing this?
BugFindingRuntime.cs has essentially no changes, so should be reverted (unless GitHub is just not showing them).
When I tried to make this change, I struggled because the cycle detector uses the trace of operations and it assumes that trace.count - 2 (or something like that) will be the last operation and that this operation has a state hash. But this is no longer the case. I think you will need to take this into account.
This was my attempt: https://github.com/p-org/PSharp/commit/5c0f2f1e70c3791692a7b04bbc63e93ae9d56f97
Thanks guys! I will check these stuff out!