Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong k-bound passed when using approximation with raw verification - fix 2052379 #135

Merged
merged 11 commits into from
Feb 12, 2024

Conversation

mtygesen
Copy link
Contributor

@mtygesen mtygesen commented Feb 4, 2024

Fixes:
https://bugs.launchpad.net/tapaal/+bug/2052379

Also fixes:

  • Issue where gui in some cases would be unable to display trace event though the xml received from the engine was perfectly fine.
  • NPE with color switches when trying to add bindings to a net that is not unfolded

@srba srba self-requested a review February 5, 2024 12:24
Copy link
Member

@srba srba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not quite work - if I click on "Use" and replace the -kbound with e.g. 10 (the default is 4), it will still call the engine with 4 and not with 10 (which it should)

@srba
Copy link
Member

srba commented Feb 7, 2024

The k-bound is not updated. In the intro example, select Overapproximation and it deletes the -kbound from the raw string as it should. Then click on exact analysis and the -k bound is not readded (but it should). Now click on "Use" and verify and you get an error (because of the missing kbound).

Also (not related to this issue but please fix it too), if you in the intro example (without overapproximation) decrease the number of extra tokens to e.g. 2 and run the verification, the trace is not returned but the following exception is raised:

org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
...

The trace parses is probably missing the trace tag.

@srba
Copy link
Member

srba commented Feb 8, 2024

Needs to be fixed as it now adds k-bound twice. To reproduce: Open into example, open the query. Select "Overapproximation" (and kbound disappers as it should). Now select "Exact analysis" and the kbound is back (as it should). Now select "Use" and the kbound is added a second time - running a verification now fails because it is not allowed to have the k-bound more than once.

@srba
Copy link
Member

srba commented Feb 8, 2024

A small issue: open intro example, open query, select "no trace" and overapproximation (or overapproximation) and verify. The answer is conclusive. Now open the query again and click on "Use" and the query become inconclusive.

@srba srba self-requested a review February 12, 2024 09:24
Copy link
Member

@srba srba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open intro example, open query, select Overapproximation, select "Use" and add " -k 10 -t 0" at the end of the options. Now "save and verify" and you get an error:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "pipe.gui.petrinet.PetriNetTab.getModel()" because the return value of "dk.aau.cs.verification.VerificationResult.getUnfoldedTab()" is null
at net.tapaal.gui.petrinet.verification.RunVerification.showResult(RunVerification.java:107)
at net.tapaal.gui.petrinet.verification.RunVerificationBase.done(RunVerificationBase.java:247)
....

Seems to be a problem even if you do not select "Use" just overapproximation.

@srba srba self-requested a review February 12, 2024 16:56
Copy link
Member

@srba srba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine now and good refactoring.

@srba srba merged commit bdba796 into TAPAAL:main Feb 12, 2024
1 check passed
@mtygesen mtygesen deleted the wrong-k-bound-raw-verification branch February 14, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants