Merge lp:~verifydtapn-contributers/verifydtapn/algorithmFix into lp:verifydtapn

Proposed by Jakob Taankvist
Status: Merged
Approved by: Jiri Srba
Approved revision: 268
Merged at revision: 268
Proposed branch: lp:~verifydtapn-contributers/verifydtapn/algorithmFix
Merge into: lp:verifydtapn
Diff against target: 58 lines (+26/-21)
1 file modified
src/DiscreteVerification/NonStrictSearch.cpp (+26/-21)
To merge this branch: bzr merge lp:~verifydtapn-contributers/verifydtapn/algorithmFix
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Mathias Grund Sørensen Approve
Review via email: mp+114978@code.launchpad.net

Description of the change

I think this fix the issue with the trace stack not being updated correctly.

To post a comment you must log in.
268. By Jakob Taankvist

Made sure the stack magement is allways preformed

Revision history for this message
Mathias Grund Sørensen (mathias.grund) wrote :

Looks good

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 'src/DiscreteVerification/NonStrictSearch.cpp'
2--- src/DiscreteVerification/NonStrictSearch.cpp 2012-07-13 17:50:33 +0000
3+++ src/DiscreteVerification/NonStrictSearch.cpp 2012-07-14 10:41:17 +0000
4@@ -23,28 +23,33 @@
5 //Main loop
6 while(pwList.HasWaitingStates()){
7 NonStrictMarking& next_marking = *pwList.GetNextUnexplored();
8- if(livenessQuery && next_marking.passed) continue;
9- NonStrictMarking marking(next_marking);
10- bool endOfMaxRun = true;
11- next_marking.passed = true;
12- next_marking.inTrace = true;
13- trace.push(&next_marking);
14- validChildren = 0;
15-
16- // Generate next markings
17- vector<NonStrictMarking> next = getPossibleNextMarkings(marking);
18-
19- if(isDelayPossible(marking)){
20- marking.incrementAge();
21- marking.SetGeneratedBy(NULL);
22- next.push_back(marking);
23- }
24-
25- for(vector<NonStrictMarking>::iterator it = next.begin(); it != next.end(); it++){
26- if(addToPW(&(*it), &next_marking)){
27- return true;
28- }
29+ bool endOfMaxRun;
30+ if(!(livenessQuery && next_marking.passed)){
31+ NonStrictMarking marking(next_marking);
32+ endOfMaxRun = true;
33+ next_marking.passed = true;
34+ next_marking.inTrace = true;
35+ trace.push(&next_marking);
36+ validChildren = 0;
37+
38+ // Generate next markings
39+ vector<NonStrictMarking> next = getPossibleNextMarkings(marking);
40+
41+ if(isDelayPossible(marking)){
42+ marking.incrementAge();
43+ marking.SetGeneratedBy(NULL);
44+ next.push_back(marking);
45+ }
46+
47+ for(vector<NonStrictMarking>::iterator it = next.begin(); it != next.end(); it++){
48+ if(addToPW(&(*it), &next_marking)){
49+ return true;
50+ }
51+ endOfMaxRun = false;
52+ }
53+ } else {
54 endOfMaxRun = false;
55+ validChildren = 0;
56 }
57
58 if(livenessQuery){

Subscribers

People subscribed via source and target branches