0

I am trying to check if an uppaal model recognizes a trace.

I have to generate random traces and check if another similar model can do the same trace. I can do the random generation by using verifyta.exe with the query:

" simulate [<=n; 1] {clock} "

However, I do not know if Uppaal or Tron, or some extension is able to check if a model can actually reach the same trace as input. I will appreciate any recommendations, whether it is changing the way I generate the traces or the way I want the models to recognize the traces.

Any help would be highly appreciated :D

Rob
  • 14,746
  • 28
  • 47
  • 65

1 Answers1

0

First, you need to define what you mean by a trace. The simulate query gives a trajectory of some expressions - this is rarely needed, as it contains very precise information (hardly reproducible in a different system).

Uppaal ECDAR can check the simulation refinement between two processes, and the trace is a timed sequence of actions.

Uppaal TRON is concerned with relativized timed i/o conformance relation, also defined through a timed trace of i/o actions, except the trace is composed interactively where inputs are generated by TRON and outputs by implementation under test. One can also declare that all observable actions are outputs and thus feed the trace from IUT where TRON will check if the trace can be accepted by the model. This is so called monitoring mode and it can be performed by a special "trace adapter" which reads a trace and executes it on the behalf of IUT. TRON distribution contains a few examples driven by a script in trace directory using TraceAdapter. The adapter takes arguments after -- to tron command line and the trace can be fed via standard input stream.

mariusm
  • 1,483
  • 1
  • 11
  • 26
  • Thank you for the reply @mariusm . As I understand the manual i am doing this command with a preamble `tron.exe model.xml -I TraceAdapter -m < preamble.trn` . , However, I do not know how to give the trace to the program. I was using as a guide [Tron-User Manual](https://docs.uppaal.org/extensions/tron/manual.pdf) _chap3.5_ Thanks for the help – Jaime Cuartas Oct 19 '21 at 13:34
  • It takes from standard input stream, and the options to the adapter come after double-dash `--`. Try `tron.exe model.xml -I TraceAdapter -- -m preamble.trn < trace.trn`. – mariusm Oct 20 '21 at 06:46
  • Hello. Nice, I think i already can know if a model is able to follow one trace or not, thanks to you. However, I also would like to get random traces from a model. I understand that I could export the traces in the same format. I am trying this command, but I got the same preamble and one delay, but not a trace. `tron.exe model.xml -P random -D expectTrace.trn -I TraceAdapter -- -m preamble.trn` – Jaime Cuartas Oct 21 '21 at 13:33
  • `-P random` means that TRON will choose random delays (based on the model), so if there is no invariant, then the delay can be very, very long -- so maybe that's a reason for short output? You may want to experiment with virtual time (option `-Q log`) so that you do not have to wait for the world time to elapse. – mariusm Oct 21 '21 at 21:29
  • I think that I am not getting a trace. I am getting a preamble with `-D expectTrace.trn` because what I get is exactly `preamble.trn` including the precision and timeout, adding one unique delay at the end. Now with option `-Q log` it holds forever waiting, I think I am doing something bad or I left some other option. Thanks for replays @mariusm – Jaime Cuartas Oct 22 '21 at 11:14