Merge lp:~tapaal-contributor/verifypn/Fix-partitioning-1934103 into lp:verifypn

Proposed by Thomas Pedersen
Status: Merged
Approved by: Jiri Srba
Approved revision: 247
Merged at revision: 245
Proposed branch: lp:~tapaal-contributor/verifypn/Fix-partitioning-1934103
Merge into: lp:verifypn
Diff against target: 32 lines (+11/-2)
2 files modified
include/PetriEngine/Colored/Expressions.h (+10/-1)
src/PetriEngine/Colored/ColoredPetriNetBuilder.cpp (+1/-1)
To merge this branch: bzr merge lp:~tapaal-contributor/verifypn/Fix-partitioning-1934103
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Peter Gjøl Jensen Approve
Review via email: mp+405543@code.launchpad.net

Commit message

Fix problem with multiple constant colors on arcs creating multiple arcs between the same place and transition in the unfolded net, because of partitioning not being applied correctly.

To post a comment you must log in.
246. By Thomas Pedersen <email address hidden>

Revert needed partition adjustments

247. By Peter G. Jensen <email address hidden>

removed debug

Revision history for this message
Peter Gjøl Jensen (peter-gjoel) wrote :

Passes regression-tests on colored nets.
Minor gains in reachability, otherwise comparable to trunk in performance.

review: Approve
Revision history for this message
Jiri Srba (srba) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/PetriEngine/Colored/Expressions.h'
2--- include/PetriEngine/Colored/Expressions.h 2021-07-06 21:34:15 +0000
3+++ include/PetriEngine/Colored/Expressions.h 2021-07-17 13:06:06 +0000
4@@ -271,7 +271,16 @@
5
6 public:
7 const Color* eval(const ExpressionContext& context) const override {
8- return _userOperator;
9+ if(context.placePartition.getEquivalenceClasses().empty()){
10+ return _userOperator;
11+ } else {
12+ std::vector<uint32_t> tupleIds;
13+ _userOperator->getTupleId(tupleIds);
14+
15+ context.placePartition.applyPartition(tupleIds);
16+ return _userOperator->getColorType()->getColor(tupleIds);
17+ }
18+
19 }
20
21 bool getArcIntervals(Colored::ArcIntervals& arcIntervals,const PetriEngine::Colored::ColorFixpoint& cfp, uint32_t& index, int32_t modifier) const override {
22
23=== modified file 'src/PetriEngine/Colored/ColoredPetriNetBuilder.cpp'
24--- src/PetriEngine/Colored/ColoredPetriNetBuilder.cpp 2021-07-06 21:34:15 +0000
25+++ src/PetriEngine/Colored/ColoredPetriNetBuilder.cpp 2021-07-17 13:06:06 +0000
26@@ -898,4 +898,4 @@
27 }
28 }
29
30-
31\ No newline at end of file
32+

Subscribers

People subscribed via source and target branches