UPPAALModelChecker / UPPAAL-Meta

This is the offcial meta repo for issue reporting, feature request and public roadmap for the development of UPPAAL.
http://www.uppaal.org
1 stars 0 forks source link

`under <Strategy>` query does not work as expected #295

Open mikaelbdj opened 1 month ago

mikaelbdj commented 1 month ago

Describe the bug When generating a strategy Goal for a timed game with reachability goal Main.Win, I would like to verify that it works by using the query A<> Main.Win under Goal. This should by definition always be true if a winning strategy was generated. However, it sometimes is not. It seems that when an UPPAAL strategy is generated there is an underlying assumption that actions are taken as soon as possible, so if I must wait until 2<=x<=10 to do a then I should do a at exactly x=2 otherwise the strategy is not guaranteed to work. However, in the under <strategy query this is not how it works - here it will assume that the action is taken anywhere between 2 and 10 (symbolically). I present two examples (MNWEs.zip) where this incorrect application of a strategy causes the verifying query to fail:

  1. A model that has a trivial winning strategy, simply go to the winning state between 2 <= x <= 10 (but do it as fast as possible). In this model the verifying query is false, because there exists runs where the action is taken after 3, where an uncontrollable action can cause us to deadlock. This will never be the case if the strategy is applied correctly though. filename: strategy_example_MNWE

  2. A model that has a bit more complex winning strategy. Essentially here when we reach L2 (x can at most be 2 on arrival), we should take the transition to Win ASAP (now). But the verifying query is false, because there exists runs where the action is taken after x=3, where the uncontrollable action will move us back to L1 and this repeats infinitely often, invalidating the A<> Main.Win. filename: strategy_example_MNWE_loop

To Reproduce Steps to reproduce the behavior:

  1. Open the first example.
  2. Run the first query to generate strategy and watch it successfully generate one (green)
  3. Run the second query to verify the strategy and watch it fail (red)
  4. Repeat 1-3 for the second example.

Expected behavior When successfully generating a winning strategy Goal for a timed game with reachability goal Main.Win I expect that the query A<> Main.Win under Goal will always be true.

Version(s) of UPPAAL tested 5.0.0

Screenshots Screenshots of both models: Deadlock: image Loop: image

Desktop (please complete the following information):

Additional context This bug has been discussed with @mikucionisaau in an online video call.