Merge lp:~tapaal-contributor/tapaal/remove-ghost-place into lp:tapaal

Proposed by Lena Ernstsen
Status: Rejected
Rejected by: Kenneth Yrke Jørgensen
Proposed branch: lp:~tapaal-contributor/tapaal/remove-ghost-place
Merge into: lp:tapaal
Diff against target: 96 lines (+4/-31)
3 files modified
src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java (+3/-18)
src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java (+0/-10)
src/pipe/gui/widgets/QueryDialog.java (+1/-3)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/remove-ghost-place
Reviewer Review Type Date Requested Status
TAPAAL Reviewers Pending
Review via email: mp+424776@code.launchpad.net

Commit message

Removed ghost places and fixed support for untimed game lenses with verifypn engine

To post a comment you must log in.
Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

Requires new engine and changing all engine options, abandon

Unmerged revisions

1141. By Lena Ernstsen

Fixed GUI not supporting gamed nets for verifypn

1140. By Lena Ernstsen

Merged with trunk

1139. By Lena Ernstsen

Fixed logic

1138. By Lena Ernstsen

Changed the engines that can be selected

1137. By Lena Ernstsen

Fixed spacing

1136. By Lena Ernstsen

Removed unnecessary ghost place

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java'
2--- src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2021-07-16 20:39:22 +0000
3+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2022-06-15 13:47:31 +0000
4@@ -11,7 +11,6 @@
5 import java.util.regex.Matcher;
6 import java.util.regex.Pattern;
7
8-import dk.aau.cs.TCTL.*;
9 import dk.aau.cs.gui.TabContent;
10 import net.tapaal.Preferences;
11 import net.tapaal.TAPAAL;
12@@ -25,6 +24,8 @@
13 import pipe.gui.widgets.InclusionPlaces;
14 import pipe.gui.widgets.InclusionPlaces.InclusionPlacesOption;
15 import dk.aau.cs.Messenger;
16+import dk.aau.cs.TCTL.TCTLAFNode;
17+import dk.aau.cs.TCTL.TCTLEGNode;
18 import dk.aau.cs.model.tapn.LocalTimedPlace;
19 import dk.aau.cs.model.tapn.TAPNQuery;
20 import dk.aau.cs.model.tapn.TimedArcPetriNet;
21@@ -332,16 +333,7 @@
22 } else {
23 ctlOutput = queryResult.value1().isCTL;
24 boolean approximationResult = queryResult.value2().discoveredStates() == 0; // Result is from over-approximation
25- TimedArcPetriNetTrace tapnTrace;
26- if (!errorOutput.contains("Trace") && standardOutput.contains("<trace>")) {
27- String trace = "Trace:\n";
28- trace += (standardOutput.split("(?=<trace>)")[1]);
29- trace = trace.split("(?<=</trace>)")[0];
30- tapnTrace = parseTrace(trace, options, model, exportedModel, query, queryResult.value1());
31- } else {
32- tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1());
33-
34- }
35+ TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1());
36 return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2(), approximationResult, standardOutput);
37 }
38 }
39@@ -404,13 +396,6 @@
40 }
41
42 public boolean supportsQuery(TimedArcPetriNet model, TAPNQuery query, VerificationOptions options) {
43- if(query.getCategory() == QueryCategory.CTL || query.getCategory() == QueryCategory.LTL){
44- return true;
45- }
46- if(query.getProperty() instanceof TCTLEGNode || query.getProperty() instanceof TCTLAFNode) {
47- return false;
48- }
49-
50 return true;
51 }
52
53
54=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java'
55--- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java 2020-12-17 21:03:12 +0000
56+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java 2022-06-15 13:47:31 +0000
57@@ -273,9 +273,6 @@
58 //throw new UnsupportedQueryException("Discrete inclusion check only supports upward closed queries.");
59
60 if (((VerifyTAPNOptions) options).discreteInclusion()) mapDiscreteInclusionPlacesToNewNames(options, model);
61- if (CreateGui.getCurrentTab().getLens().isGame() && !CreateGui.getCurrentTab().getLens().isTimed()) {
62- addGhostPlace(model.value1());
63- }
64
65 VerifyTAPNExporter exporter = new VerifyTAPNExporter();
66 ExportedVerifyTAPNModel exportedModel = exporter.export(model.value1(), query, CreateGui.getCurrentTab().getLens(), model.value2());
67@@ -287,13 +284,6 @@
68 return verify(options, model, exportedModel, query);
69 }
70
71- //An extra place is added before verifying the query so the timed engine is able to mimic the untimed game semantics.
72- private void addGhostPlace(TimedArcPetriNet net) {
73- TimedPlace place = new LocalTimedPlace("ghost", new TimeInvariant(true, new IntBound(0)));
74- net.add(place);
75- place.addToken(new TimedToken(place, new BigDecimal(0)));
76- }
77-
78 private void mapDiscreteInclusionPlacesToNewNames(VerificationOptions options, Tuple<TimedArcPetriNet, NameMapping> model) {
79 VerifyTAPNOptions verificationOptions = (VerifyTAPNOptions) options;
80
81
82=== modified file 'src/pipe/gui/widgets/QueryDialog.java'
83--- src/pipe/gui/widgets/QueryDialog.java 2022-06-03 07:36:58 +0000
84+++ src/pipe/gui/widgets/QueryDialog.java 2022-06-15 13:47:31 +0000
85@@ -924,10 +924,8 @@
86 options.add(engine.nameString);
87 }
88 }
89- } else if (!lens.isGame()) {
90+ } else {
91 options.add(name_UNTIMED);
92- } else {
93- options.add(name_DISCRETE);
94 }
95
96 reductionOption.removeAllItems();

Subscribers

People subscribed via source and target branches