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
=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java'
--- src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2021-07-16 20:39:22 +0000
+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2022-06-15 13:47:31 +0000
@@ -11,7 +11,6 @@
11import java.util.regex.Matcher;11import java.util.regex.Matcher;
12import java.util.regex.Pattern;12import java.util.regex.Pattern;
1313
14import dk.aau.cs.TCTL.*;
15import dk.aau.cs.gui.TabContent;14import dk.aau.cs.gui.TabContent;
16import net.tapaal.Preferences;15import net.tapaal.Preferences;
17import net.tapaal.TAPAAL;16import net.tapaal.TAPAAL;
@@ -25,6 +24,8 @@
25import pipe.gui.widgets.InclusionPlaces;24import pipe.gui.widgets.InclusionPlaces;
26import pipe.gui.widgets.InclusionPlaces.InclusionPlacesOption;25import pipe.gui.widgets.InclusionPlaces.InclusionPlacesOption;
27import dk.aau.cs.Messenger;26import dk.aau.cs.Messenger;
27import dk.aau.cs.TCTL.TCTLAFNode;
28import dk.aau.cs.TCTL.TCTLEGNode;
28import dk.aau.cs.model.tapn.LocalTimedPlace;29import dk.aau.cs.model.tapn.LocalTimedPlace;
29import dk.aau.cs.model.tapn.TAPNQuery;30import dk.aau.cs.model.tapn.TAPNQuery;
30import dk.aau.cs.model.tapn.TimedArcPetriNet;31import dk.aau.cs.model.tapn.TimedArcPetriNet;
@@ -332,16 +333,7 @@
332 } else {333 } else {
333 ctlOutput = queryResult.value1().isCTL;334 ctlOutput = queryResult.value1().isCTL;
334 boolean approximationResult = queryResult.value2().discoveredStates() == 0; // Result is from over-approximation335 boolean approximationResult = queryResult.value2().discoveredStates() == 0; // Result is from over-approximation
335 TimedArcPetriNetTrace tapnTrace;336 TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1());
336 if (!errorOutput.contains("Trace") && standardOutput.contains("<trace>")) {
337 String trace = "Trace:\n";
338 trace += (standardOutput.split("(?=<trace>)")[1]);
339 trace = trace.split("(?<=</trace>)")[0];
340 tapnTrace = parseTrace(trace, options, model, exportedModel, query, queryResult.value1());
341 } else {
342 tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1());
343
344 }
345 return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2(), approximationResult, standardOutput);337 return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2(), approximationResult, standardOutput);
346 }338 }
347 }339 }
@@ -404,13 +396,6 @@
404 }396 }
405 397
406 public boolean supportsQuery(TimedArcPetriNet model, TAPNQuery query, VerificationOptions options) {398 public boolean supportsQuery(TimedArcPetriNet model, TAPNQuery query, VerificationOptions options) {
407 if(query.getCategory() == QueryCategory.CTL || query.getCategory() == QueryCategory.LTL){
408 return true;
409 }
410 if(query.getProperty() instanceof TCTLEGNode || query.getProperty() instanceof TCTLAFNode) {
411 return false;
412 }
413
414 return true;399 return true;
415 }400 }
416 401
417402
=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java'
--- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java 2020-12-17 21:03:12 +0000
+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java 2022-06-15 13:47:31 +0000
@@ -273,9 +273,6 @@
273 //throw new UnsupportedQueryException("Discrete inclusion check only supports upward closed queries.");273 //throw new UnsupportedQueryException("Discrete inclusion check only supports upward closed queries.");
274274
275 if (((VerifyTAPNOptions) options).discreteInclusion()) mapDiscreteInclusionPlacesToNewNames(options, model);275 if (((VerifyTAPNOptions) options).discreteInclusion()) mapDiscreteInclusionPlacesToNewNames(options, model);
276 if (CreateGui.getCurrentTab().getLens().isGame() && !CreateGui.getCurrentTab().getLens().isTimed()) {
277 addGhostPlace(model.value1());
278 }
279276
280 VerifyTAPNExporter exporter = new VerifyTAPNExporter();277 VerifyTAPNExporter exporter = new VerifyTAPNExporter();
281 ExportedVerifyTAPNModel exportedModel = exporter.export(model.value1(), query, CreateGui.getCurrentTab().getLens(), model.value2());278 ExportedVerifyTAPNModel exportedModel = exporter.export(model.value1(), query, CreateGui.getCurrentTab().getLens(), model.value2());
@@ -287,13 +284,6 @@
287 return verify(options, model, exportedModel, query);284 return verify(options, model, exportedModel, query);
288 }285 }
289286
290 //An extra place is added before verifying the query so the timed engine is able to mimic the untimed game semantics.
291 private void addGhostPlace(TimedArcPetriNet net) {
292 TimedPlace place = new LocalTimedPlace("ghost", new TimeInvariant(true, new IntBound(0)));
293 net.add(place);
294 place.addToken(new TimedToken(place, new BigDecimal(0)));
295 }
296
297 private void mapDiscreteInclusionPlacesToNewNames(VerificationOptions options, Tuple<TimedArcPetriNet, NameMapping> model) {287 private void mapDiscreteInclusionPlacesToNewNames(VerificationOptions options, Tuple<TimedArcPetriNet, NameMapping> model) {
298 VerifyTAPNOptions verificationOptions = (VerifyTAPNOptions) options;288 VerifyTAPNOptions verificationOptions = (VerifyTAPNOptions) options;
299289
300290
=== modified file 'src/pipe/gui/widgets/QueryDialog.java'
--- src/pipe/gui/widgets/QueryDialog.java 2022-06-03 07:36:58 +0000
+++ src/pipe/gui/widgets/QueryDialog.java 2022-06-15 13:47:31 +0000
@@ -924,10 +924,8 @@
924 options.add(engine.nameString);924 options.add(engine.nameString);
925 }925 }
926 }926 }
927 } else if (!lens.isGame()) {927 } else {
928 options.add(name_UNTIMED);928 options.add(name_UNTIMED);
929 } else {
930 options.add(name_DISCRETE);
931 }929 }
932930
933 reductionOption.removeAllItems();931 reductionOption.removeAllItems();

Subscribers

People subscribed via source and target branches