Fix phiStates ignored in computeAllTransientProbabilities#985
Conversation
…bsorb non-phi states Co-authored-by: sjunges <13627276+sjunges@users.noreply.github.com>
|
@copilot Add a test that failed without this change and does not fail with this change! |
…; fix existing test to use phiStates=all Co-authored-by: sjunges <13627276+sjunges@users.noreply.github.com>
Added |
|
I've reviewed this. Looks good. @volkm can you have a quick look? |
|
Looks okay to me. There is still the issue that all goal states are made absorbing, so only the "first front" of goal states will be considered. If there is a goal state s with successor s', then the probabilities for s' will be set to zero instead of the correct value. So maybe the function should just take absorbing states as argument anyway. |
|
Should we instead remove this if there are still issues with this? I must say that I have a hard time to understand "all transient probabilities". |
|
The goal was originally to compute the probability My suggestion would be to replace |
|
with an assertion that the states are in fact absorbing? |
|
No, I would still make them absorbing in the function (as we currently do). The name "absorbing" is not a good name then, maybe use "goalStates" instead? |
|
|
phiStateswas passed tocomputeAllTransientProbabilitiesbut never applied, causing probability mass to flow through states that violate theφ U ψpath condition. All states outsideφshould be absorbing — only paths staying withinphiStatesuntil reachingpsiStatesare valid.Changes
SparseCtmcCslHelper::computeAllTransientProbabilities: ComputeabsorbingStates = ~phiStates | psiStatesand callmakeRowsAbsorbingon those states before uniformization. Also set their exit rates to 1, consistent with howpsiStateswere previously handled.This matches the pattern already used in
computeBoundedUntilProbabilities.