Merge lp:~jespoke/verifypn/relevant-inhib-fix into lp:verifypn
Status: | Merged |
---|---|
Merged at revision: | 255 |
Proposed branch: | lp:~jespoke/verifypn/relevant-inhib-fix |
Merge into: | lp:verifypn |
Diff against target: |
290 lines (+252/-5) 3 files modified
src/PetriEngine/Reducer.cpp (+10/-5) test_models/inhibitor-relevance-test001/model.pnml (+206/-0) test_models/inhibitor-relevance-test001/query.xml (+36/-0) |
To merge this branch: | bzr merge lp:~jespoke/verifypn/relevant-inhib-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
VerifyPN Maintainers | Pending | ||
Review via email: mp+410045@code.launchpad.net |
Commit message
In Reducer.cpp, function 'relevant', block for dealing with inhibitor arcs.
Removed the condition in the loop iterating it2 that would break the loop when arc it2 is an inhibitor. This is to ensure the loop breaks on exactly the arc from place, which we know to exist at that point.
Inserted a condition to continue if that found arc is an inhibitor, as that means it cannot consume tokens.
Inserted a condition to continue if a decreasing loop is unable to lower the marking of place far enough to disable the inhibitor under evaluation.
On the same line, flipped the <= to >= in the existing condition, as the continue should happen on non-decreasing loops, not non-increasing ones.
Also included a test model which is affected by this change.
Description of the change
In Reducer.cpp, function 'relevant', block for dealing with inhibitor arcs.
Fix for a problem that can cause the the function 'relevant' to produce different conclusions on what parts of the model are relevant depending on the internal order of places, and on the relative weights of an inhibitor arc and a regular arc between the same place and transition as if they could form a decreasing loop.
Added a condition to not consider a decreasing loop relevant to an inhibitor arc if it cannot lower the marking on their shared place below the inhibitor's weight.
Included a test where two equivalent queries on identical models result in different reduced nets without the fix.